diff options
author | John Kehayias <john.kehayias@protonmail.com> | 2023-07-11 12:03:40 -0400 |
---|---|---|
committer | John Kehayias <john.kehayias@protonmail.com> | 2023-07-11 12:21:00 -0400 |
commit | 15f9870eb36e688fac2af37828971779b6c56916 (patch) | |
tree | 00e27cf2624149a68b04c3723529a729993a5736 /gnu/packages/patches | |
parent | 0cce3ac36e7acdf7502a9d8dd313bf40055e1484 (diff) | |
download | guix-15f9870eb36e688fac2af37828971779b6c56916.tar.gz |
gnu: rocm: Update to 5.6.0.
Update all of the ROCm packages at the same time as they share a version number and should be upgraded together, including llvm-for-rocm. * gnu/packages/llvm.scm (llvm-for-rocm): Update to 5.6.0. [source]{patches}: Remove unneeded patches (linkdl and remove-isystem-usr-include). * gnu/packages/rocm.scm (rocm-cmake, roct-thunk-interface): Update to 5.6.0. (rocclr-src): Update to 5.6.0. [source]{patches}: Add enable-gfx800 patch. (rocm-device-libs): Update to 5.6.0. [inputs]: Update style. (rocm-comgr): Update to 5.6.0. [inputs]: Remove lld. Update style. (rocr-runtime): Update to 5.6.0. [arguments]: Use gexps. Remove configure-flags. Add add-rocm-device-lib-path phase. [inputs]: Add libdrm. Update style. [native-inputs]: Add pkg-config. Update style. (rocm-opencl-runtime): Update to 5.6.0. [source]{patches}: Remove noopencl patch. [arguments]{configure-flags}: Add BUILD_ICD=OFF and FILE_REORG_BACKWARD_COMPATIBILITY=OFF flags. [inputs]: Add opencl-headers. (rocminfo): Update to 5.6.0. [arguments]: Use gexps. Use search-input-file instead of assoc-ref and which. (rocm-bandwidth-test): Update to 5.6.0. [source]{patches}: Add fix-includes patch. * gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch: Update patches. * gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch, gnu/packages/patches/llvm-roc-5.0.0-linkdl.patch, gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch: Delete files. * gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch, gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch: New files. * gnu/local.mk (dist_patch_DATA): Update patches.
Diffstat (limited to 'gnu/packages/patches')
7 files changed, 125 insertions, 143 deletions
diff --git a/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch b/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch deleted file mode 100644 index f14ec4ac0d..0000000000 --- a/gnu/packages/patches/llvm-roc-4.0.0-remove-isystem-usr-include.patch +++ /dev/null @@ -1,29 +0,0 @@ -Author: Wilfried (justxi) Holzke - -Adopted from https://github.com/justxi/rocm/blob/master/sys-devel/llvm-roc/files/llvm-roc-4.0.0-remove-isystem-usr-include.patch - -Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -=================================================================== ---- llvm-project-rocm-4.0.0.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp -+++ llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp -@@ -326,11 +326,6 @@ void RocmInstallationDetector::AddHIPInc - // - // ROCm 3.5 does not fully support the wrapper headers. Therefore it needs - // a workaround. -- SmallString<128> P(D.ResourceDir); -- if (UsesRuntimeWrapper) -- llvm::sys::path::append(P, "include", "cuda_wrappers"); -- CC1Args.push_back("-internal-isystem"); -- CC1Args.push_back(DriverArgs.MakeArgString(P)); - } - - if (DriverArgs.hasArg(options::OPT_nogpuinc)) -@@ -341,8 +336,6 @@ void RocmInstallationDetector::AddHIPInc - return; - } - -- CC1Args.push_back("-internal-isystem"); -- CC1Args.push_back(DriverArgs.MakeArgString(getIncludePath())); - if (UsesRuntimeWrapper) - CC1Args.append({"-include", "__clang_hip_runtime_wrapper.h"}); - } diff --git a/gnu/packages/patches/llvm-roc-5.0.0-linkdl.patch b/gnu/packages/patches/llvm-roc-5.0.0-linkdl.patch deleted file mode 100644 index d6ed3aef93..0000000000 --- a/gnu/packages/patches/llvm-roc-5.0.0-linkdl.patch +++ /dev/null @@ -1,15 +0,0 @@ -Taken from the Gentoo patch: -https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/llvm-roc/files/llvm-roc-5.0.0-linkdl.patch - -LLVMOffloadArch should link libdl to fix undefined symbol 'dlsym' when linking - ---- a/llvm/lib/OffloadArch/offload-arch/CMakeLists.txt -+++ b/llvm/lib/OffloadArch/offload-arch/CMakeLists.txt -@@ -3,6 +3,7 @@ add_llvm_tool(offload-arch - ${CMAKE_CURRENT_SOURCE_DIR}/offload-arch.cpp - DEPENDS generated-table LLVMOffloadArch - ) -+target_link_libraries(LLVMOffloadArch PRIVATE ${CMAKE_DL_LIBS}) - target_link_libraries(offload-arch PRIVATE LLVMOffloadArch) - - if(CMAKE_HOST_UNIX) diff --git a/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch b/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch new file mode 100644 index 0000000000..2948234029 --- /dev/null +++ b/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch @@ -0,0 +1,16 @@ +#From xuhuisheng +#at https://github.com/RadeonOpenCompute/ROCm/issues/1659#issuecomment-1041026624 + +diff --git a/utils/flags.hpp b/utils/flags.hpp +index 8f0228cc..2eaa47c5 100644 +--- a/utils/flags.hpp ++++ b/utils/flags.hpp +@@ -245,7 +245,7 @@ release(bool, ROC_SYSTEM_SCOPE_SIGNAL, true, \ + "Enable system scope for signals (uses interrupts).") \ + release(bool, ROC_SKIP_COPY_SYNC, false, \ + "Skips copy syncs if runtime can predict the same engine.") \ +-release(bool, ROC_ENABLE_PRE_VEGA, false, \ ++release(bool, ROC_ENABLE_PRE_VEGA, true, \ + "Enable support of pre-vega ASICs in ROCm path") \ + release(bool, HIP_FORCE_QUEUE_PROFILING, false, \ + "Force command queue profiling by default") \ diff --git a/gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch b/gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch new file mode 100644 index 0000000000..a5404ad62c --- /dev/null +++ b/gnu/packages/patches/rocm-bandwidth-test-5.5.0-fix-includes.patch @@ -0,0 +1,79 @@ +See <https://github.com/RadeonOpenCompute/rocm_bandwidth_test/pull/90>. + +From a58f9fd4cb5d1120b9ce58c912ca87fa14720f73 Mon Sep 17 00:00:00 2001 +From: pppig236 <weikaik@umich.edu> +Date: Tue, 2 May 2023 15:19:52 -0400 +Subject: [PATCH] fix include for rocm 5.5.0 + +--- + base_test.hpp | 8 +------- + common.hpp | 11 ++--------- + rocm_bandwidth_test.hpp | 8 +------- + 3 files changed, 4 insertions(+), 23 deletions(-) + +diff --git a/base_test.hpp b/base_test.hpp +index 3e79de1..af99a85 100755 +--- a/base_test.hpp ++++ b/base_test.hpp +@@ -42,14 +42,8 @@ + + #ifndef ROC_BANDWIDTH_TEST_BASE_H_ + #define ROC_BANDWIDTH_TEST_BASE_H_ +-#if(defined(RBT_HSA_VERSION_FLAT) && ((RBT_HSA_VERSION_FLAT) < RBT_HSA_VERSION_FILEREORG)) +-// Hsa package with out file reorganization +-// This is for backward compatibility and will be deprecated from future release +-#include "hsa.h" +-#else + // Hsa package with file reorganization +-#include "hsa/hsa.h" +-#endif ++#include <hsa/hsa.h> + #include <iostream> + #include <string> + #include <vector> +diff --git a/common.hpp b/common.hpp +index d2933a0..3c4858f 100755 +--- a/common.hpp ++++ b/common.hpp +@@ -48,16 +48,9 @@ + #include <vector> + #include <cmath> + #include <stdio.h> +-#if(defined(RBT_HSA_VERSION_FLAT) && ((RBT_HSA_VERSION_FLAT) < RBT_HSA_VERSION_FILEREORG)) +-// Hsa package with out file reorganization +-// This is for backward compatibility and will be deprecated from future release +-#include "hsa.h" +-#include "hsa_ext_amd.h" +-#else + // Hsa package with file reorganization +-#include "hsa/hsa.h" +-#include "hsa/hsa_ext_amd.h" +-#endif ++#include <hsa/hsa.h> ++#include <hsa/hsa_ext_amd.h> + + using namespace std; + +diff --git a/rocm_bandwidth_test.hpp b/rocm_bandwidth_test.hpp +index f7eb338..b8550a7 100755 +--- a/rocm_bandwidth_test.hpp ++++ b/rocm_bandwidth_test.hpp +@@ -43,14 +43,8 @@ + #ifndef __ROC_BANDWIDTH_TEST_H__ + #define __ROC_BANDWIDTH_TEST_H__ + +-#if(defined(RBT_HSA_VERSION_FLAT) && ((RBT_HSA_VERSION_FLAT) < RBT_HSA_VERSION_FILEREORG)) +-// Hsa package with out file reorganization +-// This is for backward compatibility and will be deprecated from future release +-#include "hsa.h" +-#else + // Hsa package with file reorganization +-#include "hsa/hsa.h" +-#endif ++#include <hsa/hsa.h> + #include "base_test.hpp" + #include "common.hpp" + +-- +2.40.1 + diff --git a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch index fc2c74718a..6462b81eb9 100644 --- a/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch +++ b/gnu/packages/patches/rocm-comgr-3.1.0-dependencies.patch @@ -1,4 +1,5 @@ -https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25 +See https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/pull/25 for +original patch. From c65cba2e73f9118e128b9ab7e655ee0f8a7798e7 Mon Sep 17 00:00:00 2001 From: Craig Andrews <candrews@integralblue.com> @@ -12,23 +13,23 @@ Without these additional required dependencies, linking fails with errors such a 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/comgr/CMakeLists.txt b/lib/comgr/CMakeLists.txt -index 8b5ca2f..a7d226f 100644 +index fd3ae4a..131e581 100644 --- a/lib/comgr/CMakeLists.txt +++ b/lib/comgr/CMakeLists.txt -@@ -294,7 +294,11 @@ install(FILES - DESTINATION "${AMD_COMGR_PACKAGE_PREFIX}") +@@ -322,7 +322,11 @@ install(FILES - set(CLANG_LIBS -- clangFrontendTool) -+ clangFrontendTool -+ clangFrontend -+ clangBasic -+ clangDriver -+ clangSerialization) - - set(LLD_LIBS - lldELF -@@ -305,8 +309,21 @@ if (LLVM_LINK_LLVM_DYLIB) + if(TARGET clangFrontendTool) + set(CLANG_LIBS +- clangFrontendTool) ++ clangFrontendTool ++ clangFrontend ++ clangBasic ++ clangDriver ++ clangSerialization) + else() + set(CLANG_LIBS + clang-cpp) +@@ -337,8 +341,23 @@ if (LLVM_LINK_LLVM_DYLIB) else() llvm_map_components_to_libnames(LLVM_LIBS ${LLVM_TARGETS_TO_BUILD} @@ -38,6 +39,8 @@ index 8b5ca2f..a7d226f 100644 + Symbolize + Support + Object ++ TargetParser ++ Bitreader + BitWriter + MC + MCParser diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch index 97376fd421..65ad362307 100644 --- a/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch +++ b/gnu/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch @@ -1,14 +1,12 @@ Do not build and install clinfo. -diff --git a/CMakeLists.txt.orig b/CMakeLists.txt -index 76847d3..3f62bfe 100644 ---- a/CMakeLists.txt.orig +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0dc5bf4..95a12af 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -15,9 +15,9 @@ option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorganization backward co - - - set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "") - #add_subdirectory(khronos/icd) +@@ -27,7 +27,7 @@ else() + find_package(OpenCL REQUIRED) + endif() add_subdirectory(amdocl) -add_subdirectory(tools/clinfo) +#add_subdirectory(tools/clinfo) @@ -16,14 +14,14 @@ index 76847d3..3f62bfe 100644 if(BUILD_TESTS) add_subdirectory(tests/ocltst) diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index 48353eb..cd1e7c1 100644 +index a703f58..c07546a 100644 --- a/packaging/CMakeLists.txt +++ b/packaging/CMakeLists.txt -@@ -5,6 +5,6 @@ set(CPACK_COMPONENTS_ALL binary dev icd) +@@ -12,6 +12,6 @@ endif() set(CPACK_DEB_COMPONENT_INSTALL ON) set(CPACK_RPM_COMPONENT_INSTALL ON) --install(TARGETS clinfo DESTINATION bin COMPONENT binary) -+#install(TARGETS clinfo DESTINATION bin COMPONENT binary) - install(TARGETS amdocl DESTINATION lib COMPONENT binary) - install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION share/doc/${CMAKE_PROJECT_NAME} COMPONENT binary) +-install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary) ++#install(TARGETS clinfo DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT binary) + install(TARGETS amdocl DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT binary) + install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT binary) diff --git a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch b/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch deleted file mode 100644 index 9f80d7da9d..0000000000 --- a/gnu/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch +++ /dev/null @@ -1,70 +0,0 @@ -Do not build and install libOpenCL. - ---- b/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -15,9 +15,9 @@ option(FILE_REORG_BACKWARD_COMPATIBILITY "Enable File Reorganization backward co - - - set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_LIST_DIR}/khronos/headers/opencl2.2" CACHE PATH "") --add_subdirectory(khronos/icd) -+#add_subdirectory(khronos/icd) - add_subdirectory(amdocl) - add_subdirectory(tools/clinfo) - add_subdirectory(tools/cltrace) - if(BUILD_TESTS) - add_subdirectory(tests/ocltst) -@@ -25,16 +25,6 @@ endif() - - ###--- Packaging ------------------------------------------------------------### - --# DEV package --install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2/CL" -- DESTINATION include -- COMPONENT DEV -- USE_SOURCE_PERMISSIONS -- PATTERN cl_d3d10.h EXCLUDE -- PATTERN cl_d3d11.h EXCLUDE -- PATTERN cl_dx9_media_sharing.h EXCLUDE -- PATTERN cl_egl.h EXCLUDE) -- - ############################# - # Packaging steps - ############################# -@@ -53,8 +43,8 @@ if (DEFINED ROCM_PATCH_VERSION) - set(OPENCL_AMD_ICD_FILE "amdocl64_${ROCM_PATCH_VERSION}.icd") - endif() - --get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION) --get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION) -+#get_target_property(OPENCL_LIB_VERSION_MAJOR OpenCL SOVERSION) -+#get_target_property(OPENCL_LIB_VERSION_STRING OpenCL VERSION) - - #Set Package Version - set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) -diff --git a/khronos/icd/CMakeLists.txt b/khronos/icd/CMakeLists.txt -index 4bafa86..987dd6f 100644 ---- a/khronos/icd/CMakeLists.txt 2020-06-07 16:05:32.425022904 +0200 -+++ b/khronos/icd/CMakeLists.txt 2020-06-07 16:06:03.273022786 +0200 -@@ -132,7 +132,7 @@ if (BUILD_TESTING) - add_subdirectory (test) - endif() - --install (TARGETS OpenCL -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+#install (TARGETS OpenCL -+# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt -index 48353eb..cd1e7c1 100644 ---- a/packaging/CMakeLists.txt -+++ b/packaging/CMakeLists.txt -@@ -17,5 +17,5 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2/CL - PATTERN cl_dx9_media_sharing.h EXCLUDE - PATTERN cl_egl.h EXCLUDE ) - --install(TARGETS OpenCL DESTINATION lib COMPONENT icd ) -+#install(TARGETS OpenCL DESTINATION lib COMPONENT icd ) - install(FILES ${CMAKE_SOURCE_DIR}/khronos/icd/LICENSE DESTINATION share/doc/rocm-ocl-icd COMPONENT icd) |