Skip to content

Commit

Permalink
Adjust rocm-smi check for test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfurmanek committed Apr 29, 2024
1 parent 2bf2342 commit ae8d7f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tensorflow/tools/ci_build/linux/rocm/run_gpu_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ N_BUILD_JOBS=$(grep -c ^processor /proc/cpuinfo)
rocm-smi -i
STATUS=$?
if [ $STATUS -ne 0 ]; then TF_GPU_COUNT=1; else
TF_GPU_COUNT=$(rocm-smi -i|grep 'ID' |grep 'GPU' |wc -l)
TF_GPU_COUNT=$(rocm-smi -i|grep 'Device ID' |grep 'GPU' |wc -l)
fi
TF_TESTS_PER_GPU=1
N_TEST_JOBS=$(expr ${TF_GPU_COUNT} \* ${TF_TESTS_PER_GPU})
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/ci_build/linux/rocm/run_xla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ N_BUILD_JOBS=$(grep -c ^processor /proc/cpuinfo)
rocm-smi -i
STATUS=$?
if [ $STATUS -ne 0 ]; then TF_GPU_COUNT=1; else
TF_GPU_COUNT=$(rocm-smi -i|grep 'ID' |grep 'GPU' |wc -l)
TF_GPU_COUNT=$(rocm-smi -i|grep 'Device ID' |grep 'GPU' |wc -l)
fi
TF_TESTS_PER_GPU=1
N_TEST_JOBS=$(expr ${TF_GPU_COUNT} \* ${TF_TESTS_PER_GPU})
Expand Down

0 comments on commit ae8d7f2

Please sign in to comment.