[ROCm] fix shell bug (#16641)

`set -ex` with `grep` will exit when grep doesn't meet any string.
This commit is contained in:
PeixuanZuo 2023-07-10 17:31:27 +08:00 committed by GitHub
parent 3b729e5d2f
commit 2fd5e1cc39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
set -ex
rocm_version=$1
mi200_gpus=$(rocm-smi --showproductname | grep -c "MI250")
mi200_gpus=$(rocm-smi --showproductname | grep -c "MI250" | xargs)
echo "mi200_gpus: $mi200_gpus"