Unit tests: fix number of GPU detection (#484)
[ROCm/rccl commit: 6268b87c16]
This commit is contained in:
@@ -69,7 +69,7 @@ if(BUILD_TESTS)
|
|||||||
|
|
||||||
find_program( rocminfo_executable rocminfo )
|
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)
|
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")
|
set(gtest_num_gpus "2")
|
||||||
endif()
|
endif()
|
||||||
target_compile_options(UnitTests PRIVATE -DGTESTS_NUM_GPUS=${gtest_num_gpus})
|
target_compile_options(UnitTests PRIVATE -DGTESTS_NUM_GPUS=${gtest_num_gpus})
|
||||||
|
|||||||
Reference in New Issue
Block a user