1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-11 06:30:45 +01:00
Grid/systems/OEM/benchmarks/select_gpu.sh
2023-10-03 09:58:44 -07:00

13 lines
230 B
Bash
Executable File

#!/bin/bash
num_tile=2
gpu_id=$(( (MPI_LOCALRANKID / num_tile ) ))
tile_id=$((MPI_LOCALRANKID % num_tile))
export ZE_AFFINITY_MASK=$gpu_id.$tile_id
echo "local rank $MPI_LOCALRANKID ; ZE_AFFINITY_MASK=$ZE_AFFINITY_MASK"
"$@"