From ed6695b9c9c2b4c20f7b9e340d7bc7e827055c29 Mon Sep 17 00:00:00 2001 From: renjithravindrankannath <94420380+renjithravindrankannath@users.noreply.github.com> Date: Mon, 6 Jun 2022 13:50:41 -0700 Subject: Correcting library path of hsakmt-roct for Centos7 and cleaning up the patch file. (#30885) * Correcting library path of hsakmt-roct and cleaning up the patch file. * Delete 007-library-path.patch --- .../rocm-validation-suite/006-library-path.patch | 371 ++++++++++++++++++++ .../rocm-validation-suite/007-library-path.patch | 379 --------------------- .../packages/rocm-validation-suite/package.py | 7 +- 3 files changed, 376 insertions(+), 381 deletions(-) create mode 100644 var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch delete mode 100644 var/spack/repos/builtin/packages/rocm-validation-suite/007-library-path.patch diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch new file mode 100644 index 0000000000..229e256f58 --- /dev/null +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/006-library-path.patch @@ -0,0 +1,371 @@ +diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt +index f4e57c7..fb66263 100644 +--- a/babel.so/CMakeLists.txt ++++ b/babel.so/CMakeLists.txt +@@ -113,13 +113,13 @@ set(ROCBLAS_LIB "rocblas") + set(HIP_HCC_LIB "amdhip64") + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -139,16 +139,16 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${HIP_PATH}) + + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt +index 851e24c..3697b4f 100644 +--- a/edp.so/CMakeLists.txt ++++ b/edp.so/CMakeLists.txt +@@ -108,13 +108,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_HCC_BUILD_FLAGS}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_HCC_BUILD_FLAGS}") + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -134,15 +134,15 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${ROCBLAS_INC_DIR} ${HIP_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR}) ++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpciaccess.so libpci.so libm.so) + +diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt +index 7ce465a..c61c52b 100644 +--- a/gst.so/CMakeLists.txt ++++ b/gst.so/CMakeLists.txt +@@ -117,13 +117,13 @@ else() + endif() + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -143,15 +143,15 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${ROCBLAS_INC_DIR} ${HIP_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt +index 278c084..5ba9007 100644 +--- a/iet.so/CMakeLists.txt ++++ b/iet.so/CMakeLists.txt +@@ -122,13 +122,13 @@ else() + endif() + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -147,8 +147,8 @@ if(DEFINED RVS_ROCMSMI) + endif() + endif() + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -162,9 +162,9 @@ if(DEFINED RVS_ROCMSMI) + endif() + + ## define include directories +-include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt +index ec1c01d..c8e040a 100644 +--- a/mem.so/CMakeLists.txt ++++ b/mem.so/CMakeLists.txt +@@ -114,13 +114,13 @@ set(ROCBLAS_LIB "rocblas") + set(HIP_HCC_LIB "amdhip64") + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -140,16 +140,16 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${HIP_PATH}) + + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt +index f88f7c1..f5eb246 100644 +--- a/pebb.so/CMakeLists.txt ++++ b/pebb.so/CMakeLists.txt +@@ -135,20 +135,20 @@ else() + endif() + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${ROCR_INC_DIR}/hsa/hsa.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set ROCR_INC_DIR path. Current value is : " ${ROCR_INC_DIR}) ++if(NOT EXISTS ${HSA_PATH}/include/hsa/hsa.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS ${HSA_PATH}/lib/${CORE_RUNTIME_LIBRARY}.so) ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ pci ${ROCR_INC_DIR}) ++include_directories(./ ../ pci ${HSA_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt +index c99b511..35490fc 100644 +--- a/perf.so/CMakeLists.txt ++++ b/perf.so/CMakeLists.txt +@@ -117,13 +117,13 @@ else() + endif() + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) ++if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + +@@ -143,15 +143,15 @@ if(DEFINED RVS_ROCMSMI) + endif() + + +-if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) ++include_directories(./ ../ ${ROCBLAS_INC_DIR} ${HIP_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt +index a887606..9bd797d 100644 +--- a/pesm.so/CMakeLists.txt ++++ b/pesm.so/CMakeLists.txt +@@ -118,7 +118,7 @@ endif() + ## define include directories + include_directories(./ ../ pci) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) + +diff --git a/pqt.so/CMakeLists.txt b/pqt.so/CMakeLists.txt +index d59b254..7cb3743 100644 +--- a/pqt.so/CMakeLists.txt ++++ b/pqt.so/CMakeLists.txt +@@ -134,20 +134,20 @@ else() + endif() + + # Determine Roc Runtime header files are accessible +-if(NOT EXISTS ${ROCR_INC_DIR}/hsa/hsa.h) +- message("ERROR: ROC Runtime headers can't be found under specified path. Please set ROCR_INC_DIR path. Current value is : " ${ROCR_INC_DIR}) ++if(NOT EXISTS ${HSA_PATH}/include/hsa/hsa.h) ++ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) + RETURN() + endif() + +-if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) +- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) ++if(NOT EXISTS ${HSA_PATH}/lib/${CORE_RUNTIME_LIBRARY}.so) ++ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) + RETURN() + endif() + + ## define include directories +-include_directories(./ ../ pci ${ROCR_INC_DIR}) ++include_directories(./ ../ pci ${HSA_PATH}) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) + +diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt +index 072c49d..3f00c7a 100644 +--- a/rcqt.so/CMakeLists.txt ++++ b/rcqt.so/CMakeLists.txt +@@ -120,7 +120,7 @@ endif() + ## define include directories + include_directories(./ ../) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR}) + ## additional libraries + set (PROJECT_LINK_LIBS rvslibrt rvslib) + +diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt +index 642902c..7acaec4 100644 +--- a/rvslib/CMakeLists.txt ++++ b/rvslib/CMakeLists.txt +@@ -120,7 +120,7 @@ endif() + + ## define include directories + include_directories(./ ../ +- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ++ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} ${HIP_PATH} + ) + link_directories(${ASAN_LIB_PATH}) + +diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt +index 678c980..53e0aa9 100644 +--- a/testif.so/CMakeLists.txt ++++ b/testif.so/CMakeLists.txt +@@ -119,7 +119,7 @@ endif() + ## define include directories + include_directories(./ ../ pci) + # Add directories to look for library files to link +-link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) ++link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) + ## additional libraries + set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) + diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/007-library-path.patch b/var/spack/repos/builtin/packages/rocm-validation-suite/007-library-path.patch deleted file mode 100644 index 464a4db39f..0000000000 --- a/var/spack/repos/builtin/packages/rocm-validation-suite/007-library-path.patch +++ /dev/null @@ -1,379 +0,0 @@ -diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt -index 70d3ebd..c0d0244 100644 ---- a/babel.so/CMakeLists.txt -+++ b/babel.so/CMakeLists.txt -@@ -113,13 +113,13 @@ set(ROCBLAS_LIB "rocblas") - set(HIP_HCC_LIB "amdhip64") - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -139,16 +139,16 @@ if(DEFINED RVS_ROCMSMI) - endif() - - --if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH/lib/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) -+include_directories(./ ../ ${HIP_PATH} ${HIP_PATH}/include/) - - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt -index 11a28c3..cc9d0b2 100644 ---- a/edp.so/CMakeLists.txt -+++ b/edp.so/CMakeLists.txt -@@ -108,13 +108,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_HCC_BUILD_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_HCC_BUILD_FLAGS}") - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH/include/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH/include/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -134,15 +134,15 @@ if(DEFINED RVS_ROCMSMI) - endif() - - --if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH/lib/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) -+include_directories(./ ../ ${HIP_PATH} ${ROCBLAS_INC_DIR} ${HIP_PATH}/include/) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR}) -+link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpciaccess.so libpci.so libm.so) - -diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt -index 7bc2105..4d742df 100644 ---- a/gst.so/CMakeLists.txt -+++ b/gst.so/CMakeLists.txt -@@ -117,13 +117,13 @@ else() - endif() - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -143,15 +143,15 @@ if(DEFINED RVS_ROCMSMI) - endif() - - --if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH/lib/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) -+include_directories(./ ../ ${HIP_PATH} ${ROCBLAS_INC_DIR} ${HIP_PATH}/include/) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt -index cebd6d4..bc814b5 100644 ---- a/iet.so/CMakeLists.txt -+++ b/iet.so/CMakeLists.txt -@@ -122,13 +122,13 @@ else() - endif() - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -147,8 +147,8 @@ if(DEFINED RVS_ROCMSMI) - endif() - endif() - --if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH/lib/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -162,9 +162,9 @@ if(DEFINED RVS_ROCMSMI) - endif() - - ## define include directories --include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${ROCR_INC_DIR} ${HIP_INC_DIR}) -+include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_PATH} ${HIP_PATH}/include/) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt -index 760ca0e..7f94c09 100644 ---- a/mem.so/CMakeLists.txt -+++ b/mem.so/CMakeLists.txt -@@ -114,13 +114,13 @@ set(ROCBLAS_LIB "rocblas") - set(HIP_HCC_LIB "amdhip64") - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -140,16 +140,16 @@ if(DEFINED RVS_ROCMSMI) - endif() - - --if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set /lib/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) -+include_directories(./ ../ ${HIP_PATH} ${HIP_PATH}/include/) - - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt -index b61d4f5..29b45ba 100644 ---- a/pebb.so/CMakeLists.txt -+++ b/pebb.so/CMakeLists.txt -@@ -135,20 +135,20 @@ else() - endif() - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${ROCR_INC_DIR}/hsa/hsa.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set ROCR_INC_DIR path. Current value is : " ${ROCR_INC_DIR}) -+if(NOT EXISTS ${HSA_PATH}/include/hsa/hsa.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS ${HSA_PATH}/lib/${CORE_RUNTIME_LIBRARY}.so) -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ pci ${ROCR_INC_DIR}) -+include_directories(./ ../ pci ${HSA_PATH}/include/) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt -index 1365891..1996332 100644 ---- a/perf.so/CMakeLists.txt -+++ b/perf.so/CMakeLists.txt -@@ -117,13 +117,13 @@ else() - endif() - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_INC_DIR path. Current value is : " ${HIP_INC_DIR}) -+if(NOT EXISTS ${HIP_PATH}/include/hip/hip_runtime_api.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HIP_PATH path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - -@@ -143,15 +143,15 @@ if(DEFINED RVS_ROCMSMI) - endif() - - --if(NOT EXISTS "${ROCR_LIB_DIR}/lib${HIP_HCC_LIB}.so") -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS "${HIP_PATH}/lib/lib${HIP_HCC_LIB}.so") -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_PATH/lib/ path. Current value is : " ${HIP_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) -+include_directories(./ ../ ${HIP_PATH} ${ROCBLAS_INC_DIR} ${HIP_PATH}/include/) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HIP_PATH}/lib/ ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt -index 98949c3..ad59b93 100644 ---- a/pesm.so/CMakeLists.txt -+++ b/pesm.so/CMakeLists.txt -@@ -118,7 +118,7 @@ endif() - ## define include directories - include_directories(./ ../ pci) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HSAKMT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) - -diff --git a/pqt.so/CMakeLists.txt b/pqt.so/CMakeLists.txt -index 1f71fb3..e03c3ef 100644 ---- a/pqt.so/CMakeLists.txt -+++ b/pqt.so/CMakeLists.txt -@@ -123,7 +123,6 @@ set(CMAKE_C_COMPILER "${HIPCC_PATH}/bin/hipcc") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${HIP_HCC_BUILD_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HIP_HCC_BUILD_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ASAN_LD_FLAGS}") --set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ASAN_LD_FLAGS}") - - if(BUILD_ADDRESS_SANITIZER) - execute_process(COMMAND ${CMAKE_CXX_COMPILER} --print-file-name=libclang_rt.asan-x86_64.so -@@ -134,20 +133,20 @@ else() - endif() - - # Determine Roc Runtime header files are accessible --if(NOT EXISTS ${ROCR_INC_DIR}/hsa/hsa.h) -- message("ERROR: ROC Runtime headers can't be found under specified path. Please set ROCR_INC_DIR path. Current value is : " ${ROCR_INC_DIR}) -+if(NOT EXISTS ${HSA_PATH}/include/hsa/hsa.h) -+ message("ERROR: ROC Runtime headers can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) - RETURN() - endif() - --if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) -- message("ERROR: ROC Runtime libraries can't be found under specified path. Please set ROCR_LIB_DIR path. Current value is : " ${ROCR_LIB_DIR}) -+if(NOT EXISTS ${HSA_PATH}/lib/${CORE_RUNTIME_LIBRARY}.so) -+ message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HSA_PATH path. Current value is : " ${HSA_PATH}) - RETURN() - endif() - - ## define include directories --include_directories(./ ../ pci ${ROCR_INC_DIR}) -+include_directories(./ ../ pci ${HSA_PATH}/include/) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${HSA_PATH}/lib/ ${HSAKMT_LIB_DIR} ${ROCT_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib libpthread.so libpci.so libm.so) - -diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt -index 5aabaaa..49e858e 100644 ---- a/rcqt.so/CMakeLists.txt -+++ b/rcqt.so/CMakeLists.txt -@@ -120,7 +120,7 @@ endif() - ## define include directories - include_directories(./ ../) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${ASAN_LIB_PATH} ${ASAN_LIB_PATH} ${HSAKMT_LIB_DIR}) - ## additional libraries - set (PROJECT_LINK_LIBS rvslibrt rvslib) - -diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt -index 642902c..a01b00f 100644 ---- a/rvslib/CMakeLists.txt -+++ b/rvslib/CMakeLists.txt -@@ -120,7 +120,7 @@ endif() - - ## define include directories - include_directories(./ ../ -- ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} -+ ${ROCM_SMI_INC_DIR} ${HIP_PATH} ${ROCBLAS_INC_DIR} ${HIP_PATH}/include/ - ) - link_directories(${ASAN_LIB_PATH}) - -diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt -index 678c980..53e0aa9 100644 ---- a/testif.so/CMakeLists.txt -+++ b/testif.so/CMakeLists.txt -@@ -119,7 +119,7 @@ endif() - ## define include directories - include_directories(./ ../ pci) - # Add directories to look for library files to link --link_directories(${RVS_LIB_DIR} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) -+link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH}) - ## additional libraries - set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) - diff --git a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py index 48af36a534..83778f4a6a 100644 --- a/var/spack/repos/builtin/packages/rocm-validation-suite/package.py +++ b/var/spack/repos/builtin/packages/rocm-validation-suite/package.py @@ -44,7 +44,7 @@ class RocmValidationSuite(CMakePackage): patch('003-cmake-change-to-remove-installs-and-sudo.patch', when='@4.1.0:4.3.2') patch('004-remove-git-download-yaml-cpp-use-yaml-cpp-recipe.patch', when='@4.3.0:4.3.2') patch('005-cleanup-path-reference-donot-download-googletest-yaml.patch', when='@4.5.0:') - patch('007-library-path.patch', when='@4.5.0:') + patch('006-library-path.patch', when='@4.5.0:') depends_on('cmake@3.5:', type='build') depends_on('zlib', type='link') @@ -76,7 +76,6 @@ class RocmValidationSuite(CMakePackage): args = [ self.define('HIP_PATH', self.spec['hip'].prefix), self.define('HSA_PATH', self.spec['hsa-rocr-dev'].prefix), - self.define('HSAKMT_LIB_DIR', self.spec['hsakmt-roct'].prefix.lib), self.define('ROCM_SMI_DIR', self.spec['rocm-smi-lib'].prefix), self.define('ROCBLAS_DIR', self.spec['rocblas'].prefix), self.define('YAML_INC_DIR', self.spec['yaml-cpp'].prefix.include), @@ -88,4 +87,8 @@ class RocmValidationSuite(CMakePackage): if not os.path.isdir(libloc): libloc = self.spec['googletest'].prefix.lib args.append(self.define('UT_LIB', libloc)) + libloc = self.spec['hsakmt-roct'].prefix.lib64 + if not os.path.isdir(libloc): + libloc = self.spec['hsakmt-roct'].prefix.lib + args.append(self.define('HSAKMT_LIB_DIR', libloc)) return args -- cgit v1.2.3-70-g09d2