1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 17:55:38 +00:00
Grid/systems/OEM/benchmarks/select_gpu.sh

14 lines
233 B
Bash
Raw Normal View History

2023-09-26 21:20:27 +01:00
#!/bin/bash
num_tile=2
gpu_id=$(( (MPI_LOCAL_RANKID % num_tile ) ))
tile_id=$((MPI_LOCAL_RANKID / num_tile))
export ZE_AFFINITY_MASK=$gpu_id.$tile_id
echo "local rank $MPI_LOCALRANKID ; ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK"
"$@"