From d6119d8f49be6149c176f3de34a9e65cd7a20064 Mon Sep 17 00:00:00 2001 From: msglm Date: Thu, 19 Jun 2025 19:25:22 -0500 Subject: import guix-hpc amd modules and add gfx1100 support --- .../patches/rocm-bandwidth-test-reorg.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 amd/packages/patches/rocm-bandwidth-test-reorg.patch (limited to 'amd/packages/patches/rocm-bandwidth-test-reorg.patch') diff --git a/amd/packages/patches/rocm-bandwidth-test-reorg.patch b/amd/packages/patches/rocm-bandwidth-test-reorg.patch new file mode 100644 index 0000000..2186f62 --- /dev/null +++ b/amd/packages/patches/rocm-bandwidth-test-reorg.patch @@ -0,0 +1,48 @@ +hsa-runtime64 is provided through rocr-runtime; this patch removes +CMake paths that tries to resolve hsa-runtime64 using opt/rocm. +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a2172e7..762acfd 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -134,41 +134,6 @@ include(utils) + # This scheme could fail when using older builds of ROCm. In such a case the + # build system relies on user defined locations to find header and library files + find_package(hsa-runtime64 PATHS /opt/rocm ) +-if(${hsa-runtime64_FOUND}) +- # hsa-runtime config files will provide the include path via INSTALL_INTERFACE +- message("hsa-runtime64 found @ ${hsa-runtime64_DIR} ") +- set(RBT_HSA_VERSION_MAJ ${hsa-runtime64_VERSION_MAJOR} ) +- set(RBT_HSA_VERSION_MIN ${hsa-runtime64_VERSION_MINOR} ) +- set(RBT_HSA_VERSION_PATCH ${hsa-runtime64_VERSION_PATCH} ) +- # With file reorg changes +- # Actual header files /opt/rocm-ver/include/hsa/ +- # Wrapper header file /opt/rocm-ver/hsa/include/hsa/ +- # Rocm 5.3.0 will have Hsa file reorg changes. Corresponding Hsa package version is 1056300 +- # If hsa package version greater than or equal to file reorg version,use hsa/hsa.h else use hsa.h +- math(EXPR RBT_HSA_VERSION_FILEREORG "1056300") +- add_compile_options(-DRBT_HSA_VERSION_FILEREORG=${RBT_HSA_VERSION_FILEREORG}) +- +- if( (RBT_HSA_VERSION_MAJ GREATER 999) OR (RBT_HSA_VERSION_MIN GREATER 999) ) +- # Build will fail ,if package version is invalid +- message(FATAL_ERROR "RBT hsa-runtime64: Too big HSA runtime version number(s)" ) +- else() # if valid hsa package version +- # find the hsa package version and set flat version +- math(EXPR RBT_HSA_VERSION_FLAT "(${RBT_HSA_VERSION_MAJ}*1000000+${RBT_HSA_VERSION_MIN}*1000+${RBT_HSA_VERSION_PATCH})" ) +- add_compile_options(-DRBT_HSA_VERSION_FLAT=${RBT_HSA_VERSION_FLAT}) +- endif() +-else() +- message("find_package did NOT find hsa-runtime64, finding it the OLD Way") +- message("Looking for header files in ${ROCR_INC_DIR}") +- message("Looking for library files in ${ROCR_LIB_DIR}") +- +- # Search for ROCr header file in user defined locations +- # Since the search is for hsa/hsa.h and the default include is "hsa/hsa.h", this will support all version of rocm +- find_path(ROCR_HDR hsa/hsa.h PATHS ${ROCR_INC_DIR} "/opt/rocm" PATH_SUFFIXES include REQUIRED) +- INCLUDE_DIRECTORIES(${ROCR_HDR}) +- +- # Search for ROCr library file in user defined locations +- find_library(ROCR_LIB ${CORE_RUNTIME_TARGET} PATHS ${ROCR_LIB_DIR} "/opt/rocm" PATH_SUFFIXES lib lib64 REQUIRED) +-endif() + + # + # Set the package version for the test. It is critical that this -- cgit v1.2.3