File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,10 @@ set -x
2424N_BUILD_JOBS=$( grep -c ^processor /proc/cpuinfo)
2525# If rocm-smi exists locally (it should) use it to find
2626# out how many GPUs we have to test with.
27- rocm-smi -i
28- STATUS=$?
29- if [ $STATUS -ne 0 ]; then TF_GPU_COUNT=1; else
30- TF_GPU_COUNT=$( rocm-smi -i| grep ' Device ID' | grep ' GPU' | wc -l)
31- fi
27+ TF_GPU_COUNT=$( /opt/rocm/bin/rocminfo -i | grep ' gfx' | wc -l)
3228TF_TESTS_PER_GPU=1
3329N_TEST_JOBS=$( expr ${TF_GPU_COUNT} \* ${TF_TESTS_PER_GPU} )
34- amdgpuname=(` rocminfo | grep gfx | head -n 1` )
30+ amdgpuname=(` /opt/rocm/bin/ rocminfo | grep gfx | head -n 1` )
3531AMD_GPU_GFX_ID=${amdgpuname[1]}
3632echo " "
3733echo " Bazel will use ${N_BUILD_JOBS} concurrent build job(s) and ${N_TEST_JOBS} concurrent test job(s) for gpu ${AMD_GPU_GFX_ID} ."
@@ -41,7 +37,7 @@ export PYTHON_BIN_PATH=`which python3`
4137export TF_NEED_ROCM=1
4238export ROCM_PATH=" /opt/rocm"
4339
44- GPU_NAME=(` rocminfo | grep -m 1 gfx` )
40+ GPU_NAME=(` /opt/rocm/bin/ rocminfo | grep -m 1 gfx` )
4541GPU_NAME=${GPU_NAME[1]}
4642
4743EXCLUDED_TESTS=(
Original file line number Diff line number Diff line change @@ -35,24 +35,20 @@ set -x
3535N_BUILD_JOBS=$( grep -c ^processor /proc/cpuinfo)
3636# If rocm-smi exists locally (it should) use it to find
3737# out how many GPUs we have to test with.
38- rocm-smi -i
39- STATUS=$?
40- if [ $STATUS -ne 0 ]; then TF_GPU_COUNT=1; else
41- TF_GPU_COUNT=$( rocm-smi -i| grep ' Device ID' | grep ' GPU' | wc -l)
42- fi
38+ TF_GPU_COUNT=$( /opt/rocm/bin/rocminfo -i | grep ' gfx' | wc -l)
4339if [[ $TF_GPU_COUNT -lt 4 ]]; then
4440 echo " Found only ${TF_GPU_COUNT} gpus, multi-gpu tests need atleast 4 gpus."
4541 exit
4642fi
4743
48- amdgpuname=(` rocminfo | grep gfx | head -n 1` )
44+ amdgpuname=(` /opt/rocm/bin/ rocminfo | grep gfx | head -n 1` )
4945AMD_GPU_GFX_ID=${amdgpuname[1]}
5046
5147export PYTHON_BIN_PATH=` which python3`
5248export TF_NEED_ROCM=1
5349export ROCM_PATH=" /opt/rocm"
5450
55- GPU_NAME=(` rocminfo | grep -m 1 gfx` )
51+ GPU_NAME=(` /opt/rocm/bin/ rocminfo | grep -m 1 gfx` )
5652GPU_NAME=${GPU_NAME[1]}
5753
5854BAZEL_DISK_CACHE_SIZE=100G
You can’t perform that action at this time.
0 commit comments