diff --git a/CMakeLists.txt b/CMakeLists.txt index 77065a7a..7b17bf73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,8 @@ if(rocblas_FOUND) set(RVS_ROCBLAS_VERSION_MAJ ${rocblas_VERSION_MAJOR} ) set(RVS_ROCBLAS_VERSION_MIN ${rocblas_VERSION_MINOR} ) set(RVS_ROCBLAS_VERSION_PAT ${rocblas_VERSION_PATCH} ) + set(ROCBLAS_INC_DIR ${rocblas_INCLUDE_DIR} ) + get_filename_component(ROCBLAS_LIB_DIR "${ROCBLAS_INC_DIR}/../lib" ABSOLUTE) if( (RVS_ROCBLAS_VERSION_MAJ GREATER 999) OR (RVS_ROCBLAS_VERSION_MIN GREATER 999) OR (RVS_ROCBLAS_VERSION_PAT GREATER 999) ) message(FATAL_ERROR "RVS rocblas: Too big ROCBLAS version number(s)" ) @@ -73,6 +75,69 @@ else() #If ROCBLAS not found message(FATAL_ERROR "rocblas not found !!! Install rocblas to proceed ...") endif(rocblas_FOUND) +find_package (hipblaslt) +if(hipblaslt_FOUND) + message(STATUS "hipblaslt found") + set(HIPBLASLT_INC_DIR ${hipblaslt_INCLUDE_DIR} ) + get_filename_component(HIPBLASLT_LIB_DIR "${HIPBLASLT_INC_DIR}/../lib" ABSOLUTE) +else() #If HIPBLASLT not found + message(FATAL_ERROR "hipblaslt not found !!! Install hipblaslt to proceed ...") +endif(hipblaslt_FOUND) + +find_package (hsa-runtime64) +if(hsa-runtime64_FOUND) + message(STATUS "hsa-runtime64 found") + get_target_property(HSA_INC_DIR hsa-runtime64::hsa-runtime64 INTERFACE_INCLUDE_DIRECTORIES) + get_filename_component(HSA_PATH "${HSA_INC_DIR}/.." ABSOLUTE) + get_filename_component(HSA_LIB_DIR "${HSA_PATH}/lib" ABSOLUTE) + set(ROCR_INC_DIR ${HSA_INC_DIR}) + set(ROCR_LIB_DIR ${HSA_LIB_DIR}) +else() #If HSA not found + message(FATAL_ERROR "hsa not found !!! Install hsa to proceed ...") +endif(hsa-runtime64_FOUND) + +find_package (hip) +if(hip_FOUND) + set(HIP_INC_DIR ${hip_INCLUDE_DIR}) + set(HIP_LIB_DIR ${hip_LIB_INSTALL_DIR}) +else() #If HIP not found + message(FATAL_ERROR "hip not found !!! Install hip to proceed ...") +endif(hip_FOUND) + +find_package (rocm_smi) +if(rocm_smi_FOUND) + message(STATUS "rocm_smi found") + set(ROCM_SMI_INC_DIR ${rocm_smi_INCLUDE_DIR} ) + set(ROCM_SMI_LIB_DIR ${rocm_smi_LIB_DIR} ) +else() #If ROCM_SMI not found + message(FATAL_ERROR "rocm-smi not found !!! Install rocm-smi to proceed ...") +endif(rocm_smi_FOUND) + +find_package (hiprand) +if(hiprand_FOUND) + message(STATUS "hiprand found") + set(HIPRAND_INC_DIR ${hiprand_INCLUDE_DIR} ) + get_filename_component(HIPRAND_LIB_DIR "${hiprand_INCLUDE_DIR}/../lib" ABSOLUTE) +else() #If HIPRAND not found + message(FATAL_ERROR "hiprand not found !!! Install hiprand to proceed ...") +endif(hiprand_FOUND) + +find_package (rocrand) +if(rocrand_FOUND) + message(STATUS "rocrand found") + set(ROCRAND_INC_DIR ${rocrand_INCLUDE_DIR} ) + get_filename_component(ROCRAND_LIB_DIR "${rocrand_INCLUDE_DIR}/../lib" ABSOLUTE) +else() #If ROCRAND not found + message(FATAL_ERROR "rocrand not found !!! Install rocrand to proceed ...") +endif(rocrand_FOUND) + +find_package(hipblas-common) +if(hipblas-common_FOUND) + message(STATUS "rocrand found") +else() #If hipblas-common not found + message(FATAL_ERROR "hipblas-common not found !!! Install rocrand to proceed ...") +endif(hipblas-common_FOUND) + # Making ROCM_PATH, CMAKE_INSTALL_PREFIX, CPACK_PACKAGING_INSTALL_PREFIX as CACHE # variables since we will pass them as cmake params appropriately, and # all find_packages relevant to this build will be in ROCM path hence appending it to CMAKE_PREFIX_PATH @@ -80,10 +145,6 @@ set(ROCM_PATH "/opt/rocm" CACHE PATH "ROCM install path") set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "CMAKE installation directory") set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/rocm" CACHE PATH "Prefix used in built packages") list(APPEND CMAKE_PREFIX_PATH "${ROCM_PATH}") -set(ROCR_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Runtime" FORCE) -set(ROCR_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Runtime" FORCE) -set(HIP_INC_DIR "${ROCM_PATH}" CACHE PATH "Contains header files exported by ROC Runtime") -set(ROCT_INC_DIR "${ROCM_PATH}/include" CACHE PATH "Contains header files exported by ROC Trunk" FORCE) add_definitions(-DROCM_PATH="${ROCM_PATH}") if(FETCH_ROCMPATH_FROM_ROCMCORE) @@ -229,16 +290,6 @@ set(RVS_ROCMSMI "0" CACHE STRING "1 = use local rocm_smi_lib") set(RVS_LIB_DIR "${CMAKE_BINARY_DIR}/rvslib" CACHE PATH "Contains RVS library") -if (${RVS_OS_TYPE} STREQUAL "centos") - set(ROCT_LIB_DIR "${ROCM_PATH}/lib64" CACHE PATH "Contains library files exported by ROC Trunk") -elseif (${RVS_OS_TYPE} STREQUAL "rhel") - set(ROCT_LIB_DIR "${ROCM_PATH}/lib64" CACHE PATH "Contains library files exported by ROC Trunk") -elseif (${RVS_OS_TYPE} STREQUAL "sles") - set(ROCT_LIB_DIR "${ROCM_PATH}/lib64" CACHE PATH "Contains library files exported by ROC Trunk") -else() - set(ROCT_LIB_DIR "${ROCM_PATH}/lib" CACHE PATH "Contains library files exported by ROC Trunk") -endif() - message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") message(STATUS "RVS_COVERAGE = ${RVS_COVERAGE}") message(STATUS "RVS_BUILD_TESTS = ${RVS_BUILD_TESTS}") @@ -447,34 +498,14 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/rvs_smi-build/librocm_smi64.so endif() # if (RVS_ROCMSMI EQUAL 1) -set(HIPRAND_INC_DIR "${ROCM_PATH}/include") -set(HIPRAND_LIB_DIR "${ROCM_PATH}/lib") -set(HIPBLASLT_INC_DIR "${ROCM_PATH}/include") -set(HIPBLASLT_LIB_DIR "${ROCM_PATH}/lib") - if (RVS_ROCBLAS EQUAL 1) set(ROCBLAS_INC_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install") set(ROCBLAS_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_rblas-src/build/release/rocblas-install/lib/") -else() - set(ROCBLAS_INC_DIR "${ROCM_PATH}/include") - set(ROCBLAS_LIB_DIR "${ROCM_PATH}/lib") endif() if (RVS_ROCMSMI EQUAL 1) set(ROCM_SMI_INC_DIR "${CMAKE_BINARY_DIR}/rvs_smi-src/include") set(ROCM_SMI_LIB_DIR "${CMAKE_BINARY_DIR}/rvs_smi-build") -else() - #NOTE:Include folders need to be updated to latest include dir as per REORG Folder structure. - #For backward compatibility we are currently using version details to determine the include path - #Current Work Around to check ROCMSMI Version is using ROCBLAS REORG VERSION - if( RVS_ROCBLAS_VERSION_FLAT LESS 2044000 ) - set(ROCM_SMI_INC_DIR "${ROCM_PATH}/rocm_smi/include") - set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/rocm_smi/lib") - else() - message( STATUS "ROCBLAS REORG Enabled Version: ${RVS_ROCBLAS_VERSION_FLAT}" ) - set(ROCM_SMI_INC_DIR "${ROCM_PATH}/include") - set(ROCM_SMI_LIB_DIR "${ROCM_PATH}/lib") - endif() endif() set(ROCM_SMI_LIB "rocm_smi64" CACHE STRING "rocm_smi library name") diff --git a/babel.so/CMakeLists.txt b/babel.so/CMakeLists.txt index ca29a5b7..b228d1ab 100644 --- a/babel.so/CMakeLists.txt +++ b/babel.so/CMakeLists.txt @@ -59,7 +59,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") set(HIP_STREAM_BUILD_FLAGS "-DNONTEMPORAL=1 -DTBSIZE=1024 -O3 -std=c++17") @@ -109,12 +109,12 @@ set(HIP_HCC_LIB "amdhip64") add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT}) # Determine Roc Runtime header files are accessible -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() @@ -135,8 +135,8 @@ 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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() @@ -144,7 +144,7 @@ endif() include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) # 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} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) diff --git a/cmake_modules/tests_unit.cmake b/cmake_modules/tests_unit.cmake index 9760b72c..81567cf6 100644 --- a/cmake_modules/tests_unit.cmake +++ b/cmake_modules/tests_unit.cmake @@ -27,7 +27,7 @@ ## define additional unit testing include directories include_directories(${UT_INC}) ## define additional unit testing lib directories -link_directories(${UT_LIB} ${RVS_LIB_DIR}) +link_directories(${UT_LIB} ${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) file(GLOB TESTSOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/test*.cpp ) #message ( "TESTSOURCES: ${TESTSOURCES}" ) diff --git a/edp.so/CMakeLists.txt b/edp.so/CMakeLists.txt index 4466edcd..a6ebb580 100644 --- a/edp.so/CMakeLists.txt +++ b/edp.so/CMakeLists.txt @@ -92,7 +92,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR}") # Set compiler and compiler flags @@ -102,12 +102,12 @@ 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) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() @@ -128,15 +128,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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() ## define include directories -include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) +include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${YAML_CPP_INCLUDE_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR}) # 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} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpciaccess.so libpci.so libm.so) @@ -148,7 +148,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES}) set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB}) +target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${HIP_HCC_LIB} ${ROCBLAS_LIB} ${HIPRAND_LIB} ${ROCRAND_LIB}) add_dependencies(${RVS_TARGET} rvslib) add_custom_command(TARGET ${RVS_TARGET} POST_BUILD diff --git a/gm.so/CMakeLists.txt b/gm.so/CMakeLists.txt index d3caa84d..767729f4 100644 --- a/gm.so/CMakeLists.txt +++ b/gm.so/CMakeLists.txt @@ -90,7 +90,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -118,9 +118,9 @@ if(DEFINED RVS_ROCMSMI) endif() ## define include directories -include_directories(./ ../ ${ROCM_SMI_INC_DIR}) +include_directories(./ ../ ${ROCM_SMI_INC_DIR} ${YAML_CPP_INCLUDE_DIR}) # Add directories to look for library files to link -link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH}) +link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) diff --git a/gm.so/tests.cmake b/gm.so/tests.cmake index 71dabc80..9c53373c 100644 --- a/gm.so/tests.cmake +++ b/gm.so/tests.cmake @@ -26,16 +26,15 @@ set(ROCBLAS_LIB "rocblas") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so "lib${ROCM_SMI_LIB}.so" - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link -link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR}) +link_directories(${ROCM_SMI_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR} ${HSA_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) set (UT_SOURCES src/action.cpp src/worker.cpp ) diff --git a/gpup.so/CMakeLists.txt b/gpup.so/CMakeLists.txt index 43d337aa..6d794094 100644 --- a/gpup.so/CMakeLists.txt +++ b/gpup.so/CMakeLists.txt @@ -89,7 +89,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -109,9 +109,9 @@ else() endif() ## define include directories -include_directories(./ ../ include ../include) +include_directories(./ ../ include ../include ${YAML_CPP_INCLUDE_DIR}) # 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} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${ROCR_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpci.so libm.so) diff --git a/gpup.so/tests.cmake b/gpup.so/tests.cmake index 566508f3..50487c50 100644 --- a/gpup.so/tests.cmake +++ b/gpup.so/tests.cmake @@ -26,15 +26,14 @@ set(ROCBLAS_LIB "rocblas") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") set(UT_LINK_LIBS libpthread.so libm.so libdl.so ${ROCM_SMI_LIB} - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) + ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) # Add directories to look for library files to link -link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR}) +link_directories(${RVS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) set (UT_SOURCES src/action.cpp ) diff --git a/gst.so/CMakeLists.txt b/gst.so/CMakeLists.txt index fd346ced..9b45dbe7 100644 --- a/gst.so/CMakeLists.txt +++ b/gst.so/CMakeLists.txt @@ -92,7 +92,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -111,12 +111,12 @@ else() endif() # Determine Roc Runtime header files are accessible -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() @@ -137,15 +137,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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() ## define include directories -include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) +include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${HIPBLASLT_INC_DIR} ${HIPBLAS-COMMON_INCLUDE_DIR}) # 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} ${ROCR_LIB_DIR} ${HIP_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_DIR} ${ROCRAND_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) diff --git a/iet.so/CMakeLists.txt b/iet.so/CMakeLists.txt index 002c03c1..4d5880a2 100644 --- a/iet.so/CMakeLists.txt +++ b/iet.so/CMakeLists.txt @@ -95,7 +95,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -115,17 +115,17 @@ else() endif() # Determine Roc Runtime header files are accessible -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_ext.h) +if(NOT EXISTS ${HIP_INC_DIR}/hip/hip_ext.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}) RETURN() endif() @@ -145,8 +145,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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() @@ -160,9 +160,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} ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${HIPBLASLT_INC_DIR} ${HIPBLAS-COMMON_INCLUDE_DIR}) # 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} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) diff --git a/mem.so/CMakeLists.txt b/mem.so/CMakeLists.txt index 5133337e..f9702bf9 100644 --- a/mem.so/CMakeLists.txt +++ b/mem.so/CMakeLists.txt @@ -59,7 +59,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -108,12 +108,12 @@ set(HIP_HCC_LIB "amdhip64") add_compile_options(-DRVS_ROCBLAS_VERSION_FLAT=${RVS_ROCBLAS_VERSION_FLAT}) # Determine Roc Runtime header files are accessible -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() @@ -134,16 +134,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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() ## define include directories -include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR}) +include_directories(./ ../ ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR}) # 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} ${ROCR_LIB_DIR} ${HIP_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) diff --git a/pbqt.so/CMakeLists.txt b/pbqt.so/CMakeLists.txt index 5ae675ae..50eacd25 100644 --- a/pbqt.so/CMakeLists.txt +++ b/pbqt.so/CMakeLists.txt @@ -87,9 +87,7 @@ add_compile_options(-DLIB_VERSION_STRING="${LIB_VERSION_STRING}") add_compile_options(-DBUILD_VERSION_STRING="${BUILD_VERSION_STRING}") # Set project requirements -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") -set(ROC_THUNK_LIBRARY "lib${ROC_THUNK_NAME}") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") set(CORE_RUNTIME_LIBRARY "lib${CORE_RUNTIME_TARGET}") @@ -106,7 +104,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -136,9 +134,9 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) endif() ## define include directories -include_directories(./ ../ pci ${ROCR_INC_DIR}) +include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR}) # 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} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) @@ -151,7 +149,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES}) set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_TARGET} ${ROC_THUNK_NAME}) +target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_TARGET}) add_dependencies(${RVS_TARGET} rvslib) add_custom_command(TARGET ${RVS_TARGET} POST_BUILD diff --git a/pebb.so/CMakeLists.txt b/pebb.so/CMakeLists.txt index c4e29640..56689693 100644 --- a/pebb.so/CMakeLists.txt +++ b/pebb.so/CMakeLists.txt @@ -87,9 +87,7 @@ add_compile_options(-DLIB_VERSION_STRING="${LIB_VERSION_STRING}") add_compile_options(-DBUILD_VERSION_STRING="${BUILD_VERSION_STRING}") # Set project requirements -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") -set(ROC_THUNK_LIBRARY "lib${ROC_THUNK_NAME}") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") set(CORE_RUNTIME_LIBRARY "lib${CORE_RUNTIME_TARGET}") @@ -107,7 +105,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -137,9 +135,9 @@ if(NOT EXISTS ${ROCR_LIB_DIR}/${CORE_RUNTIME_LIBRARY}.so) endif() ## define include directories -include_directories(./ ../ pci ${ROCR_INC_DIR}) +include_directories(./ ../ pci ${ROCR_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR}) # 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} ${ROCR_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) @@ -152,7 +150,7 @@ add_library( ${RVS_TARGET} SHARED ${SOURCES}) set_target_properties(${RVS_TARGET} PROPERTIES SUFFIX .so.${LIB_VERSION_STRING} LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) -target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_TARGET} ${ROC_THUNK_NAME}) +target_link_libraries(${RVS_TARGET} ${PROJECT_LINK_LIBS} ${CORE_RUNTIME_TARGET}) add_dependencies(${RVS_TARGET} rvslib) add_custom_command(TARGET ${RVS_TARGET} POST_BUILD diff --git a/peqt.so/CMakeLists.txt b/peqt.so/CMakeLists.txt index ead507d7..eff0fa0b 100644 --- a/peqt.so/CMakeLists.txt +++ b/peqt.so/CMakeLists.txt @@ -87,7 +87,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -107,9 +107,9 @@ else() endif() ## define include directories -include_directories(./ ../) +include_directories(./ ../ ${HSA_INC_DIR}) # 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} ${HSA_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpci.so libm.so) diff --git a/perf.so/CMakeLists.txt b/perf.so/CMakeLists.txt index 518dac99..62dbc916 100644 --- a/perf.so/CMakeLists.txt +++ b/perf.so/CMakeLists.txt @@ -92,7 +92,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -111,12 +111,12 @@ else() endif() # Determine Roc Runtime header files are accessible -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() @@ -137,15 +137,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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() ## define include directories -include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR}) +include_directories(./ ../ ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${HIPBLASLT_INC_DIR} ${HIPBLAS-COMMON_INCLUDE_DIR}) # 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} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${HIP_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR} ${ROCRAND_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpthread.so libpci.so libm.so) diff --git a/pesm.so/CMakeLists.txt b/pesm.so/CMakeLists.txt index 1f27f343..3ccec31b 100644 --- a/pesm.so/CMakeLists.txt +++ b/pesm.so/CMakeLists.txt @@ -88,7 +88,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -109,7 +109,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} ${ROCR_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR} ${HIPRAND_DIR} ${ROCRAND_DIR}) ## additional libraries set (PROJECT_LINK_LIBS libpthread.so libpci.so libm.so) diff --git a/pesm.so/tests.cmake b/pesm.so/tests.cmake index e2551445..23c0d8c0 100644 --- a/pesm.so/tests.cmake +++ b/pesm.so/tests.cmake @@ -26,16 +26,15 @@ set(ROCBLAS_LIB "rocblas") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so "lib${ROCM_SMI_LIB}.so" - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link -link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR}) +link_directories(${ROCM_SMI_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) set (UT_SOURCES test/unitactionbase.cpp ) diff --git a/rcqt.so/CMakeLists.txt b/rcqt.so/CMakeLists.txt index c0099ab7..1de2fbef 100644 --- a/rcqt.so/CMakeLists.txt +++ b/rcqt.so/CMakeLists.txt @@ -88,7 +88,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -110,7 +110,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} ${ROCM_SMI_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib) diff --git a/rvs/CMakeLists.txt b/rvs/CMakeLists.txt index 5c1c124c..11cc7889 100644 --- a/rvs/CMakeLists.txt +++ b/rvs/CMakeLists.txt @@ -93,7 +93,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -113,13 +113,12 @@ else() endif() ## define include directories -include_directories(./ ../ ${YAML_CPP_INCLUDE_DIRS}) +include_directories(./ ../ ${YAML_CPP_INCLUDE_DIR}) ## define lib directories -link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR}) +link_directories(${CMAKE_CURRENT_BINARY_DIR} ${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ASAN_LIB_PATH} ${HIPRAND_LIB_DIR} ${HSA_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) ## additional libraries set(ROCBLAS_LIB "rocblas") -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") @@ -129,7 +128,7 @@ set(PROJECT_LINK_LIBS libdl.so libpthread.so libpci.so ${YAML_CPP_LIBRARIES}) ## define target add_executable(${RVS_TARGET} src/rvs.cpp) target_link_libraries(${RVS_TARGET} rvslib - ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) + ${ROCBLAS_LIB} ${ROCM_SMI_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${PROJECT_LINK_LIBS} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) add_dependencies(${RVS_TARGET} rvslib) install(TARGETS ${RVS_TARGET} diff --git a/rvs/tests.cmake b/rvs/tests.cmake index 15e72c27..cefddd65 100644 --- a/rvs/tests.cmake +++ b/rvs/tests.cmake @@ -33,17 +33,16 @@ set(ROCBLAS_LIB "rocblas") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") ## define lib directories -link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${HIPRAND_LIB_DIR}) +link_directories(${RVS_LIB_DIR} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${HIPRAND_LIB_DIR}) ## define target for "test-to-fail" add_executable(${RVS_TARGET}fail src/rvs.cpp) target_link_libraries(${RVS_TARGET}fail rvslib rvslibut ${PROJECT_LINK_LIBS} - ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${ROCM_CORE} ${CORE_RUNTIME_TARGET} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) + ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROCM_CORE} ${CORE_RUNTIME_TARGET} ${HIPRAND_LIB} ${HIPBLASLT_LIB}) target_compile_definitions(${RVS_TARGET}fail PRIVATE RVS_INVERT_RETURN_STATUS) set_target_properties(${RVS_TARGET}fail PROPERTIES @@ -191,7 +190,7 @@ add_test(NAME unit.ttf.rvs.config.noconfig ## define include directories include_directories(${UT_INC}) ## define lib directories -link_directories(${UT_LIB} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR}) +link_directories(${UT_LIB} ${ROCBLAS_LIB_DIR} ${ROCM_SMI_LIB_DIR}) ## additional libraries for unit tests set (PROJECT_TEST_LINK_LIBS ${PROJECT_LINK_LIBS} libpci.so) @@ -212,7 +211,7 @@ FOREACH(SINGLE_TEST ${TESTSOURCES}) ${PROJECT_LINK_LIBS} ${PROJECT_TEST_LINK_LIBS} rvslib rvslibut gtest_main gtest pthread - ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCM_SMI_LIB} ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) add_dependencies(${TEST_NAME} rvs_gtest_target) diff --git a/rvslib/CMakeLists.txt b/rvslib/CMakeLists.txt index 53b5755b..d3ea8afa 100644 --- a/rvslib/CMakeLists.txt +++ b/rvslib/CMakeLists.txt @@ -96,7 +96,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") #Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -116,7 +116,7 @@ endif() ## define include directories include_directories(./ ../ ../rvs - ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${HIPBLASLT_INC_DIR}) + ${ROCM_SMI_INC_DIR} ${ROCR_INC_DIR} ${ROCBLAS_INC_DIR} ${HIP_INC_DIR} ${HIPBLASLT_INC_DIR} ${YAML_CPP_INCLUDE_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${HIPBLAS-COMMON_INCLUDE_DIR}) link_directories(${ASAN_LIB_PATH} ${ROCM_SMI_LIB_DIR}) diff --git a/smqt.so/CMakeLists.txt b/smqt.so/CMakeLists.txt index 042586f5..2b4f6fa7 100644 --- a/smqt.so/CMakeLists.txt +++ b/smqt.so/CMakeLists.txt @@ -87,7 +87,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HIP_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") @@ -108,7 +108,7 @@ endif() ## define include directories include_directories(./ ../ pci) # 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} ${ROCR_LIB_DIR}) ## additional libraries set (PROJECT_LINK_LIBS rvslib libpci.so libm.so) diff --git a/smqt.so/tests.cmake b/smqt.so/tests.cmake index 8b6ea930..e1a3c1ed 100644 --- a/smqt.so/tests.cmake +++ b/smqt.so/tests.cmake @@ -26,16 +26,15 @@ set(ROCBLAS_LIB "rocblas") set(HIPRAND_LIB "hiprand") set(HIPBLASLT_LIB "hipblaslt") -set(ROC_THUNK_NAME "hsakmt") set(CORE_RUNTIME_NAME "hsa-runtime") set(CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64") set(UT_LINK_LIBS libpthread.so libpci.so libm.so libdl.so "lib${ROCM_SMI_LIB}.so" - ${ROCBLAS_LIB} ${ROC_THUNK_NAME} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} + ${ROCBLAS_LIB} ${CORE_RUNTIME_TARGET} ${ROCM_CORE} ${YAML_CPP_LIBRARIES} ${HIPRAND_LIB} ${HIPBLASLT_LIB} ) # Add directories to look for library files to link -link_directories(${ROCM_SMI_LIB_DIR} ${ROCT_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR}) +link_directories(${ROCM_SMI_LIB_DIR} ${ROCBLAS_LIB_DIR} ${HIPRAND_LIB_DIR} ${HIPBLASLT_LIB_DIR} ${YAML_CPP_LIBRARY_DIR}) set (UT_SOURCES src/action.cpp test/unitsmqt.cpp ) diff --git a/testif.so/CMakeLists.txt b/testif.so/CMakeLists.txt index 4cba0f9b..c0b9921e 100644 --- a/testif.so/CMakeLists.txt +++ b/testif.so/CMakeLists.txt @@ -88,7 +88,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HIP_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags set(CMAKE_CXX_COMPILER "${HIPCC_PATH}/bin/hipcc") diff --git a/tst.so/CMakeLists.txt b/tst.so/CMakeLists.txt index 1a1a8b05..6f2df406 100644 --- a/tst.so/CMakeLists.txt +++ b/tst.so/CMakeLists.txt @@ -95,7 +95,7 @@ endif() set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -DHIP_VERSION_MAJOR=${HIP_VERSION_MAJOR} -DHIP_VERSION_MINOR=${HIP_VERSION_MINOR} -DHIP_VERSION_PATCH=${HIP_VERSION_GITDATE}") set(HIP_HCC_BUILD_FLAGS) -set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_PATH}/include ${ASAN_CXX_FLAGS}") +set(HIP_HCC_BUILD_FLAGS "${HIP_HCC_BUILD_FLAGS} -fPIC ${HCC_CXX_FLAGS} -I${HSA_INC_DIR} ${ASAN_CXX_FLAGS}") # Set compiler and compiler flags @@ -115,12 +115,12 @@ else() endif() # Determine Roc Runtime header files are accessible -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() -if(NOT EXISTS ${HIP_INC_DIR}/include/hip/hip_runtime_api.h) +if(NOT EXISTS ${HIP_INC_DIR}/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}) RETURN() endif() @@ -140,8 +140,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_LIB_DIR}/lib${HIP_HCC_LIB}.so") + message("ERROR: ROC Runtime libraries can't be found under specified path. Please set HIP_LIB_DIR path. Current value is : " ${HIP_LIB_DIR}) RETURN() endif() @@ -155,7 +155,7 @@ 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} ${ROCR_INC_DIR} ${HIP_INC_DIR} ${HIPRAND_INC_DIR} ${ROCRAND_INC_DIR} ${HIPBLASLT_INC_DIR} ${HIPBLAS-COMMON_INCLUDE_DIR}) # 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}) ## additional libraries