diff --git a/test/collective/CMakeLists.txt b/test/collective/CMakeLists.txt index 18f298032fef22372ceda93d2c7721d902c85979..3f2aed73b29eadf51c0ae737068d51f4da00850e 100644 --- a/test/collective/CMakeLists.txt +++ b/test/collective/CMakeLists.txt @@ -79,7 +79,7 @@ if((WITH_GPU OR WITH_ROCM) AND (LINUX)) py_test_modules( test_collective_alltoall_api MODULES test_collective_alltoall_api ENVS "http_proxy=;https_proxy=;PYTHONPATH=..:${PADDLE_BINARY_DIR}/python") - if(${CUDA_ARCH_NAME} STREQUAL "Ampere") + if((NOT WITH_ROCM) AND ((${CUDA_ARCH_NAME}) STREQUAL "Ampere")) set_tests_properties(test_collective_alltoall_api PROPERTIES TIMEOUT "160" LABELS "RUN_TYPE=DIST") else() @@ -135,7 +135,7 @@ if((WITH_GPU OR WITH_ROCM) AND (LINUX)) py_test_modules( test_collective_broadcast_api MODULES test_collective_broadcast_api ENVS "http_proxy=;https_proxy=;PYTHONPATH=..:${PADDLE_BINARY_DIR}/python") - if(${CUDA_ARCH_NAME} STREQUAL "Ampere") + if((NOT WITH_ROCM) AND ((${CUDA_ARCH_NAME}) STREQUAL "Ampere")) set_tests_properties(test_collective_broadcast_api PROPERTIES TIMEOUT "500" LABELS "RUN_TYPE=DIST") else() @@ -238,7 +238,7 @@ if((WITH_GPU OR WITH_ROCM) AND (LINUX)) test_collective_reduce_scatter_api MODULES test_collective_reduce_scatter_api ENVS "http_proxy=;https_proxy=;PYTHONPATH=..:${PADDLE_BINARY_DIR}/python") - if(${CUDA_ARCH_NAME} STREQUAL "Ampere") + if((NOT WITH_ROCM) AND ((${CUDA_ARCH_NAME}) STREQUAL "Ampere")) set_tests_properties(test_collective_reduce_scatter_api PROPERTIES TIMEOUT "360" LABELS "RUN_TYPE=DIST") else()