1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-15 10:15:36 +00:00
Grid/systems/PVC-OEM/benchmarks/select_gpu.sh

13 lines
230 B
Bash
Raw Normal View History

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