We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0536c02 commit 96f1316Copy full SHA for 96f1316
.github/container/test-jax.sh
@@ -119,7 +119,15 @@ fi
119
120
readarray -t GPU_MEMORIES < <(nvidia-smi --query-gpu=memory.total --format=csv,noheader)
121
NGPUS="${#GPU_MEMORIES[@]}"
122
-GPU_MEMORIES_MIB=("${GPU_MEMORIES[@]/ MiB/}")
+if [[ " ${GPU_MEMORIES[*]} " =~ [[:space:]]\[N/A\][[:space:]] ]]; then
123
+ # On iGPU devices, nvidia-smi reports [N/A] GPU memory; use the system
124
+ # memory size instead to estimate what each GPU can use
125
+ SYSTEM_MEMORY_MIB=$(grep MemTotal /proc/meminfo | awk '{print $2 / 1024}')
126
+ declare -a GPU_MEMORIES_MIB
127
+ for (( i = 0; i < NGPUS; i++ )); do GPU_MEMORIES_MIB+=($(( SYSTEM_MEMORY_MIB / NGPUS ))); done
128
+else
129
+ GPU_MEMORIES_MIB=("${GPU_MEMORIES[@]/ MiB/}")
130
+fi
131
132
FLAGS=()
133
0 commit comments