From b5bfb7366ac5bb49d18702576b8d0211da7208ce Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Wed, 5 Jan 2022 15:06:12 -0800 Subject: [PATCH] Unit tests: fix number of GPU detection (#484) [ROCm/rccl commit: 6268b87c16182219ad5536697c527094f6cf3ff3] --- projects/rccl/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rccl/test/CMakeLists.txt b/projects/rccl/test/CMakeLists.txt index 83048c465e..7da42fb9e8 100644 --- a/projects/rccl/test/CMakeLists.txt +++ b/projects/rccl/test/CMakeLists.txt @@ -69,7 +69,7 @@ if(BUILD_TESTS) find_program( rocminfo_executable rocminfo ) execute_process(COMMAND bash "-c" "${rocminfo_executable} | grep 'Device Type' | grep GPU | wc -l | tr -d '\n'" OUTPUT_VARIABLE gtest_num_gpus) - if(${gtest_num_gpus} MATCHES "0" OR ${gtest_num_gpus} MATCHES "1") + if(${gtest_num_gpus} EQUAL "0" OR ${gtest_num_gpus} EQUAL "1") set(gtest_num_gpus "2") endif() target_compile_options(UnitTests PRIVATE -DGTESTS_NUM_GPUS=${gtest_num_gpus})