From f87ba1773741e112d0b2c0534c02f8fda82ba770 Mon Sep 17 00:00:00 2001 From: gilbertlee-amd <44450918+gilbertlee-amd@users.noreply.github.com> Date: Fri, 10 Jul 2020 09:30:28 -0600 Subject: [PATCH] Removing UnitTest as install, removing unused env var (#231) --- install.sh | 2 +- test/CMakeLists.txt | 9 --------- test/CorrectnessTest.hpp | 7 ------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/install.sh b/install.sh index d7610559f5..df71584541 100755 --- a/install.sh +++ b/install.sh @@ -178,7 +178,7 @@ fi # Optionally, run tests if they're enabled. if ($run_tests); then if (test -f "./test/UnitTests"); then - HSA_FORCE_FINE_GRAIN_PCIE=1 ./test/UnitTests + ./test/UnitTests else echo "Unit tests have not been built yet; please re-run script with -t to build unit tests." exit 1 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 825e60d4dc..71d00c0f02 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -56,15 +56,6 @@ if(BUILD_TESTS) add_executable(UnitTests ${TEST_SOURCES}) target_include_directories(UnitTests PRIVATE /opt/rocm) target_link_libraries(UnitTests PRIVATE gtest_main PRIVATE rccl) - install(TARGETS UnitTests RUNTIME DESTINATION test) - - # HCC adds /opt/rocm/lib as RPATH, even though the install process is supposed to - # remove RPATH. As a work-around, set the correct RPATH for the unit test executable - # as a post-install step - install( - CODE - "execute_process(COMMAND chrpath -r ${CMAKE_INSTALL_PREFIX}/lib:/opt/rocm/lib ${CMAKE_INSTALL_PREFIX}/test/UnitTests)" - ) else() message("Not building unit tests") endif() diff --git a/test/CorrectnessTest.hpp b/test/CorrectnessTest.hpp index 94758c68d7..1c52224a7b 100644 --- a/test/CorrectnessTest.hpp +++ b/test/CorrectnessTest.hpp @@ -175,13 +175,6 @@ namespace CorrectnessTests // This code is called per test-tuple void SetUp() override { - // Check for fine-grained env variable (otherwise will hang) - if (!getenv("HSA_FORCE_FINE_GRAIN_PCIE")) - { - printf("Must set HSA_FORCE_FINE_GRAIN_PCIE=1 prior to execution\n"); - exit(0); - } - // Make the test tuple parameters accessible std::tie(op, dataType, numElements, numDevices, inPlace, envVals) = GetParam();