From 2fd5e1cc39e262c1232f7c0dec46548d82f8d780 Mon Sep 17 00:00:00 2001 From: PeixuanZuo <94887879+PeixuanZuo@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:31:27 +0800 Subject: [PATCH] [ROCm] fix shell bug (#16641) `set -ex` with `grep` will exit when grep doesn't meet any string. --- tools/ci_build/github/pai/pai_huggingface_bert_large_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/github/pai/pai_huggingface_bert_large_test.sh b/tools/ci_build/github/pai/pai_huggingface_bert_large_test.sh index ee1f0482120c7..3b8e828fe94dd 100644 --- a/tools/ci_build/github/pai/pai_huggingface_bert_large_test.sh +++ b/tools/ci_build/github/pai/pai_huggingface_bert_large_test.sh @@ -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"