diff options
Diffstat (limited to 'amd/packages')
24 files changed, 3149 insertions, 0 deletions
diff --git a/amd/packages/aocl-libs.scm b/amd/packages/aocl-libs.scm new file mode 100644 index 0000000..02c9ec4 --- /dev/null +++ b/amd/packages/aocl-libs.scm @@ -0,0 +1,192 @@ +;;; Copyright © 2024 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages aocl-libs) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix build-system cmake) + #:use-module (guix gexp) + #:use-module (guix licenses) + #:use-module (gnu packages gcc) + #:use-module (gnu packages mpi) + #:use-module (gnu packages python) + #:use-module (gnu packages perl)) + +(define-public aocl-blis-mt + (package + (name "aocl-blis-mt") + (version "4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/amd/blis.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1bphmkwdgan7936v329bg56byia92rq35znamagmpy9z32w7ixyn")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out")) + "-d opt" + "--enable-cblas" + "--enable-threading=openmp" + "zen3")))))) + (native-inputs (list python-wrapper perl)) + (synopsis "Basic Linear Algebra Subprograms (BLAS) Libraries") + (description + "BLIS is a portable software framework for instantiating high-performance +BLAS-like dense linear algebra libraries. The framework was designed to isolate essential kernels +of computation that enable optimized implementations of most of its commonly used and computationally +intensive operations. The optimizations are done for single and double precision routines. +AMD has extensively optimized the implementation of BLIS for AMD processors.") + (home-page "https://developer.amd.com/amd-aocl/blas-library") + (license bsd-3))) + +(define-public aocl-blis + (package + (inherit aocl-blis-mt) + (name "aocl-blis") + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out")) + "-d opt" "--enable-cblas" "zen3")))))) + (synopsis + "Basic Linear Algebra Subprograms (BLAS) Libraries (without multi-threading support for zen3 cpus)"))) + +(define-public aocl-blis-zen4 + (package/inherit aocl-blis-mt + (name "aocl-blis-zen4") + (arguments + `(#:tests? #f + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out")) + "-d opt" "--enable-cblas" "zen4")))))) + (synopsis + "Basic Linear Algebra Subprograms (BLAS) Libraries (without multi-threading support for zen4 cpus)"))) + +(define-public aocl-utils + (package + (name "aocl-utils") + (version "4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/amd/aocl-utils.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0k8fc3l5as2ga6b32d9zc0wqx8n11s7rvdi8qhsip1vbpkg8lpsm")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f)) ;No tests + (synopsis "AOCL libraries to access CPU features, especially AMD CPUs") + (description + "AOCL-Utils is designed to be integrated into other AOCL libraries. Each +project has their own mechanism to identify CPU and provide necessary features such as +'dynamic dispatch'. The main purpose of this library is to provide a centralized mechanism to +update/validate and provide information to the users of this library.") + (home-page "https://developer.amd.com/amd-aocl") + (license bsd-3))) + +(define-public aocl-lapack + (package + (name "aocl-lapack") + (version "4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/amd/libflame.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "12n2f1xc817f8bnmvijd0as1iggmjiz73vmyppszk7l0hgb3b6a9")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;No tests + #:configure-flags #~(list "--enable-amd-flags") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-config + (lambda _ + (substitute* "build/config.mk.in" + (("/usr/bin/env bash") + (which "bash"))) + (substitute* "src/aocl_dtl/Makefile" + ((".PHONY") + "CC=gcc\n.PHONY"))))))) + (inputs (list aocl-utils)) + (native-inputs (list gfortran python-wrapper perl)) + (synopsis "Linear Algebra Package (LAPACK) Libraries") + (description + "AOCL-libFLAME is a portable library for dense matrix computations, providing the complete functionality present in Linear Algebra Package (LAPACK). The library provides scientific and numerical computing communities with a modern, high-performance dense linear algebra library that is extensible, easy to use, and available under an open source license. It is a C-only implementation. Applications relying on stadard Netlib LAPACK interfaces can start taking advantage of AOCL-libFLAME with virtually no changes to their source code.") + (home-page "https://developer.amd.com/amd-aocl/blas-library") + (license bsd-3))) + +(define-public aocl-scalapack + (package + (name "aocl-scalapack") + (version "4.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/amd/aocl-scalapack.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0cz627x920ximydcs9qz6jilzia735hyg2flcd1lliq2xwvk1zd5")))) + (build-system cmake-build-system) + (arguments + (list + ;; One tests fails due to an illegal value being passed to DSTEGR2A. + ;; Disabling for now. + #:tests? #f + #:configure-flags #~(list "-DBUILD_SHARED_LIBS:BOOL=YES" + "-DUSE_OPTIMIZED_LAPACK_BLAS=ON" + (string-append "-DLAPACK_LIBRARIES=-lstdc++ " + #$aocl-utils + "/lib/libaoclutils.a " + #$aocl-lapack "/lib/libflame.a") + (string-append "-DBLAS_LIBRARIES=-fopenmp " + #$aocl-blis "/lib/libblis.a")))) + (native-inputs (list gfortran python-wrapper)) + (inputs (list openmpi aocl-lapack aocl-utils aocl-blis)) + (synopsis "Scalable Linear Algebra Package (ScaLAPACK) Library") + (description + "AOCL-ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines. It depends on external libraries including BLAS and LAPACK for Linear Algebra computations. AMD’s optimized version of ScaLAPACK (AOCL-ScaLAPACK) enables using the BLIS and libFLAME libraries with optimized dense-matrix functions and solvers for AMD processors") + (home-page "https://developer.amd.com/amd-aocl/scalapack") + (license bsd-3))) diff --git a/amd/packages/logging.scm b/amd/packages/logging.scm new file mode 100644 index 0000000..d369ab9 --- /dev/null +++ b/amd/packages/logging.scm @@ -0,0 +1,44 @@ +;;; Copyright © 2024 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages logging) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (gnu packages logging)) + +;; This package is needed only for the rocprofiler-register library. +;; Don't export its symbol publicly for now (consider upstreaming instead!) +(define-public glog-0.7 + (package + (inherit glog) + (name "glog") + (version "0.7.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/glog.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zh482ga8mndsw277h9wrq4i5xffji0li3v0xha1i6j1llzicz7s")))) + (arguments + (list + ;; Tests pass but package fails to install. + ;; Fails in phase 'install-license-files'. Disabling for now. + #:tests? #f)) + (properties `((hidden? . #t) ,@(package-properties glog))))) diff --git a/amd/packages/patches/hip-headers-5.6.1.patch b/amd/packages/patches/hip-headers-5.6.1.patch new file mode 100644 index 0000000..ce7dc2d --- /dev/null +++ b/amd/packages/patches/hip-headers-5.6.1.patch @@ -0,0 +1,15 @@ +FindHIP: Improved search logic for HIP_ROOT_DIR +diff --git a/cmake/FindHIP.cmake b/cmake/FindHIP.cmake +index 24e475d3..43f4ce28 100644 +--- a/cmake/FindHIP.cmake ++++ b/cmake/FindHIP.cmake +@@ -89,6 +89,9 @@ if(NOT APPLE) + DOC "HIP installed location" + NO_DEFAULT_PATH + ) ++ if(NOT HIP_ROOT_DIR) ++ find_path(HIP_ROOT_DIR NAMES bin/hipconfig) ++ endif() + if(NOT EXISTS ${HIP_ROOT_DIR}) + if(HIP_FIND_REQUIRED) + message(FATAL_ERROR "Specify HIP_ROOT_DIR") diff --git a/amd/packages/patches/hipamd-5.6.1.patch b/amd/packages/patches/hipamd-5.6.1.patch new file mode 100644 index 0000000..6d6b18f --- /dev/null +++ b/amd/packages/patches/hipamd-5.6.1.patch @@ -0,0 +1,16 @@ +Remove windows specific versions of hipcc and hipconfig +diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt +index c14a9ad32..f882e890b 100755 +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -400,8 +400,8 @@ if (NOT ${HIPCC_BIN_DIR} STREQUAL "") + install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.pl DESTINATION bin) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.pl DESTINATION bin) + install(PROGRAMS ${HIPCC_BIN_DIR}/hipvars.pm DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) +- install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin) ++ # install(PROGRAMS ${HIPCC_BIN_DIR}/hipcc.bat DESTINATION bin) ++ # install(PROGRAMS ${HIPCC_BIN_DIR}/hipconfig.bat DESTINATION bin) + endif() + + ############################# diff --git a/amd/packages/patches/hipblas-6.2.0.patch b/amd/packages/patches/hipblas-6.2.0.patch new file mode 100644 index 0000000..ea62494 --- /dev/null +++ b/amd/packages/patches/hipblas-6.2.0.patch @@ -0,0 +1,21 @@ +Remove git as a hard dependency and set rocblas_VERSION_COMMIT_ID +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 9766be2..dbecfca 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -45,14 +45,7 @@ if( BUILD_VERBOSE ) + endif( ) + + # Get the git hash of the hipBLAS branch +-find_package(Git REQUIRED) +- +-execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD +- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} +- OUTPUT_VARIABLE GIT_HASH_HIPBLAS +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- +-set(hipblas_VERSION_COMMIT_ID "${GIT_HASH_HIPBLAS}") ++set(hipblas_VERSION_COMMIT_ID "unknown_guix") + + # log build commits + message( STATUS "*** Building hipBLAS commit: ${hipblas_VERSION_COMMIT_ID}" ) diff --git a/amd/packages/patches/hipcc-5.6.1.patch b/amd/packages/patches/hipcc-5.6.1.patch new file mode 100644 index 0000000..595c301 --- /dev/null +++ b/amd/packages/patches/hipcc-5.6.1.patch @@ -0,0 +1,35 @@ +Make the hipcc compiler wrapper compatible with the modified hipvars perl module +and the more modular pacakging approach compared to upstream ROCm +diff --git a/bin/hipcc.pl b/bin/hipcc.pl +index 56dcda2..e75ef67 100755 +--- a/bin/hipcc.pl ++++ b/bin/hipcc.pl +@@ -128,8 +128,10 @@ $HIP_CLANG_PATH = $hipvars::HIP_CLANG_PATH; + $CUDA_PATH = $hipvars::CUDA_PATH; + $HIP_PATH = $hipvars::HIP_PATH; + $ROCM_PATH = $hipvars::ROCM_PATH; ++$ROCMINFO_PATH = $hipvars::ROCMINFO_PATH; + $HIP_VERSION = $hipvars::HIP_VERSION; +-$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; ++$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; ++$DEVICE_LIB_PATH = $hipvars::DEVICE_LIB_PATH; + + if ($HIP_PLATFORM eq "amd") { + $HIP_INCLUDE_PATH = "$HIP_ROCCLR_HOME/include"; +@@ -483,7 +485,7 @@ if($HIP_PLATFORM eq "amd"){ + $targetsStr = $ENV{HCC_AMDGPU_TARGET}; + } elsif (not $isWindows) { + # Else try using rocm_agent_enumerator +- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; ++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator"; + $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; + $targetsStr =~ s/\n/,/g; + } +@@ -613,6 +615,7 @@ if ($needLDFLAGS and not $compileOnly) { + $CMD .= " $HIPLDFLAGS"; + } + $CMD .= " $toolArgs"; ++$CMD .= " --hip-path=${HIP_PATH}"; + + if ($verbose & 0x1) { + print "hipcc-cmd: ", $CMD, "\n"; diff --git a/amd/packages/patches/hipify-6.2.0.patch b/amd/packages/patches/hipify-6.2.0.patch new file mode 100644 index 0000000..04cac7b --- /dev/null +++ b/amd/packages/patches/hipify-6.2.0.patch @@ -0,0 +1,13 @@ +Ensure installed files carry over the same permissions as the source. +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d105e20..0c1bbb57 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -177,6 +177,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY) + install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin + DESTINATION . ++ USE_SOURCE_PERMISSIONS + PATTERN "hipify-perl" + PATTERN "*.sh" + PATTERN "findcode.sh" EXCLUDE diff --git a/amd/packages/patches/llvm-rocm-5.7.1.patch b/amd/packages/patches/llvm-rocm-5.7.1.patch new file mode 100644 index 0000000..832a616 --- /dev/null +++ b/amd/packages/patches/llvm-rocm-5.7.1.patch @@ -0,0 +1,126 @@ +Fix libpath to ensure standard path is not modified or overwritten. +NOTE: upstream clang-*-libc-search-path.patch does NOT apply cleanly +for ROCm versions based on LLVM 17. Therefore it is duplicated here. +diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp +index 85d82180a805..b7bc4a28f5ab 100644 +--- a/clang/lib/Driver/Distro.cpp ++++ b/clang/lib/Driver/Distro.cpp +@@ -98,6 +98,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { + } + + static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { ++ // The compiler should always behave the same, even when used via Guix on a ++ // foreign distro. ++ return Distro::UnknownDistro; ++ + Distro::DistroType Version = Distro::UnknownDistro; + + // Newer freedesktop.org's compilant systemd-based systems +diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp +index fe3664647560..bab3b75b6314 100644 +--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp ++++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp +@@ -271,6 +271,7 @@ RocmInstallationDetector::getInstallationPathCandidates() { + ROCmSearchDirs.emplace_back(D.ResourceDir, + /*StrictChecking=*/true); + ++ #if 0 + ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm", + /*StrictChecking=*/true); + +@@ -318,6 +319,7 @@ RocmInstallationDetector::getInstallationPathCandidates() { + /*StrictChecking=*/true); + } + ++ #endif + DoPrintROCmSearchDirs(); + return ROCmSearchDirs; + } +diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp +index feaf0570b56f..c3e4df02ee94 100644 +--- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp ++++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp +@@ -214,9 +214,9 @@ const char *AMDGCN::OpenMPLinker::constructLLVMLinkCommand( + } + + // If device debugging turned on, add specially built bc files +- StringRef libpath = Args.MakeArgString(C.getDriver().Dir + "/../" + LibSuffix); ++ StringRef libpath = Args.MakeArgString(C.getDriver().InstalledDir + "/../" + LibSuffix); + std::string lib_debug_perf_path = FindDebugPerfInLibraryPath(LibSuffix); +- if (!lib_debug_perf_path.empty()) ++ if (!lib_debug_perf_path.empty() && LibSuffix != "lib") + libpath = lib_debug_perf_path; + + llvm::SmallVector<std::string, 12> BCLibs; +diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp +index 7bc0892b6734..25de67d680b4 100644 +--- a/clang/lib/Driver/ToolChains/Cuda.cpp ++++ b/clang/lib/Driver/ToolChains/Cuda.cpp +@@ -125,6 +125,9 @@ CudaInstallationDetector::CudaInstallationDetector( + const Driver &D, const llvm::Triple &HostTriple, + const llvm::opt::ArgList &Args) + : D(D) { ++ // Don't look for CUDA in /usr. ++ return; ++ + struct Candidate { + std::string Path; + bool StrictChecking; +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index 94c26cb94ee9..56c23ed2e24c 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -187,6 +187,10 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + Generic_GCC::PushPPaths(PPaths); + ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro. ++#if 0 ++ + Distro Distro(D.getVFS(), Triple); + + if (Distro.IsAlpineLinux() || Triple.isAndroid()) { +@@ -247,6 +251,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + #ifdef ENABLE_LINKER_BUILD_ID + ExtraOpts.push_back("--build-id"); ++#endif + #endif + + // The selection of paths to try here is designed to match the patterns which +@@ -268,6 +273,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + } + Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths); + ++#if 0 + addPathIfExists(D, concat(SysRoot, "/lib", MultiarchTriple), Paths); + addPathIfExists(D, concat(SysRoot, "/lib/..", OSLibDir), Paths); + +@@ -296,9 +302,11 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, concat(SysRoot, "/", OSLibDir, ABIName), Paths); + addPathIfExists(D, concat(SysRoot, "/usr", OSLibDir, ABIName), Paths); + } ++#endif + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++#if 0 + // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs + // libc++.so in D.Dir+"/../lib/". Detect this path. + // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported. +@@ -308,6 +316,14 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); + addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); ++#endif ++ ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found. ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); ++ ++ // Add GCC's lib/ directory so libstdc++.so can be found. ++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths); + } + + ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { diff --git a/amd/packages/patches/llvm-rocm-6.1.1.patch b/amd/packages/patches/llvm-rocm-6.1.1.patch new file mode 100644 index 0000000..3201e4f --- /dev/null +++ b/amd/packages/patches/llvm-rocm-6.1.1.patch @@ -0,0 +1,156 @@ +Set perl script activation and necessary GUIX variables for HIPCC. +Fix libpath to ensure standard path is not modified or overwritten. +NOTE: upstream clang-*-libc-search-path.patch does NOT apply cleanly +for ROCm versions based on LLVM 17. Therefore it is duplicated here. +diff --git a/amd/hipcc/bin/hipcc.pl b/amd/hipcc/bin/hipcc.pl +index 513a4278482c..65ecd6f9c6e1 100755 +--- a/amd/hipcc/bin/hipcc.pl ++++ b/amd/hipcc/bin/hipcc.pl +@@ -129,8 +129,10 @@ $HIP_CLANG_PATH = $hipvars::HIP_CLANG_PATH; + $CUDA_PATH = $hipvars::CUDA_PATH; + $HIP_PATH = $hipvars::HIP_PATH; + $ROCM_PATH = $hipvars::ROCM_PATH; ++$ROCMINFO_PATH = $hipvars::ROCMINFO_PATH; + $HIP_VERSION = $hipvars::HIP_VERSION; +-$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; ++$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; ++$DEVICE_LIB_PATH = $hipvars::DEVICE_LIB_PATH; + + sub get_normalized_path { + return $doubleQuote . $_[0] . $doubleQuote; +@@ -484,7 +486,7 @@ if($HIP_PLATFORM eq "amd"){ + $targetsStr = $ENV{HCC_AMDGPU_TARGET}; + } elsif (not $isWindows) { + # Else try using rocm_agent_enumerator +- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; ++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator"; + $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; + $targetsStr =~ s/\n/,/g; + } +@@ -610,6 +612,7 @@ if ($needLDFLAGS and not $compileOnly) { + $CMD .= " $HIPLDFLAGS"; + } + $CMD .= " $toolArgs"; ++$CMD .= " --hip-path=${HIP_PATH}"; + + if ($verbose & 0x1) { + print "hipcc-cmd: ", $CMD, "\n"; +diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp +index e86b589a1cfb..ca702717b482 100644 +--- a/clang/lib/Driver/Distro.cpp ++++ b/clang/lib/Driver/Distro.cpp +@@ -99,6 +99,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { + } + + static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { ++ // The compiler should always behave the same, even when used via Guix on a ++ // foreign distro. ++ return Distro::UnknownDistro; ++ + Distro::DistroType Version = Distro::UnknownDistro; + + // Newer freedesktop.org's compilant systemd-based systems +diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp +index 8eb0ee0ef3c9..70271113c126 100644 +--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp ++++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp +@@ -271,6 +271,7 @@ RocmInstallationDetector::getInstallationPathCandidates() { + ROCmSearchDirs.emplace_back(D.ResourceDir, + /*StrictChecking=*/true); + ++ #if 0 + ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/rocm", + /*StrictChecking=*/true); + +@@ -315,6 +316,7 @@ RocmInstallationDetector::getInstallationPathCandidates() { + ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", + /*StrictChecking=*/true); + ++ #endif + DoPrintROCmSearchDirs(); + return ROCmSearchDirs; + } +diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp +index 2511a4e73afc..351b805681bb 100644 +--- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp ++++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp +@@ -244,9 +244,9 @@ const char *amdgpu::dlr::getLinkCommandArgs( + } + + // If device debugging turned on, add specially built bc files +- StringRef libpath = Args.MakeArgString(C.getDriver().Dir + "/../" + LibSuffix); ++ StringRef libpath = Args.MakeArgString(C.getDriver().InstalledDir + "/../" + LibSuffix); + std::string lib_debug_perf_path = FindDebugPerfInLibraryPath(LibSuffix); +- if (!lib_debug_perf_path.empty()) ++ if (!lib_debug_perf_path.empty() && LibSuffix != "lib") + libpath = lib_debug_perf_path; + + llvm::SmallVector<std::string, 12> BCLibs; +diff --git a/clang/lib/Driver/ToolChains/Cuda.cpp b/clang/lib/Driver/ToolChains/Cuda.cpp +index e4691d006848..1a6b8b4b571c 100644 +--- a/clang/lib/Driver/ToolChains/Cuda.cpp ++++ b/clang/lib/Driver/ToolChains/Cuda.cpp +@@ -129,6 +129,9 @@ CudaInstallationDetector::CudaInstallationDetector( + const Driver &D, const llvm::Triple &HostTriple, + const llvm::opt::ArgList &Args) + : D(D) { ++ // Don't look for CUDA in /usr ++ return; ++ + struct Candidate { + std::string Path; + bool StrictChecking; +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index 957ff0f83271..e1f782d1d1e8 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -220,6 +220,10 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + Generic_GCC::PushPPaths(PPaths); + ++ // Comment out the distro-specific tweaks so that they don't bite when ++ // using Guix on a foreign distro ++#if 0 ++ + Distro Distro(D.getVFS(), Triple); + + if (Distro.IsAlpineLinux() || Triple.isAndroid()) { +@@ -280,6 +284,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + + #ifdef ENABLE_LINKER_BUILD_ID + ExtraOpts.push_back("--build-id"); ++#endif + #endif + + // The selection of paths to try here is designed to match the patterns which +@@ -300,7 +305,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, concat(SysRoot, "/usr/libo32"), Paths); + } + Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths); +- ++#if 0 + addPathIfExists(D, concat(SysRoot, "/lib", MultiarchTriple), Paths); + addPathIfExists(D, concat(SysRoot, "/lib/..", OSLibDir), Paths); + +@@ -329,11 +334,21 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) + addPathIfExists(D, concat(SysRoot, "/", OSLibDir, ABIName), Paths); + addPathIfExists(D, concat(SysRoot, "/usr", OSLibDir, ABIName), Paths); + } ++#endif + + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); + ++#if 0 + addPathIfExists(D, concat(SysRoot, "/lib"), Paths); + addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); ++#endif ++ ++ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o, ++ // and friends can be found ++ addPathIfExists(D, "@GLIBC_LIBDIR@", Paths); ++ ++ // Add GCC's lib/ directory so libstdc++.so can be found ++ addPathIfExists(D, GCCInstallation.getParentLibPath(), Paths); + } + + ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { diff --git a/amd/packages/patches/llvm-rocm-6.2.0.patch b/amd/packages/patches/llvm-rocm-6.2.0.patch new file mode 100644 index 0000000..5c865e3 --- /dev/null +++ b/amd/packages/patches/llvm-rocm-6.2.0.patch @@ -0,0 +1,77 @@ +Set perl script activation and necessary GUIX variables for HIPCC. +Fix libpath to ensure standard path is not modified or overwritten. +diff --git a/amd/hipcc/bin/hipcc b/amd/hipcc/bin/hipcc +index 8559bb099f1c..4002631b5721 100755 +--- a/amd/hipcc/bin/hipcc ++++ b/amd/hipcc/bin/hipcc +@@ -29,7 +29,7 @@ use File::Spec::Functions 'catfile'; + + # TODO: By default select perl script until change incorporated in HIP build script. + my $USE_PERL_SCRIPT = $ENV{'HIP_USE_PERL_SCRIPTS'}; +-$USE_PERL_SCRIPT //= 0; # use defined-or assignment operator. Use env var, but if not defined default to 1. ++$USE_PERL_SCRIPT //= 1; # use defined-or assignment operator. Use env var, but if not defined default to 1. + + my $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); + # escapes args with quotes SWDEV-341955 +diff --git a/amd/hipcc/bin/hipcc.pl b/amd/hipcc/bin/hipcc.pl +index 27839e58fa4e..a5f896df2283 100755 +--- a/amd/hipcc/bin/hipcc.pl ++++ b/amd/hipcc/bin/hipcc.pl +@@ -129,8 +129,10 @@ $HIP_CLANG_PATH = $hipvars::HIP_CLANG_PATH; + $CUDA_PATH = $hipvars::CUDA_PATH; + $HIP_PATH = $hipvars::HIP_PATH; + $ROCM_PATH = $hipvars::ROCM_PATH; ++$ROCMINFO_PATH = $hipvars::ROCMINFO_PATH; + $HIP_VERSION = $hipvars::HIP_VERSION; +-$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; ++$HIP_ROCCLR_HOME = $hipvars::HIP_ROCCLR_HOME; ++$DEVICE_LIB_PATH = $hipvars::DEVICE_LIB_PATH; + + sub get_normalized_path { + return $doubleQuote . $_[0] . $doubleQuote; +@@ -480,7 +482,7 @@ if($HIP_PLATFORM eq "amd"){ + $targetsStr = $ENV{HCC_AMDGPU_TARGET}; + } elsif (not $isWindows) { + # Else try using rocm_agent_enumerator +- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; ++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator"; + $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; + $targetsStr =~ s/\n/,/g; + } +@@ -606,6 +608,7 @@ if ($needLDFLAGS and not $compileOnly) { + $CMD .= " $HIPLDFLAGS"; + } + $CMD .= " $toolArgs"; ++$CMD .= " --hip-path=${HIP_PATH}"; + + if ($verbose & 0x1) { + print "hipcc-cmd: ", $CMD, "\n"; +diff --git a/amd/hipcc/bin/hipconfig b/amd/hipcc/bin/hipconfig +index f9385bb94149..58a2abf51bde 100755 +--- a/amd/hipcc/bin/hipconfig ++++ b/amd/hipcc/bin/hipconfig +@@ -29,7 +29,7 @@ use File::Spec::Functions 'catfile'; + + #TODO: By default select perl script until change incorporated in HIP build script + my $USE_PERL_SCRIPT = $ENV{'HIP_USE_PERL_SCRIPTS'}; +-$USE_PERL_SCRIPT //= 0; # use defined-or assignment operator. Use env var, but if not defined default to 0. ++$USE_PERL_SCRIPT //= 1; # use defined-or assignment operator. Use env var, but if not defined default to 0. + my $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); + my $SCRIPT_DIR=dirname(__FILE__); + if ($USE_PERL_SCRIPT) { +diff --git a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp +index e27d59206e99..29ae8736353b 100644 +--- a/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp ++++ b/clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp +@@ -255,9 +255,9 @@ const char *amdgpu::dlr::getLinkCommandArgs( + } + + // If device debugging turned on, add specially built bc files +- StringRef libpath = Args.MakeArgString(C.getDriver().Dir + "/../" + LibSuffix); ++ StringRef libpath = Args.MakeArgString(C.getDriver().InstalledDir + "/../" + LibSuffix); + std::string lib_debug_perf_path = FindDebugPerfInLibraryPath(LibSuffix); +- if (!lib_debug_perf_path.empty()) ++ if (!lib_debug_perf_path.empty() && LibSuffix != "lib") + libpath = lib_debug_perf_path; + + llvm::SmallVector<std::string, 12> BCLibs; diff --git a/amd/packages/patches/perfetto-meson.patch b/amd/packages/patches/perfetto-meson.patch new file mode 100644 index 0000000..0330aef --- /dev/null +++ b/amd/packages/patches/perfetto-meson.patch @@ -0,0 +1,22 @@ +Install perfetto headers +diff --git a/meson.build b/meson.build +index 5ef6fce52c..561dcf4768 100644 +--- a/meson.build ++++ b/meson.build +@@ -44,6 +44,7 @@ lib_perfetto = static_library( + ) + + inc_perfetto = include_directories('sdk') ++install_headers('sdk/perfetto.h') + + dir_perfetto_trace = join_paths(meson.current_source_dir(), + 'protos/perfetto/trace') +@@ -57,3 +58,8 @@ dep_perfetto = declare_dependency( + 'pkgdatadir': dir_perfetto_trace, + } + ) ++ ++pkg = import('pkgconfig') ++pkg.generate(lib_perfetto) ++ ++ diff --git a/amd/packages/patches/rocblas-6.2.0.patch b/amd/packages/patches/rocblas-6.2.0.patch new file mode 100644 index 0000000..f890774 --- /dev/null +++ b/amd/packages/patches/rocblas-6.2.0.patch @@ -0,0 +1,28 @@ +Remove git as a hard dependency and set rocblas_VERSION_COMMIT_ID +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 90a75dd3..8ca10301 100755 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -143,20 +143,12 @@ if( BUILD_VERBOSE ) + message( STATUS "\t==>CMAKE_SHARED_LINKER_FLAGS_RELEASE: ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}" ) + endif( ) + +-find_package(Git REQUIRED) +- +-# Get the git hash of the rocBLAS branch +-execute_process( +- COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD +- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} +- OUTPUT_VARIABLE GIT_HASH_ROCBLAS +- OUTPUT_STRIP_TRAILING_WHITESPACE) + + #set the rocBLAS commit hash +-set(rocblas_VERSION_COMMIT_ID "${GIT_HASH_ROCBLAS}") ++set(rocblas_VERSION_COMMIT_ID "unknown_guix") + + #set the Tensile commit hash +-set(tensile_VERSION_COMMIT_ID "${tensile_tag}") ++set(tensile_VERSION_COMMIT_ID "unkown_guix") + + # log build commits + message( STATUS "*** Building rocBLAS commit: ${rocblas_VERSION_COMMIT_ID}" ) diff --git a/amd/packages/patches/rochpl-6.0.0-cmake.patch b/amd/packages/patches/rochpl-6.0.0-cmake.patch new file mode 100644 index 0000000..77f52c4 --- /dev/null +++ b/amd/packages/patches/rochpl-6.0.0-cmake.patch @@ -0,0 +1,61 @@ +Add support for gfx1031 +Install executables in bin subdirectory +Allow roctracer to be installed in a separate location +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c1c8704..48489a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ if(HIP_VERSION VERSION_GREATER_EQUAL "4.3") + set(TARGETS "${TARGETS};gfx90a") + endif() + if (HIP_VERSION VERSION_GREATER_EQUAL "5.3") +- set(TARGETS "${TARGETS};gfx940") ++ set(TARGETS "${TARGETS};gfx940;gfx1030;gfx1100") + endif() + if (HIP_VERSION VERSION_GREATER_EQUAL "5.7") + set(TARGETS "${TARGETS};gfx941;gfx942") +@@ -195,9 +195,9 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/HPL.dat + rocm_install_targets(TARGETS rochpl) + + install(PROGRAMS ${CMAKE_BINARY_DIR}/run_rochpl ${CMAKE_BINARY_DIR}/mpirun_rochpl +- DESTINATION ${CMAKE_INSTALL_PREFIX}) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + install(FILES ${CMAKE_BINARY_DIR}/HPL.dat +- DESTINATION ${CMAKE_INSTALL_PREFIX}) ++ DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + + # Package specific CPACK vars + set(CPACK_DEBIAN_PACKAGE_DEPENDS "rocm-dev (>= 3.5.0)") +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index 2154faf..cb824f0 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -83,10 +83,10 @@ list(APPEND CMAKE_PREFIX_PATH ${ROCBLAS_PATH} ${ROCM_PATH} ) + list(APPEND CMAKE_MODULE_PATH ${ROCM_PATH}/lib/cmake/hip ) + + find_library(ROCTRACER NAMES roctracer64 +- PATHS ${ROCM_PATH}/lib ++ PATHS ${ROCTRACER_PATH}/lib + NO_DEFAULT_PATH) + find_library(ROCTX NAMES roctx64 +- PATHS ${ROCM_PATH}/lib ++ PATHS ${ROCTRACER_PATH}/lib + NO_DEFAULT_PATH) + + message("-- roctracer: ${ROCTRACER}") +@@ -94,13 +94,13 @@ message("-- roctx: ${ROCTX}") + + add_library(roc::roctracer SHARED IMPORTED) + set_target_properties(roc::roctracer PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${ROCM_PATH}/include" ++ INTERFACE_INCLUDE_DIRECTORIES "${ROCTRACER_PATH}/include" + INTERFACE_LINK_LIBRARIES "hip::host" + IMPORTED_LOCATION "${ROCTRACER}" + IMPORTED_SONAME "libroctracer.so") + add_library(roc::roctx SHARED IMPORTED) + set_target_properties(roc::roctx PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${ROCM_PATH}/include" ++ INTERFACE_INCLUDE_DIRECTORIES "${ROCTRACER_PATH}/include" + INTERFACE_LINK_LIBRARIES "hip::host" + IMPORTED_LOCATION "${ROCTX}" + IMPORTED_SONAME "libroctx64.so") 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 diff --git a/amd/packages/patches/rocprof-register-6.2.0.patch b/amd/packages/patches/rocprof-register-6.2.0.patch new file mode 100644 index 0000000..edcd47f --- /dev/null +++ b/amd/packages/patches/rocprof-register-6.2.0.patch @@ -0,0 +1,26 @@ +Do not let CMake attempt to build fmt and glog; let CMake find it instead +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 30d1308..7572226 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,6 +113,6 @@ if(ROCPROFILER_REGISTER_BUILD_SAMPLES) + add_subdirectory(samples) + endif() + +-include(rocprofiler_register_config_packaging) ++#include(rocprofiler_register_config_packaging) + + rocprofiler_register_print_features() +diff --git a/source/lib/rocprofiler-register/CMakeLists.txt b/source/lib/rocprofiler-register/CMakeLists.txt +index 840fbed..2cdca02 100644 +--- a/source/lib/rocprofiler-register/CMakeLists.txt ++++ b/source/lib/rocprofiler-register/CMakeLists.txt +@@ -17,6 +17,8 @@ target_include_directories( + rocprofiler-register PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/source + ${PROJECT_BINARY_DIR}/source) + ++find_package(fmt REQUIRED) ++find_package(glog REQUIRED) + target_link_libraries( + rocprofiler-register + PUBLIC rocprofiler-register::headers diff --git a/amd/packages/patches/rocr-runtime-5.5.patch b/amd/packages/patches/rocr-runtime-5.5.patch new file mode 100644 index 0000000..72e92fe --- /dev/null +++ b/amd/packages/patches/rocr-runtime-5.5.patch @@ -0,0 +1,16 @@ +Help clang find relevant device libraries +diff --git a/src/image/blit_src/CMakeLists.txt b/src/image/blit_src/CMakeLists.txt +index 21f998b..9aa1d8c 100644 +--- a/src/image/blit_src/CMakeLists.txt ++++ b/src/image/blit_src/CMakeLists.txt +@@ -67,8 +67,8 @@ function(gen_kernel_bc TARGET_ID INPUT_FILE OUTPUT_FILE) + + separate_arguments(CLANG_ARG_LIST UNIX_COMMAND + "-O2 -x cl -Xclang -finclude-default-header -cl-denorms-are-zero -cl-std=CL2.0 +- -target amdgcn-amd-amdhsa -mcpu=${TARGET_ID} -mcode-object-version=4 +- -o ${OUTPUT_FILE} ${INPUT_FILE}") ++ -target amdgcn-amd-amdhsa -mcpu=${TARGET_ID} -mcode-object-version=5 ++ -o ${OUTPUT_FILE} ${INPUT_FILE} --hip-device-lib-path=${BITCODE_DIR}") + + ## Add custom command to produce a code object file. + ## This depends on the kernel source file & compiler. diff --git a/amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch b/amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch new file mode 100644 index 0000000..44f9969 --- /dev/null +++ b/amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch @@ -0,0 +1,19 @@ +Only copy static files if they do not already exist at the destination +diff --git a/Tensile/TensileCreateLibrary.py b/Tensile/TensileCreateLibrary.py +index 2d63160b..a7ccf268 100644 +--- a/Tensile/TensileCreateLibrary.py ++++ b/Tensile/TensileCreateLibrary.py +@@ -738,8 +738,11 @@ def copyStaticFiles(outputPath=None): + + for fileName in libraryStaticFiles: + # copy file +- shutil.copy( os.path.join(globalParameters["SourcePath"], fileName), \ +- outputPath ) ++ ++ path = os.path.join(globalParameters["SourcePath"], fileName) ++ if not os.path.isfile(path): ++ shutil.copy( os.path.join(globalParameters["SourcePath"], fileName), \ ++ outputPath ) + + return libraryStaticFiles + diff --git a/amd/packages/python-cppheaderparser.scm b/amd/packages/python-cppheaderparser.scm new file mode 100644 index 0000000..8c04bb4 --- /dev/null +++ b/amd/packages/python-cppheaderparser.scm @@ -0,0 +1,44 @@ +;;; Copyright © 2023 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages python-cppheaderparser) + #:use-module (guix packages) + #:use-module (guix build-system python) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (guix licenses) + + #:use-module (gnu packages python-xyz)) + +(define-public python-cppheaderparser + (package + (name "python-cppheaderparser") + (version "2.7.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "CppHeaderParser" version)) + (sha256 + (base32 "0hncwd9y5ayk8wa6bqhp551mcamcvh84h89ba3labc4mdm0k0arq")))) + (build-system python-build-system) + (propagated-inputs (list python-ply)) + (home-page "http://senexcanis.com/open-source/cppheaderparser/") + (synopsis + "Parse C++ header files and generate a data structure representing the class") + (description + "Parse C++ header files and generate a data structure representing the class") + (license bsd-3))) diff --git a/amd/packages/rocm-apps.scm b/amd/packages/rocm-apps.scm new file mode 100644 index 0000000..702b1a1 --- /dev/null +++ b/amd/packages/rocm-apps.scm @@ -0,0 +1,251 @@ +;;; Copyright © 2023 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages rocm-apps) + #:use-module (guix gexp) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix licenses) + #:use-module (guix download) + #:use-module (guix utils) + + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages linux) + #:use-module (gnu packages version-control) + + #:use-module (amd packages rocm-origin) + #:use-module (amd packages rocm-libs) + #:use-module (amd packages aocl-libs) + #:use-module (amd packages rocm-hip) + + #:use-module (guix-hpc packages benchmark)) + +(define %hpcg-hashes + `( + ("6.2" . ,(base32 "1y63ypkblnhdrpf81lnn5643j7mdpk8fxpjj8ksc543qa2dg8r1s")) + ("6.1" . ,(base32 "1y63ypkblnhdrpf81lnn5643j7mdpk8fxpjj8ksc543qa2dg8r1s")) + ("6.0" . ,(base32 "1hd3wzxvs33a9cj9d26931rw0xh22vl3nr0715i9nmnriwwysig4")) + ("5.7" . ,(base32 "1dz32xsiccpb7099jvp2hkbabqnmsdjfn0p0h1x2z745c7a6p2ac")) + ) +) + +(define (hpcg-origin version) + (origin + (method git-fetch) + (uri (git-reference (url + "https://github.com/ROCmSoftwarePlatform/rocHPCG.git") + (commit (string-append "release/rocm-rel-" version)))) + (file-name (git-file-name "rochpcg" version)) + (sha256 (assoc-ref %hpcg-hashes version)) + (modules '((guix build utils))) + (snippet + ;; Build without '-march=native' so that the binaries can be used on + ;; all the CPUs. + #~(substitute* "src/CMakeLists.txt" + (("[ ;]-march=native") + ""))))) + +(define (make-hpcg hipamd rocm-cmake rocprim openmpi version) + (package + (name "hpcg") + (version version) + (source + (hpcg-origin version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:configure-flags #~(list "-DGPU_AWARE_MPI=ON" + "-DHPCG_OPENMP=ON" + "-DOPT_MEMMGMT=ON" + "-DOPT_DEFRAG=ON" + "-DOPT_ROCTX=OFF" + "-DCMAKE_CXX_FLAGS=-fPIC" + (string-append "-DROCM_PATH=" + #$hipamd)))) + (native-inputs (list git hipamd rocm-cmake)) + (inputs (list numactl rocprim)) + (propagated-inputs (list openmpi)) + (synopsis "ROCm version of the synthetic HPCG benchmark") + (description + "rocHPCG is implemented on top of ROCm runtime and toolchains using the HIP programming language, and optimized for AMD's discrete GPUs.") + (home-page "https://github.com/ROCmSoftwarePlatform/rocHPCG.git") + (license bsd-3))) + +(define-public hpcg-rocm + (make-hpcg hipamd rocm-cmake rocprim openmpi-rocm + rocm-version-major-minor-latest)) + +(define (make-hpcg-sans-mpi hpcg) + (package/inherit hpcg + (name (string-append (package-name hpcg) "-sans-mpi")) + (propagated-inputs '()) + (synopsis + "ROCm version of the synthetic HPCG benchmark (without MPI support)"))) + +(define-public hpcg-rocm-sans-mpi + (make-hpcg-sans-mpi hpcg-rocm)) + +(define (make-babelstream hipamd) + (package + (name "babelstream-hip") + (version (string-append "5.0-rocm-" + (package-version hipamd))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/UoB-HPC/BabelStream.git") + (commit "v5.0"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xkkxkmyi99qly427gkdijm9vwvmhwkgfm283ay6f83r66f712g4")))) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f ;No tests. + #:substitutable? #f + #:configure-flags #~(list (string-append "-DMODEL=hip") + (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + (string-append + "-DCXX_EXTRA_FLAGS=--offload-arch=gfx1030,gfx908,gfx90a;gfx1100")))) + (inputs (list hipamd)) + (properties `((tunable? . #t))) + (synopsis "BabelStream: Stream benchmark for GPUs using HIP") + (description + "Measure memory transfer rates to/from global device memory on GPUs. +This benchmark is similar in spirit, and based on, John D McCalpin's STREAM benchmark for CPUs. +The version of BabelStream is built targeting AMD GPUs using HIP.") + (home-page "https://github.com/UoB-HPC/BabelStream.git") + (license (fsf-free + "https://github.com/UoB-HPC/BabelStream/blob/main/LICENSE" + "Custom permissive license based on John D. McCalpin's original STREAM benchmark.")))) + +(define-public babelstream-hip + (make-babelstream hipamd)) + +; rochpl +(define (make-rochpl rocm-cmake + hipamd + openmpi-rocm + rocblas + blis + roctracer) + (package + (name "rochpl") + (version (package-version hipamd)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ROCmSoftwarePlatform/rocHPL.git") + (commit "30d80ede0189b0aa594658c47ddc13dad1534d02"))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m7cvynkk785iyk1yldslqx3221h9vg035ddc5z4rr67w79j3a1m")) + (patches (search-patches + "amd/packages/patches/rochpl-6.0.0-cmake.patch")))) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f ;No tests. + #:configure-flags #~(list (string-append "-DROCM_PATH=" + #$hipamd) + (string-append "-DHPL_BLAS_DIR=" + #$aocl-blis "/lib") + (string-append "-DHPL_MPI_DIR=" + #$openmpi-rocm) + (string-append "-DROCTRACER_PATH=" + #$roctracer)) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'rocblas-header-includes + (lambda _ + (substitute* "include/hpl_blas.hpp" + (("<rocblas.h>") + "<rocblas/rocblas.h>") + (("<roctracer.h>") + "<roctracer/roctracer.h>") + (("<roctx.h>") + "<roctracer/roctx.h>"))))))) + (native-inputs (list rocm-cmake git)) + (inputs (list hipamd openmpi-rocm rocblas blis roctracer)) + (synopsis "HPL benchmark for ROCm") + (description + "rocHPL is a benchmark based on the HPL benchmark application, implemented on top of +AMD's Radeon Open Compute ROCm Platform, runtime, and toolchains. rocHPL is created using the HIP programming +language and optimized for AMD's latest discrete GPUs.") + (home-page "https://github.com/ROCmSoftwarePlatform/rocHPL.git") + (license (list bsd-4 bsd-3)))) + +(define-public rochpl + (make-rochpl rocm-cmake + hipamd + openmpi-rocm + rocblas + aocl-blis + roctracer)) + +; osu benchmarks +(define (make-osubench-rocm openmpi-rocm hipamd rccl) + (package/inherit osu-micro-benchmarks + (name (string-append (package-name osu-micro-benchmarks) "-rocm")) + (version (string-append (package-version osu-micro-benchmarks) ".rocm" + (package-version hipamd))) + + (arguments (substitute-keyword-arguments (package-arguments + osu-micro-benchmarks) + ((#:configure-flags _) + #~(list (string-append "CC=" + #$openmpi-rocm "/bin/mpicc") + (string-append "CXX=" + #$openmpi-rocm "/bin/mpicxx") + (string-append "CFLAGS=" "-I" + #$(this-package-input "rccl") + "/include/rccl") + "--enable-rocm" + (string-append "--with-rocm=" + #$(this-package-input "hipamd")) + "--enable-rcclomb" + (string-append "--with-rccl=" + #$(this-package-input "rccl")))) + ((#:phases phases + '%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'patch-configure + (lambda _ + (substitute* (list "configure" "configure.ac") + (("__HIP_PLATFORM_HCC__") + "__HIP_PLATFORM_AMD__")))))))) + ;; Needed due to modified configure.ac. + (native-inputs (list automake autoconf)) + (inputs (modify-inputs (package-inputs osu-micro-benchmarks) + (append hipamd) + (append rccl) + (replace "openmpi" openmpi-rocm))) + (synopsis "MPI microbenchmarks with ROCm support.") + (description + "A collection of host-based and device-based microbenchmarks for MPI +communication with ROCm support."))) + +(define-public osubench-rocm + (make-osubench-rocm openmpi-rocm hipamd rccl)) diff --git a/amd/packages/rocm-base.scm b/amd/packages/rocm-base.scm new file mode 100644 index 0000000..f0f58c3 --- /dev/null +++ b/amd/packages/rocm-base.scm @@ -0,0 +1,429 @@ +;;; Copyright © 2023 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages rocm-base) + #:use-module (amd packages rocm-origin) + #:use-module (amd packages logging) + #:use-module (guix gexp) + #:use-module (guix build-system cmake) + #:use-module (guix build-system trivial) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (srfi srfi-1) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages xml) + #:use-module (gnu packages libffi) + #:use-module (gnu packages elf) + #:use-module (gnu packages mpi) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages gcc) + #:use-module (gnu packages llvm) + #:use-module (gnu packages compression) + #:use-module (gnu packages pretty-print) + #:use-module (gnu packages python) + #:use-module (gnu packages perl) + #:use-module (gnu packages crypto) + #:use-module ((guix licenses) + #:prefix license:) + #:use-module (gnu packages linux) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages vim)) + +;; This package is needed only for the clan/llvm ROCm stack. Don't +;; export its symbol publicly as it might conflict with upstream +;; libffi (same package name and version). +(define-public libffi-shared + (package + (inherit libffi) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'set-CFLAGS + (lambda _ + (setenv "CFLAGS" " -fPIC")))))) + (properties `((hidden? . #t) ,@(package-properties libffi))))) + +; llvm +(define (make-llvm-rocm version llvm) + (package + (inherit llvm) + (name (string-append (package-name llvm) "-rocm")) + (version version) + (source + (rocm-origin "llvm-project" version)) + (inputs (modify-inputs (package-inputs llvm) + (replace "libffi" libffi-shared))) + (properties `((hidden? . #t) ,@(package-properties llvm))))) + +;; Latest version of ROCm depends on llvm-18 +(define-public llvm-rocm + (make-llvm-rocm rocm-version-latest llvm-18)) + +; clang runtime +(define-public (make-clang-runtime-rocm llvm-rocm clang-runtime) + (package + (inherit clang-runtime) + (name (string-append (package-name clang-runtime) "-rocm")) + (version (package-version llvm-rocm)) + (source + (rocm-origin "llvm-project" version)) + (inputs (modify-inputs (package-inputs clang-runtime) + (replace "llvm" llvm-rocm) + (replace "libffi" libffi-shared) + (append libxcrypt))) + (properties `((hidden? . #t) ,@(package-properties clang-runtime))))) + +;; Latest version of ROCm depends on llvm-18 +(define-public clang-runtime-rocm + (make-clang-runtime-rocm llvm-rocm clang-runtime-18)) + +; clang +(define (make-clang-rocm llvm-rocm clang-runtime-rocm clang) + (package + (inherit clang) + (name (string-append (package-name clang) "-rocm")) + (version (package-version llvm-rocm)) + (source + (package-source clang-runtime-rocm)) + (inputs (modify-inputs (package-inputs clang) + (delete "clang-tools-extra"))) + (propagated-inputs (modify-inputs (package-propagated-inputs clang) + (replace "llvm" llvm-rocm) + (replace "clang-runtime" clang-runtime-rocm))) + (arguments + (substitute-keyword-arguments (package-arguments clang) + ((#:phases phases + '(@ () %standard-phases)) + #~(modify-phases #$phases + (replace 'add-tools-extra + (lambda _ + (copy-recursively "../clang-tools-extra" "tools/extra"))))))) + (properties `((hidden? . #t) ,@(package-properties clang))))) + +;; Latest version of ROCm depends on llvm-18 +(define-public clang-rocm + (make-clang-rocm llvm-rocm clang-runtime-rocm clang-18)) + +; lld +(define (make-lld-rocm llvm-rocm lld) + (package + (inherit lld) + (name (string-append (package-name lld) "-rocm")) + (version (package-version llvm-rocm)) + (source + (rocm-origin "llvm-project" version)) + (inputs (list llvm-rocm)) + (properties `((hidden? . #t) ,@(package-properties lld))))) + +;; Latest version of ROCm depends on llvm-18 +(define-public lld-rocm + (make-lld-rocm llvm-rocm lld-18)) + +; rocm-device-libs +(define (make-rocm-device-libs clang-rocm) + (package + (name "rocm-device-libs") + (version (package-version clang-rocm)) + (source + (rocm-origin (if (version>=? version "6.1.1") "llvm-project" name) + version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'ockl_ocml_irif_inc + (lambda* (#:key outputs #:allow-other-keys) + (chdir #$(if (version>=? version "6.1.1") + "amd/device-libs" ".")) + (copy-recursively "irif/inc" + (string-append (assoc-ref outputs + "out") + "/irif/inc")) + (copy-recursively "oclc/inc" + (string-append (assoc-ref outputs + "out") + "/oclc/inc")) + (copy-recursively "ockl/inc" + (string-append (assoc-ref outputs + "out") + "/ockl/inc"))))))) + (native-inputs (list clang-rocm)) + (synopsis "ROCm Device libraries") + (description + "This repository contains the sources and CMake build system for +a set of AMD specific device-side language runtime libraries.") + (home-page "https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git") + (license license:ncsa))) + +(define-public llvm-device-libs + (make-rocm-device-libs clang-rocm)) + +; roct-thunk-interface +(define (make-roct-thunk version) + (package + (name "roct-thunk-interface") + (version version) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f)) + (inputs (list libdrm numactl)) + (native-inputs (list `(,gcc "lib") pkg-config)) + (synopsis "ROCT Thunk interface") + (description "This repository includes the user-mode API interfaces used +to interact with the ROCk driver.") + (home-page "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git") + (license license:expat))) + +(define-public roct-thunk + (make-roct-thunk rocm-version-latest)) + +; rocprof-register +(define (make-rocprof-register version) + (package + (name "rocprof-register") + (version version) + (source + (rocm-origin "rocprofiler-register" version)) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + ;; Don't let CMake download and build these dependencies + #~(list "-DROCPROFILER_REGISTER_BUILD_GLOG=OFF" + "-DROCPROFILER_REGISTER_BUILD_FMT=OFF"))) + (inputs (list fmt glog-0.7)) + (synopsis "The rocprofiler-register helper library.") + (description + "The rocprofiler-register library is a helper library that coordinates +the modification of the intercept API table(s) of the HSA/HIP/ROCTx runtime libraries by the +ROCprofiler (v2) library. The purpose of this library is to provide a consistent and automated +mechanism of enabling performance analysis in the ROCm runtimes which does not rely on environment +variables or unique methods for each runtime library.") + (home-page "https://github.com/rocm/rocprofiler-register") + (license license:expat))) + +;; Only valid for ROCm 6.2.0 and above +(define-public rocprof-register + (make-rocprof-register rocm-version-latest)) + +; rocr-runtime +(define (make-rocr-runtime roct-thunk rocm-device-libs lld-rocm clang-rocm + rocprof-register) + (package + (name "rocr-runtime") + (version (package-version rocm-device-libs)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f ;No tests. + #:configure-flags #~(list (string-append "-DBITCODE_DIR=" + #$(this-package-input + "rocm-device-libs") + "/amdgcn/bitcode/")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "src")))))) + (inputs (append (list numactl libdrm libffi roct-thunk rocm-device-libs) + (if (version>=? version "6.2.0") + (list rocprof-register) + '()))) + (native-inputs (list xxd libelf lld-rocm clang-rocm pkg-config)) + (synopsis "HSA Runtime API and runtime for ROCm") + (description + "This repository includes the user-mode API interfaces and +libraries necessary for host applications to launch compute kernels to +available HSA ROCm kernel agents. Reference source code for the +core runtime is also available.") + (home-page "https://github.com/RadeonOpenCompute/ROCR-Runtime.git") + (license license:ncsa))) + +;; rocprof-register only required for ROCm 6.2.0 and above +(define-public rocr-runtime + (make-rocr-runtime roct-thunk llvm-device-libs lld-rocm clang-rocm + rocprof-register)) + +; lld-wrapper +(define-public lld-wrapper-rocm + (make-lld-wrapper lld-rocm)) + +; libomp +(define (make-libomp-rocm llvm-rocm + clang-rocm + lld-rocm + rocm-device-libs + rocr-runtime + roct-thunk + libomp) + (package + (inherit libomp) + (name (string-append (package-name libomp) "-rocm")) + (version (package-version llvm-rocm)) + (source + (rocm-origin "llvm-project" version)) + (native-inputs (append (list `("gcc:lib" ,gcc "lib")) + (modify-inputs (package-native-inputs libomp) + (replace "clang" clang-rocm) + (replace "llvm" llvm-rocm) + (replace "python" python-wrapper) + (append lld-rocm) + (append elfutils)))) + (inputs (modify-inputs (package-inputs libomp) + (append libdrm) ;required for rocm-5.7 onwards + (append numactl) ;required for rocm-5.7 onwards + (append roct-thunk) ;required for rocm-5.7 onwards + (append libffi-shared) + (append rocm-device-libs) + (append rocr-runtime))) + (arguments + (substitute-keyword-arguments (package-arguments libomp) + ((#:configure-flags flags) + #~(append (list "-DOPENMP_ENABLE_LIBOMPTARGET=1" + "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++" + "-DCMAKE_BUILD_TYPE=Release" ;strictly speaking unnecesary as debug will be stripped + "-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld" ;can be removed if we use lld-as-ld-wrapper + "-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld" ;can be removed if we use lld-as-ld-wrapper + "-DLIBOMPTARGET_AMDGCN_GFXLIST=gfx906;gfx908;gfx90a;gfx940;gfx1030;gfx1100" + (string-append "-DDEVICELIBS_ROOT=" + #$(this-package-input "rocm-device-libs")) + (string-append "-DLLVM_DIR=" + #$(this-package-native-input "llvm"))) + #$flags)) + ((#:phases phases + '(@ () %standard-phases)) + #~(modify-phases #$phases + (add-after 'set-paths 'adjust-LD_LIBRARY_PATH + (lambda* (#:key inputs #:allow-other-keys) + (setenv "LD_LIBRARY_PATH" + (string-append (assoc-ref inputs "llvm") "/lib" ":" + (assoc-ref inputs "gcc:lib") "/lib")))) + (add-after 'unpack 'patch-clang-tools + (lambda _ + ;; FIXME: Create a patch exposing a configuration option (e.g. -DCLANG_DIR=<...>) + ;; to use instead of this substitution + (substitute* (append '("openmp/libomptarget/CMakeLists.txt" + "openmp/libomptarget/DeviceRTL/CMakeLists.txt") + (if #$(version>=? "6.1.2" version) + '("openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt") + '())) + (("find_program\\(CLANG_TOOL clang PATHS \\$\\{LLVM_TOOLS_BINARY_DIR\\}") + (string-append "find_program(CLANG_TOOL clang PATHS " + #$clang-rocm "/bin")) + (("find_program\\(CLANG_OFFLOAD_BUNDLER_TOOL clang-offload-bundler PATHS \\$\\{LLVM_TOOLS_BINARY_DIR\\}") + (string-append + "find_program(CLANG_OFFLOAD_BUNDLER_TOOL clang-offload-bundler PATHS " + #$clang-rocm "/bin")) + (("find_program\\(PACKAGER_TOOL clang-offload-packager PATHS \\$\\{LLVM_TOOLS_BINARY_DIR\\}") + (string-append + "find_program(PACKAGER_TOOL clang-offload-packager PATHS " + #$clang-rocm "/bin"))))))))) + (properties `((hidden? . #t) ,@(package-properties libomp))))) + +;; Latest version of ROCm depends on llvm-18 +(define-public libomp-rocm + (make-libomp-rocm llvm-rocm + clang-rocm + lld-wrapper-rocm + llvm-device-libs + rocr-runtime + roct-thunk + libomp-18)) + +; rocm-toolchain +(define (make-rocm-toolchain clang-rocm + libomp-rocm + lld-wrapper-rocm + rocr-runtime + rocm-device-libs + roct-thunk) + (let ((rocm-clang-toolchain (make-clang-toolchain clang-rocm libomp-rocm))) + (package + (inherit rocm-clang-toolchain) + (name "rocm-toolchain") + (version (package-version rocm-clang-toolchain)) + (inputs (modify-inputs (package-inputs rocm-clang-toolchain) + (append lld-wrapper-rocm rocr-runtime rocm-device-libs + roct-thunk))) + (properties (alist-delete 'hidden? + (package-properties rocm-clang-toolchain))) + (synopsis + "Complete ROCm toolchain, based on the Clang toolchain, for C/C++ development") + (description + "This package provides a complete ROCm toolchain for C/C++ +development to be installed in user profiles. This includes Clang, as well as +libc (headers and binaries, plus debugging symbols in the @code{debug} +output), Binutils, the ROCm device libraries, and the ROCr runtime.")))) + +(define-public rocm-toolchain + (make-rocm-toolchain clang-rocm + libomp-rocm + lld-wrapper-rocm + rocr-runtime + llvm-device-libs + roct-thunk)) + +; hipify +(define (make-hipify clang-rocm) + (package + (name "hipify") + (version (package-version clang-rocm)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f ;No tests. + #:configure-flags #~(list "-DCMAKE_C_COMPILER=clang" + "-DCMAKE_CXX_COMPILER=clang++" + (if (string=? #$(package-version this-package) + "5.5.1") "-DSWDEV_375013=ON" "")) + #:phases #~(modify-phases %standard-phases + (add-before 'configure 'prepare-cmake + (lambda _ + (substitute* "CMakeLists.txt" + (("set.CMAKE_CXX_COMPILER.*") + "") + (("set.CMAKE_C_COMPILER.*") + "") + (("--disable-new-dtags") + ;; Required for 5.6.1 but does not seem to + ;; affect other versions. + "--enable-new-dtags"))))))) + (inputs (list clang-rocm perl)) + (synopsis "HIPIFY: Convert CUDA to HIP code.") + (description + "HIPIFY is a set of tools that you can use to automatically translate +CUDA source code into portable HIP C++.") + (home-page "https://github.com/ROCm/HIPIFY") + (license license:ncsa))) + +(define-public hipify + (make-hipify clang-rocm)) diff --git a/amd/packages/rocm-hip.scm b/amd/packages/rocm-hip.scm new file mode 100644 index 0000000..3ccaffb --- /dev/null +++ b/amd/packages/rocm-hip.scm @@ -0,0 +1,246 @@ +;;; Copyright © 2023 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages rocm-hip) + #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) + #:use-module (guix git-download) + #:use-module (guix licenses) + + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages perl) + #:use-module (gnu packages llvm) + #:use-module (gnu packages bash) + #:use-module (gnu packages libffi) + #:use-module (gnu packages linux) + #:use-module (gnu packages python) + #:use-module (gnu packages gl) + #:use-module (gnu packages version-control) + + #:use-module (amd packages rocm-origin) + #:use-module (amd packages python-cppheaderparser) + #:use-module (amd packages rocm-tools) + #:use-module (amd packages rocm-base)) + +; rocm-comgr +(define (make-rocm-comgr rocm-device-libs llvm-rocm lld-rocm clang-rocm) + (package + (name "rocm-comgr") + (version (package-version rocm-device-libs)) + (source + (rocm-origin (if (version>=? version "6.1.1") "llvm-project" + "rocm-compilersupport") version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (setenv "HIP_DEVICE_LIB_PATH" + (string-append #$(this-package-input + "rocm-device-libs") + "/amdgcn/bitcode")) + (chdir #$(if (version>=? version "6.1.1") "amd/comgr" + "lib/comgr")))) + (add-before 'configure 'fix-path + (lambda _ + (substitute* "src/comgr-env.cpp" + (("getDetector\\(\\)->getLLVMPath\\(\\)") + (string-append "\"" + #$clang-rocm "\"")))))))) + (inputs (list rocm-device-libs)) + (native-inputs (list llvm-rocm lld-rocm clang-rocm)) + (synopsis "The ROCm Code Object Manager") + (description + "The Comgr library provides APIs for compiling and inspecting AMDGPU code objects.") + (home-page "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport") + (license ncsa))) + +(define-public llvm-comgr + (make-rocm-comgr llvm-device-libs llvm-rocm lld-rocm clang-rocm)) + +; hip headers +(define (make-hip version) + (hidden-package (package + (name "hip") + (version version) + (source + (rocm-origin name version)) + (build-system copy-build-system) + (arguments + (list + #:install-plan #~`(("." "/")))) + (synopsis + "The Heterogeneous Interface for Portability (HIP) framework") + (description + "The Heterogeneous Interface for Portability (HIP) framework is a +C++ Runtime API and Kernel Language that allows developers to create portable applications +for AMD and NVIDIA GPUs from single source code.") + (home-page "https://github.com/ROCm-Developer-Tools/HIP") + (license expat)))) + +(define-public hip + (make-hip rocm-version-latest)) + +; hipcc +(define (make-hipcc rocminfo rocm-toolchain) + (hidden-package (package + (name "hipcc") + (version (package-version rocm-toolchain)) + (source + (rocm-origin (if (version>=? version "6.1.1") + "llvm-project" name) version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir #$(if (version>=? version + "6.1.1") + "amd/hipcc" "."))))))) + (propagated-inputs (list rocminfo rocm-toolchain)) + (synopsis "HIP compiler driver (hipcc)") + (description + "The HIP compiler driver (hipcc) is a compiler utility that will call +clang and pass the appropriate include and library options for the target compiler and HIP infrastructure.") + (home-page "https://github.com/ROCm/HIPCC") + (license expat)))) + +(define-public hipcc + (make-hipcc rocminfo rocm-toolchain)) + +; clr "hipamd" versions >= 5.6 +(define (make-clr-hipamd hip hipcc rocm-comgr) + (package + (name "hipamd") + (version (package-version hip)) + (source + (rocm-origin "clr" version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f + #:configure-flags #~(list (string-append "-DHIP_COMMON_DIR=" + #$hip) + (string-append "-DHIPCC_BIN_DIR=" + #$hipcc "/bin") + "-DCLR_BUILD_HIP=ON" + "-DCLR_BUILD_OCL=OFF" + "-DHIP_ENABLE_ROCPROFILER_REGISTER=OFF" + "-D__HIP_ENABLE_PCH=OFF" + "-DHIP_PLATFORM=amd") + #:phases #~(modify-phases %standard-phases + (add-after 'install 'info-version' + (lambda _ + (mkdir (string-append #$output "/.info")) + (with-output-to-file (string-append #$output + "/.info/version") + (lambda () + (display (string-append #$version "-0")))))) + (add-after 'install 'overwrite-hipvars + (lambda* (#:key outputs inputs #:allow-other-keys) + (with-output-to-file (string-append (assoc-ref outputs + "out") + "/bin/hipvars.pm") + (lambda () + (display (string-append "package hipvars;\n" + "$isWindows = 0;\n" + "$doubleQuote = \"\\\"\";\n" + "$CUDA_PATH = \"\";\n" + "$HIP_PLATFORM = \"amd\";\n" + "$HIP_COMPILER = \"clang\";\n" + "$HIP_RUNTIME = \"rocclr\";\n" + "$HIP_CLANG_RUNTIME = \"" + (assoc-ref inputs "rocm-toolchain") + "\";\n" + "$DEVICE_LIB_PATH = \"" + (assoc-ref inputs "rocm-toolchain") + "/amdgcn/bitcode\";\n" + "$HIP_CLANG_PATH = \"" + (assoc-ref inputs "rocm-toolchain") + "/bin\";\n" + "$HIP_PATH = \"" + #$output + "\";\n" + "$HIP_VERSION= \"" + #$version + "\";\n" + "$ROCMINFO_PATH = \"" + (assoc-ref inputs "rocminfo") + "\";\n" + "$ROCR_RUNTIME_PATH = \"" + (assoc-ref inputs "rocm-toolchain") + "\";\n" + "$HIP_INFO_PATH = \"$HIP_PATH/lib/.hipInfo\"; +" + "$HIP_ROCCLR_HOME = $HIP_PATH;\n" + "$ROCM_PATH = \"" + (assoc-ref inputs "rocm-toolchain") + "\";"))))))))) + (native-inputs (list mesa + libffi + git + perl + python-wrapper + python-cppheaderparser + hip + hipcc)) + (propagated-inputs (modify-inputs (package-propagated-inputs hipcc) + (append rocm-comgr))) + (synopsis "AMD CLR - Compute Language Runtimes for HIP applications") + (description + "AMD Common Language Runtime contains source code for AMD's +compute languages runtimes: HIP and OpenCL. This package is built for HIP only.") + (home-page "https://github.com/ROCm/clr") + (license expat))) + +(define-public hipamd + (make-clr-hipamd hip hipcc llvm-comgr)) + +; rocm-cmake +(define (make-rocm-cmake version) + (package + (name "rocm-cmake") + (version version) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f)) ;No tests. + (synopsis + "ROCm-CMake is a collection of CMake modules for common build and development +tasks within the ROCm project.") + (description + "ROCm-CMake is a collection of CMake modules for common build and development +tasks within the ROCm project. It is therefore a build dependency for many of the libraries that +comprise the ROCm platform. ROCm-CMake is not required for building libraries or programs that use ROCm; +it is required for building some of the libraries that are a part of ROCm.") + (home-page "https://github.com/RadeonOpenCompute/rocm-cmake.git") + (license expat))) + +(define-public rocm-cmake + (make-rocm-cmake rocm-version-latest)) diff --git a/amd/packages/rocm-libs.scm b/amd/packages/rocm-libs.scm new file mode 100644 index 0000000..b66f17f --- /dev/null +++ b/amd/packages/rocm-libs.scm @@ -0,0 +1,686 @@ +;;; Copyright © 2023 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages rocm-libs) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix git-download) + #:use-module (guix download) + #:use-module (guix licenses) + #:use-module (guix build utils) + #:use-module (guix utils) + + #:use-module (gnu packages) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages linux) + #:use-module (gnu packages libevent) + #:use-module (gnu packages gcc) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages autotools) + #:use-module (gnu packages debug) + #:use-module (gnu packages pciutils) + #:use-module (gnu packages pretty-print) + #:use-module (gnu packages version-control) + #:use-module (gnu packages sqlite) + + #:use-module (amd packages rocm-origin) + #:use-module (amd packages rocm-base) + #:use-module (amd packages rocm-hip) + #:use-module (amd packages rocm-tools) + #:use-module (amd packages python-cppheaderparser) + + #:use-module (gnu packages mpi) + + #:use-module (gnu packages fabric-management)) + +; rocdbg-api +(define (make-rocdbg-api rocm-comgr hipamd) + (package + (name "rocdbg-api") + (version (package-version hipamd)) + (source + (rocm-origin "rocdbgapi" version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DPCI_IDS_PATH=" + #$(this-package-input "hwdata"))))) + (inputs (list libbacktrace hwdata rocm-comgr hipamd)) + (synopsis "ROCm debugger API.") + (description + "The AMD Debugger API is a library that provides all the support necessary for a debugger +and other tools to perform low level control of the execution and inspection of execution state +of AMD's commercially available GPU architectures.") + (home-page "https://github.com/ROCm/ROCdbgapi") + (license expat))) + +(define-public rocdbg-api + (make-rocdbg-api llvm-comgr hipamd)) + +; rocprim +(define (make-rocprim rocm-cmake hipamd) + (package + (name "rocprim") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f ;No tests. + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$(this-package-input "hipamd") + "/bin/hipcc")))) + (inputs (list hipamd)) + (native-inputs (list rocm-cmake python-wrapper)) + (synopsis + "rocPRIM: a header-only library providing HIP parallel primitives") + (description + "The rocPRIM is a header-only library providing HIP parallel primitives +for developing performant GPU-accelerated code on the AMD ROCm platform.") + (home-page "https://github.com/ROCmSoftwarePlatform/rocPRIM.git") + (license expat))) + +(define-public rocprim + (make-rocprim rocm-cmake hipamd)) + +; hipcub +(define-public (make-hipcub hipamd rocm-cmake rocprim) + (package + (name "hipcub") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + "-DAMDGPU_TARGETS=gfx90a,gfx1030,gfx1100"))) + (inputs (list hipamd rocprim)) + (native-inputs (list rocm-cmake)) + (synopsis "hipCUB is a HIP wrapper for rocPRIM.") + (description + "hipCUB is a thin wrapper library on top of rocPRIM or CUB. You can use it to port a +CUB project into HIP so you can use AMD hardware (and ROCm software).") + (home-page "https://github.com/ROCm/hipCUB") + (license bsd-3))) + +(define-public hipcub + (make-hipcub hipamd rocm-cmake rocprim)) + +; rccl +(define-public (make-rccl hipamd rocm-cmake rocm-smi hipify) + (package + (name "rccl") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DROCM_PATH=" + #$(this-package-input "hipamd")) + (string-append "-DCMAKE_CXX_COMPILER=" + #$(this-package-input "hipamd") + "/bin/hipcc") + "-DAMDGPU_TARGETS=gfx90a,gfx1030,gfx1100") + #:phases #~(modify-phases %standard-phases + (add-before 'configure 'parallel-jobs + (lambda _ + (substitute* "CMakeLists.txt" + (("target_compile_options\\(rccl PRIVATE -parallel-jobs=.*\\)") + "target_compile_options(rccl PRIVATE -parallel-jobs=1)") + (("target_link_options\\(rccl PRIVATE -parallel-jobs=.*\\)") + "target_link_options(rccl PRIVATE -parallel-jobs=4)"))))))) + (inputs (list hipamd rocm-smi)) + (native-inputs (list rocm-cmake hipify)) + (properties '((max-silent-time . 14400))) + (synopsis "ROCm Communication Collectives Library") + (description + "RCCL (pronounced \"Rickle\") is a stand-alone library of standard collective communication +routines for GPUs, implementing all-reduce, all-gather, reduce, broadcast, reduce-scatter, gather, +scatter, and all-to-all. There is also initial support for direct GPU-to-GPU send and receive operations. +It has been optimized to achieve high bandwidth on platforms using PCIe, xGMI as well as networking using +InfiniBand Verbs or TCP/IP sockets. RCCL supports an arbitrary number of GPUs installed in a single node +or multiple nodes, and can be used in either single- or multi-process (e.g., MPI) applications.") + (home-page "https://github.com/ROCm/rccl") + (license bsd-3))) + +(define-public rccl + (make-rccl hipamd rocm-cmake rocm-smi hipify)) + +; rocthrust +(define (make-rocthrust hipamd rocm-cmake rocprim) + (package + (name "rocthrust") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc")))) + (inputs (list rocprim hipamd)) + (native-inputs (list rocm-cmake)) + (synopsis "rocThrust is a parallel algorithm library.") + (description + "rocThrust is a parallel algorithm library that has been ported to HIP and ROCm, +which uses the rocPRIM library. The HIP-ported library works on HIP and ROCm software.") + (home-page "https://github.com/ROCm/rocThrust.git") + (license asl2.0))) + +(define-public rocthrust + (make-rocthrust hipamd rocm-cmake rocprim)) + +; rocsparse +(define (make-rocsparse rocm-cmake hipamd rocm-device-libs rocr-runtime + rocprim) + (package + (name "rocsparse") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:configure-flags #~(list "-DAMDGPU_TARGETS=gfx90a;gfx1030,gfx1100" + (string-append "-DCMAKE_CXX_COMPILER=" + #$(this-package-input "hipamd") + "/bin/hipcc") + (string-append "-DCMAKE_Fortran_COMPILER=" + #$(this-package-native-input + "gfortran") "/bin/gfortran") + "-DBUILD_CLIENTS_SAMPLES:BOOL=OFF" ;build fails otherwise + ))) + (native-inputs (list git gfortran rocm-cmake python-wrapper)) + (inputs (list hipamd rocm-device-libs rocr-runtime rocprim)) + (synopsis "rocSPARSE provides an interface for sparse BLAS operations.") + (description + "rocSPARSE exposes a common interface that provides Basic Linear Algebra Subroutines (BLAS) +for sparse computation. It's implemented on top of AMD ROCm runtime and toolchains. rocSPARSE is created using +the HIP programming language and optimized for AMD's latest discrete GPUs.") + (home-page "https://github.com/ROCm/rocSPARSE.git") + (license expat))) + +(define-public rocsparse + (make-rocsparse rocm-cmake hipamd llvm-device-libs rocr-runtime rocprim)) + +; hipsparse +(define-public (make-hipsparse hipamd rocm-cmake rocsparse) + (package + (name "hipsparse") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + "-DBUILD_CLIENTS_SAMPLES:BOOL=OFF" ;build fails otherwise + "-DAMDGPU_TARGETS=gfx90a,gfx1030,gfx1100"))) + (inputs (list hipamd rocsparse)) + (native-inputs (list git gfortran rocm-cmake)) + (synopsis "A HIP interface to rocSPARSE.") + (description + "hipSPARSE is a SPARSE marshalling library with multiple supported backends. +It sits between your application and a 'worker' SPARSE library, where it marshals inputs to the backend +library and marshals results to your application. hipSPARSE exports an interface that doesn't require the +client to change, regardless of the chosen backend. Currently, hipSPARSE supports rocSPARSE and cuSPARSE +backends.") + (home-page "https://github.com/ROCm/hipSPARSE.git") + (license expat))) + +(define-public hipsparse + (make-hipsparse hipamd rocm-cmake rocsparse)) + +; libfabric built with rocm +(define (make-ofi-rocm rocr-runtime) + (package/inherit libfabric + (name "libfabric-rocm") + (version (string-append (package-version libfabric) ".rocm" + (package-version rocr-runtime))) + + (arguments (substitute-keyword-arguments (package-arguments libfabric) + ((#:configure-flags flags) + #~(append (list (string-append "--with-rocr=" + #$rocr-runtime)) + #$flags)))) + (inputs (modify-inputs (package-inputs libfabric) + (append rocr-runtime))))) + +(define-public ofi-rocm + (make-ofi-rocm rocr-runtime)) + +; ucx built with rocm +(define (make-ucx-rocm roct-thunk rocr-runtime hipamd) + (package/inherit ucx + (name "ucx-rocm") + (version (string-append (package-version ucx) ".rocm" + (package-version hipamd))) + (arguments (substitute-keyword-arguments (package-arguments ucx) + ((#:configure-flags flags) + #~(append (list "--without-cuda" "--without-knem" + "--without-java" + (string-append "--with-rocm=" + #$(this-package-input + "rocr-runtime")) + (string-append "--with-hip=" + #$(this-package-input + "hipamd"))) + #$flags)))) + (native-inputs (modify-inputs (package-native-inputs ucx) + (append roct-thunk))) + (inputs (modify-inputs (package-inputs ucx) + (append hipamd) + (append rocr-runtime))) + (properties `((tunable? . #t) ,@(package-properties ucx))))) + +(define-public ucx-rocm + (make-ucx-rocm roct-thunk rocr-runtime hipamd)) + +; openmpi built with ucx-rocm and libfabric-rocm +(define (make-openmpi-rocm ucx ofi hipamd) + (package/inherit openmpi + (name (string-append (package-name openmpi) "-rocm")) + (version (string-append (package-version openmpi) ".rocm" + (package-version hipamd))) + (arguments (substitute-keyword-arguments (package-arguments openmpi) + ((#:configure-flags flags) + #~(append (list (string-append "--with-rocm=" + #$(this-package-input + "hipamd")) + (string-append "--with-ofi=" + #$(this-package-input + "libfabric"))) + #$flags)) + ((#:phases phases + '%standard-phases) + #~(modify-phases #$phases + ;; opensm is needed for InfiniBand support. + (add-after 'unpack 'find-opensm-headers + (lambda* (#:key inputs #:allow-other-keys) + (setenv "C_INCLUDE_PATH" + (search-input-directory inputs + "/include/infiniband")) + (setenv "CPLUS_INCLUDE_PATH" + (search-input-directory inputs + "/include/infiniband")))))))) + (inputs (modify-inputs (package-inputs openmpi) + (replace "ucx" ucx) + (replace "libfabric" ofi) + (append hipamd))))) + +(define-public openmpi-rocm + (make-openmpi-rocm ucx-rocm ofi-rocm hipamd)) + +; roctracer +(define (make-roctracer hipamd) + (package + (name "roctracer") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DROCM_PATH=" + #$hipamd) + #$(if (version>=? version "5.5.0") "" + "-DCMAKE_CXX_COMPILER=g++")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'update-filesystem + ;; only needed from 5.5 onwards + (lambda _ + (substitute* (append (find-files "." ".cpp$") + (find-files "." ".h$")) + (("std::experimental::filesystem") + "std::filesystem") + (("<experimental/filesystem>") + "<filesystem>"))))))) + (inputs (list numactl hipamd python python-cppheaderparser)) + (synopsis "A callback/activity library for performance tracing AMD GPUs.") + (description + "ROCm tracer provides an API to provide functionality for registering +the runtimes API callbacks and asynchronous activity records pool support.") + (home-page "https://github.com/ROCm/roctracer") + (license expat))) + +(define-public roctracer + (make-roctracer hipamd)) + +; rocblas +(define (make-rocblas tensile rocm-cmake hipamd) + (package + (name "rocblas") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:build-type "Release" + #:tests? #f + #:validate-runpath? #f + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + (string-append "-DTensile_CPU_THREADS=" + (number->string (parallel-job-count))) + "-DBUILD_WITH_PIP=OFF" + (if (string=? #$version "5.3.3") + "-DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake" + "") "-DAMDGPU_TARGETS=gfx1100;gfx1030;gfx90a") + #:phases #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + ;; only needed for version<=5.4 + (lambda* (#:key inputs #:allow-other-keys) + (define cplus-include-path + ;; Delete glibc/include and gcc/include/c++ from CPLUS_INCLUDE_PATH + ;; to allow clang to include the cuda_wrappers first. + (delete (string-append (assoc-ref inputs "libc") + "/include") + (delete (string-append (assoc-ref inputs + "gcc") + "/include/c++") + (string-split (getenv + "CPLUS_INCLUDE_PATH") + #\:)))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join cplus-include-path ":"))))))) + (native-inputs (list python-wrapper tensile hipamd rocm-cmake)) + (properties '((max-silent-time . 14400))) + (synopsis "Next generation BLAS implementation for ROCm platform.") + (description + "rocBLAS is the ROCm Basic Linear Algebra Subprograms (BLAS) library. +rocBLAS is implemented in the HIP programming language and optimized for AMD GPUs.") + (home-page "https://github.com/ROCmSoftwarePlatform/rocBLAS.git") + (license (list expat bsd-3)))) + +(define-public rocblas + (make-rocblas tensile rocm-cmake hipamd)) + +; rocsolver +(define (make-rocsolver hipamd rocm-cmake rocblas rocprim) + (package + (name "rocsolver") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + "-DBUILD_WITH_SPARSE=OFF" + "-DAMDGPU_TARGETS=gfx1100;gfx1030;gfx90a") + #:phases #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (define cplus-include-path + ;; Delete glibc/include and gcc/include/c++ from CPLUS_INCLUDE_PATH + ;; to allow clang to include the cuda_wrappers first. + (delete (string-append (assoc-ref inputs "libc") + "/include") + (delete (string-append (assoc-ref inputs + "gcc") + "/include/c++") + (string-split (getenv + "CPLUS_INCLUDE_PATH") + #\:)))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join cplus-include-path ":"))))))) + (inputs (list fmt-8 hipamd rocblas rocprim)) + (native-inputs (list python-wrapper rocm-cmake)) + (synopsis "rocSOLVER provides LAPACK operations for the ROCm platform.") + (description + "rocSOLVER is a work-in-progress implementation of a subset of LAPACK functionality +on the ROCm platform.") + (home-page "https://github.com/ROCm/rocSOLVER.git") + (license (list bsd-2 bsd-3)))) + +(define-public rocsolver + (make-rocsolver hipamd rocm-cmake rocblas rocprim)) + +; hipblas +(define-public (make-hipblas hipamd rocm-cmake rocblas rocsolver) + (package + (name "hipblas") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + "-DAMDGPU_TARGETS=gfx1100;gfx90a;gfx1030"))) + (inputs (list gfortran hipamd rocblas rocsolver)) + (native-inputs (list rocm-cmake)) + (synopsis "hipBLAS is a HIP interface to rocBLAS.") + (description + "hipBLAS is a Basic Linear Algebra Subprograms (BLAS) marshalling library with multiple +supported backends. It sits between your application and a 'worker' BLAS library, where it marshals inputs to +the backend library and marshals results to your application. hipBLAS exports an interface that doesn't +require the client to change, regardless of the chosen backend. Currently, hipBLAS supports rocBLAS and +cuBLAS backends.") + (home-page "https://github.com/ROCm/hipBLAS.git") + (license (list bsd-3 expat)))) + +(define-public hipblas + (make-hipblas hipamd rocm-cmake rocblas rocsolver)) + +; rocrand +(define-public (make-rocrand hipamd rocm-cmake) + (package + (name "rocrand") + (version (package-version hipamd)) + (source + (rocm-origin name version + #:recursive? #f)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + (string-append + "-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=" + #$output "/lib") "-DBUILD_HIPRAND:BOOL=OFF" + "-DAMDGPU_TARGETS=gfx1100;gfx90a;gfx1030"))) + (inputs (list hipamd)) + (native-inputs (list git rocm-cmake)) + (synopsis "RAND library for HIP programming language.") + (description + "The rocRAND project provides functions that generate pseudorandom and quasirandom numbers. +The rocRAND library is implemented in the HIP programming language and optimized for AMD's latest discrete GPUs. +It is designed to run on top of AMD's ROCm runtime, but it also works on CUDA-enabled GPUs.") + (home-page "https://github.com/ROCm/rocRAND.git") + (license expat))) + +(define-public rocrand + (make-rocrand hipamd rocm-cmake)) + +; hiprand +(define-public (make-hiprand hipamd rocm-cmake rocrand) + (package + (name "hiprand") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + "-DAMDGPU_TARGETS=gfx90a,gfx1100,gfx1030"))) + (inputs (list hipamd rocrand)) + (native-inputs (list git rocm-cmake)) + (synopsis "RAND library for HIP programming language.") + (description + "The rocRAND project provides functions that generate pseudorandom and quasirandom numbers. +The rocRAND library is implemented in the HIP programming language and optimized for AMD's latest discrete GPUs. +It is designed to run on top of AMD's ROCm runtime, but it also works on CUDA-enabled GPUs.") + (home-page "https://github.com/ROCm/rocRAND.git") + (license expat))) + +(define-public hiprand + (make-hiprand hipamd rocm-cmake rocrand)) + +; rocalution +(define-public (make-rocalution hipamd + rocm-cmake + rocsparse + rocblas + rocprim + rocrand) + (package + (name "rocalution") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + (string-append "-DROCM_PATH=" + #$hipamd) + "-DAMDGPU_TARGETS=gfx1030;gfx90a;gfx1100" + "-DSUPPORT_HIP=ON" + "-DBUILD_CLIENTS_SAMPLES=OFF" + "-DBUILD_CLIENTS_TESTS=OFF" + "-DBUILD_CLIENTS_BENCHMARKS=OFF") + #:phases #~(modify-phases %standard-phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (define cplus-include-path + ;; Delete glibc/include and gcc/include/c++ from CPLUS_INCLUDE_PATH + ;; to allow clang to include the cuda_wrappers first. + (delete (string-append (assoc-ref inputs "libc") + "/include") + (delete (string-append (assoc-ref inputs + "gcc") + "/include/c++") + (string-split (getenv + "CPLUS_INCLUDE_PATH") + #\:)))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join cplus-include-path ":"))))))) + (inputs (list hipamd rocsparse rocblas rocprim rocrand)) + (native-inputs (list git rocm-cmake)) + (synopsis "rocALUTION is a sparse linear algebra library.") + (description + "rocALUTION is a sparse linear algebra library that can be used to explore fine-grained +parallelism on top of the ROCm platform runtime and toolchains. Based on C++ and HIP, rocALUTION provides a +portable, generic, and flexible design that allows seamless integration with other scientific software packages.") + (home-page "https://github.com/ROCm/rocALUTION.git") + (license expat))) + +(define-public rocalution + (make-rocalution hipamd + rocm-cmake + rocsparse + rocblas + rocprim + rocrand)) + +; rocfft +(define (make-rocfft hipamd rocm-cmake) + (package + (name "rocfft") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + ;; #:build-type "Release" + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + "-DSQLITE_USE_SYSTEM_PACKAGE:BOOL=ON" + "-DAMDGPU_TARGETS=gfx90a;gfx1030;gfx1100"))) + (inputs (list hipamd)) + (native-inputs (list rocm-cmake python-wrapper sqlite)) + (properties '((max-silent-time . 14400))) + (synopsis "Fast Fourier transforms (FFTs) for ROCm.") + (description + "rocFFT is a software library for computing fast Fourier transforms (FFTs) written in +the HIP programming language. It's part of AMD's software ecosystem based on ROCm. The rocFFT +library can be used with AMD and NVIDIA GPUs.") + (home-page "https://github.com/ROCm/rocFFT") + (license expat))) + +(define-public rocfft + (make-rocfft hipamd rocm-cmake)) + +; hipfft +(define (make-hipfft hipamd rocm-cmake rocfft) + (package + (name "hipfft") + (version (package-version hipamd)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:configure-flags #~(list (string-append "-DCMAKE_CXX_COMPILER=" + #$hipamd "/bin/hipcc") + (string-append "-DROCM_PATH=" + #$hipamd) + "-DAMDGPU_TARGETS=gfx90a;gfx1030;gfx1100"))) + (inputs (list hipamd rocfft)) + (native-inputs (list git rocm-cmake)) ;python-wrapper + (synopsis "A HIP interface for rocFFT and cuFFT.") + (description + "hipFFT exports an interface that doesn't require the client to change, regardless of the +chosen backend. It sits between your application and the backend FFT library, where it marshals +inputs to the backend and marshals results back to your application.") + (home-page "https://github.com/ROCm/hipFFT") + (license expat))) + +(define-public hipfft + (make-hipfft hipamd rocm-cmake rocfft)) diff --git a/amd/packages/rocm-origin.scm b/amd/packages/rocm-origin.scm new file mode 100644 index 0000000..f69b12b --- /dev/null +++ b/amd/packages/rocm-origin.scm @@ -0,0 +1,447 @@ +;;; Copyright © 2024 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages rocm-origin) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix download) + #:use-module (guix utils) + + #:use-module (gnu packages) + + #:export (rocm-origin + rocm-version-latest + rocm-version-major-minor-latest)) + +(define-public rocm-version-latest + ;; Default version for ROCm packages based on the latest release. + "6.2.2") + +(define-public rocm-version-major-minor-latest + (version-major+minor rocm-version-latest)) + +(define rocm-hashes + `( + ; clr + (("clr" "6.2.2") . ,(base32 "1fmbf29ff6c74shsvk0dhgv6pxr708lmkmlf5n8hibz65n8g8msl")) + (("clr" "6.2.1") . ,(base32 "1fmbf29ff6c74shsvk0dhgv6pxr708lmkmlf5n8hibz65n8g8msl")) + (("clr" "6.2.0") . ,(base32 "16hhacrp45gvmv85nbfh6zamzyjl5hvkb1wjnl01sxnabrc35yl4")) + (("clr" "6.1.2") . ,(base32 "0q9nkxk5ll4mncr2m8d7bwkbl6ac3w74pzylak9yryhsgiqsk5ks")) + (("clr" "6.1.1") . ,(base32 "0wwb9sh12139qgsh8b9rbcx0aki1aipj6an0skvvpclf8fxampfr")) + (("clr" "6.0.2") . ,(base32 "0rl09h366qh2ggpg3m2d721drhcqwbrnajyh34ljgn4ny3p41jk4")) + (("clr" "6.0.0") . ,(base32 "1vi6qk8vhb0mf4rd6idchkpgr5jgz4646daprj2vdqlyp5krv205")) + (("clr" "5.7.1") . ,(base32 "1300wrbdjpswps8ds850rxy7yifcbwjfszys3x55fl2vy234j1nn")) + ; hip + (("hip" "6.2.2") . ,(base32 "08g0y1ma8czrbrmfd06gsqsc6dygddks2pqrvhrf0xhkqycc8dw6")) + (("hip" "6.2.1") . ,(base32 "08g0y1ma8czrbrmfd06gsqsc6dygddks2pqrvhrf0xhkqycc8dw6")) + (("hip" "6.2.0") . ,(base32 "0iw69byvnphlixm79169mqv4kkcbx4a45jwhgf6mw3s563i8vhc4")) + (("hip" "6.1.2") . ,(base32 "0nwyxl8i6ql12sf6rsj3zyk0cf1j00x7a7mpjnca9gllvq3lf03p")) + (("hip" "6.1.1") . ,(base32 "0v8cn9wmxg3r1pc2l1v09vjkvr4fsk5kp57iwdgb5d5pcwwmagzr")) + (("hip" "6.0.2") . ,(base32 "0d7v06sfwhx16xlkrriqpwnci89z0nkka999balb5q0i5l3vfnz7")) + (("hip" "6.0.0") . ,(base32 "048qj2gsi871hdsl24shzbpqx1j31gkxfla0ky1ws27fvcy8505d")) + (("hip" "5.7.1") . ,(base32 "0p7w17mv14xrn1dg98mss43haa1k5qz1bnn9ap10l2wrvavy41nl")) + ; hipblas + (("hipblas" "6.2.2") . ,(base32 "1jax43ax9blfg4mjnjrrvpsvw8ravrcabwj193hhx3ir26msc7d2")) + (("hipblas" "6.2.1") . ,(base32 "1jax43ax9blfg4mjnjrrvpsvw8ravrcabwj193hhx3ir26msc7d2")) + (("hipblas" "6.2.0") . ,(base32 "1jax43ax9blfg4mjnjrrvpsvw8ravrcabwj193hhx3ir26msc7d2")) + (("hipblas" "6.1.2") . ,(base32 "1nkw3fzr9sfppsc4wkr5mlgdh442b8hi0pnsw6p2py8ircdfk9j9")) + (("hipblas" "6.1.1") . ,(base32 "1nkw3fzr9sfppsc4wkr5mlgdh442b8hi0pnsw6p2py8ircdfk9j9")) + (("hipblas" "6.0.2") . ,(base32 "1h5i5j17a4y6laq9am2ak3yll7zymq7jf2nmpz4527i6qgdfibhn")) + (("hipblas" "6.0.0") . ,(base32 "1h5i5j17a4y6laq9am2ak3yll7zymq7jf2nmpz4527i6qgdfibhn")) + (("hipblas" "5.7.1") . ,(base32 "1s0vpyxwjv2618x4mda87rbl753sz9zif24q1c2clxinvxj89dk9")) + ; hipcc + (("hipcc" "6.0.2") . ,(base32 "0vmhrap7pfxq8qhr898i3py0pid6fzdbbgrlvbj16c2jwhvm1d7w")) + (("hipcc" "6.0.0") . ,(base32 "0vmhrap7pfxq8qhr898i3py0pid6fzdbbgrlvbj16c2jwhvm1d7w")) + (("hipcc" "5.7.1") . ,(base32 "0n5ra5biv2r5yjbzwf88vbfwc6cmswmqxfx8wn58kqambnfgm5cl")) + ; hipcub + (("hipcub" "6.2.2") . ,(base32 "0khhfwwmj1ch0js0vbv1xjslqaz6sl837m16f1462l92pkvc08gf")) + (("hipcub" "6.2.1") . ,(base32 "0khhfwwmj1ch0js0vbv1xjslqaz6sl837m16f1462l92pkvc08gf")) + (("hipcub" "6.2.0") . ,(base32 "0khhfwwmj1ch0js0vbv1xjslqaz6sl837m16f1462l92pkvc08gf")) + (("hipcub" "6.1.2") . ,(base32 "0xa79218gkikf82x7iz0bdfdhm782pm2mqfv99lh5c5ak6jf76bw")) + (("hipcub" "6.1.1") . ,(base32 "0xa79218gkikf82x7iz0bdfdhm782pm2mqfv99lh5c5ak6jf76bw")) + (("hipcub" "6.0.2") . ,(base32 "1dr28aya74s3iimyrhzbfwdnkpq280zb5ds1rhxbyj897n1da37i")) + (("hipcub" "6.0.0") . ,(base32 "1dr28aya74s3iimyrhzbfwdnkpq280zb5ds1rhxbyj897n1da37i")) + (("hipcub" "5.7.1") . ,(base32 "0mchafa6mcycwbp1v1an5w7pqk2yjsn1mcxl89vhs2bffc1l806a")) + ; hipfft + (("hipfft" "6.2.2") . ,(base32 "116n42xzy5rkvyx9glnmrk6gd0hd7yj01mpsbb2cacqi0py6ra72")) + (("hipfft" "6.2.1") . ,(base32 "116n42xzy5rkvyx9glnmrk6gd0hd7yj01mpsbb2cacqi0py6ra72")) + (("hipfft" "6.2.0") . ,(base32 "02brbxq6l1i5swzswizlm5x5xwj2gsfcj7ibbzdf2a70y258ix2j")) + (("hipfft" "6.1.2") . ,(base32 "05iblr9ap7gpqg5n72pdlbddmm4sa78p72sy769ks7nfj1ig82c2")) + (("hipfft" "6.1.1") . ,(base32 "05iblr9ap7gpqg5n72pdlbddmm4sa78p72sy769ks7nfj1ig82c2")) + (("hipfft" "6.0.2") . ,(base32 "0bd0ldhy0g3mqpzh28wc8mwb0mwjsq1la453k78mwxl9pi1csf0f")) + (("hipfft" "6.0.0") . ,(base32 "00ib238is7s04iazjb2cwd05dpsqjy5gdfm5wmiyf6gy7zs6i8gz")) + (("hipfft" "5.7.1") . ,(base32 "1azzv72q7l1ksfcvj3rzm2spb2v414l4s4iqyyqwlzaidxjyxlln")) + ; hipify + (("hipify" "6.2.2") . ,(base32 "0pdl8jy0bjiwmb2amndr8r8hwkdha2pydaxyx5dwd5a3hg6jk7m5")) + (("hipify" "6.2.1") . ,(base32 "0pdl8jy0bjiwmb2amndr8r8hwkdha2pydaxyx5dwd5a3hg6jk7m5")) + (("hipify" "6.2.0") . ,(base32 "1mn63fvvx16g4is0s0ln0cgakmiq94jw6kwr7agnii9qb6nllqgk")) + (("hipify" "6.1.2") . ,(base32 "1isdc5qv21f0x052m1n7f2xfqi3vbp88f5622hh2rklmfb40cjxh")) + (("hipify" "6.1.1") . ,(base32 "1q963b2cfbk29qf47pcd4jbbm5wab1h0j0kindjalm8w1wsps6q1")) + (("hipify" "6.0.2") . ,(base32 "03lhfc8flgp7ajdprg5a6x7l54vzwk6ws4i02zxh8lz1yfn9dp4w")) + (("hipify" "6.0.0") . ,(base32 "1hhfj0a19nmvxqyw0p2cgyr6af4acn487bp8i2j6kwzj46vhk855")) + (("hipify" "5.7.1") . ,(base32 "1llc51ah7dphvv9s46i7l8ay3q51dzxx7fvvs6ym16066makc94l")) + ; hiprand + (("hiprand" "6.2.2") . ,(base32 "10xa8br6q7cf1y1j09yls7sdbdg1rphd3r1il9scgqsfh06c77r6")) + (("hiprand" "6.2.1") . ,(base32 "03x1frv9ww0140cpgrv8is6yq9fpqlwprlgwrgnq1whwh9c9nnk2")) + (("hiprand" "6.2.0") . ,(base32 "0z5ny7f1si8ma823cx30jsrqpm1hv1hfhfgcfbm5arn98r7ic79l")) + (("hiprand" "6.1.2") . ,(base32 "172947v56za1hrlwa84xz0sq9wdcmmj97dhl072wp1ckqb340j2f")) + (("hiprand" "6.0.2") . ,(base32 "122wxlpbb267c2byckmznk0fdlqmarw88w2iklj93r0p2lxg6qdq")) + (("hiprand" "5.7.1") . ,(base32 "1gw40nn49nwq90mffkpy3fpyjv7z50ah7b90qhz84nw4x5zlc9c3")) + ; hipsolver + (("hipsolver" "6.2.2") . ,(base32 "0zdrbgqhfax2fhmhygiq7gl5g3qlkgz4vb2bmqdggv874bhdkyqc")) + (("hipsolver" "6.2.1") . ,(base32 "0zdrbgqhfax2fhmhygiq7gl5g3qlkgz4vb2bmqdggv874bhdkyqc")) + (("hipsolver" "6.2.0") . ,(base32 "1372d34ck89z5swjwmaan87ibzfwqgc71figh2f43x4ny35afv9g")) + (("hipsolver" "6.1.2") . ,(base32 "084fajg3npxsj6nb1ll1mbdrjq8jkgz4ggdp6lkp8fjjlfq289ip")) + (("hipsolver" "6.1.1") . ,(base32 "084fajg3npxsj6nb1ll1mbdrjq8jkgz4ggdp6lkp8fjjlfq289ip")) + (("hipsolver" "6.0.2") . ,(base32 "0kap6269qg7bszxqksj9rp9wxy2imbmn9hhid4k3jx8kzqxdmiw8")) + (("hipsolver" "6.0.0") . ,(base32 "0kap6269qg7bszxqksj9rp9wxy2imbmn9hhid4k3jx8kzqxdmiw8")) + (("hipsolver" "5.7.1") . ,(base32 "01xs958pxhr7ahjgqrjh93y0q6k1sdqcih7yxp7ppgbj7wza9gp5")) + ; hipsparse + (("hipsparse" "6.2.2") . ,(base32 "1f7zcqs6s4jncbmx594qxxswfxm2pw7h6rgs3ass1yg8x2vsm890")) + (("hipsparse" "6.2.1") . ,(base32 "1f7zcqs6s4jncbmx594qxxswfxm2pw7h6rgs3ass1yg8x2vsm890")) + (("hipsparse" "6.2.0") . ,(base32 "0i0z29w3988id7xvayc62z8k1nwmxfkkyyxnwgj3rrln2qshi2gh")) + (("hipsparse" "6.1.2") . ,(base32 "1zx2656mwb2r0dxfvr5q7ya61skh8miky5n42v40jncmzmjn7a3f")) + (("hipsparse" "6.1.1") . ,(base32 "1zx2656mwb2r0dxfvr5q7ya61skh8miky5n42v40jncmzmjn7a3f")) + (("hipsparse" "6.0.2") . ,(base32 "1mkqdk0hjflqmzw52y59crdnc2l74kjjcdwkrsgfiy3yh785nbky")) + (("hipsparse" "6.0.0") . ,(base32 "1mkqdk0hjflqmzw52y59crdnc2l74kjjcdwkrsgfiy3yh785nbky")) + (("hipsparse" "5.7.1") . ,(base32 "0fibcy7vycj75wirh4ivy4fhivfqcdlq02s4z3pqyc0rx9la065p")) + ; llvm-project + (("llvm-project" "6.2.2") . ,(base32 "15g9xz8c9xcdk52nfyad5g3sg9jfrh2xlpxrq4pfnxy9vsg53vs8")) + (("llvm-project" "6.2.1") . ,(base32 "15g9xz8c9xcdk52nfyad5g3sg9jfrh2xlpxrq4pfnxy9vsg53vs8")) + (("llvm-project" "6.2.0") . ,(base32 "03smwbqrrkmdc22j4bi7c6vq5mxmmlv96xnqnmd4fbm89r59sh6c")) + (("llvm-project" "6.1.2") . ,(base32 "1f1v00x7sqhlmdgj8frw5gynh6yiim44ks4b7779r2simrxvg5zs")) + (("llvm-project" "6.1.1") . ,(base32 "0fklnsk7j51201hbkz0hlmrq70h19wvddak8ignm0mf0292fhnlb")) + (("llvm-project" "6.0.2") . ,(base32 "18kzj29bv9l92krkl585q68a6y4b062ssm91m6926d0cpjb5lv5q")) + (("llvm-project" "6.0.0") . ,(base32 "1giww1s7iarbvckwn9gaylcwq02nz2mjbnrvlnjqhqqx1p57q5jd")) + (("llvm-project" "5.7.1") . ,(base32 "1bwqrsvl2gdygp8lqz25xifhmrqwmwjhjhdnc51dr7lc72f4ksfk")) + ; rccl + (("rccl" "6.2.2") . ,(base32 "11qapq9mzfxkr2sh0p2ycckf69mkll0f6mwih58l9dcjs6010h8v")) + (("rccl" "6.2.1") . ,(base32 "11qapq9mzfxkr2sh0p2ycckf69mkll0f6mwih58l9dcjs6010h8v")) + (("rccl" "6.2.0") . ,(base32 "0v0fz03s56k21jfy870fgis33mc5cyg3h5r7d85ixcrlk86pczd6")) + (("rccl" "6.1.2") . ,(base32 "1cr7fngr9g3rghrn840kdfqcnw1c822gd79igbx78l9vf4x60yql")) + (("rccl" "6.1.1") . ,(base32 "1v0papfm4scr4fliss33mqvc792yjx3q9gd50ccsbkqnkqh266a6")) + (("rccl" "6.0.2") . ,(base32 "0kf0gfazqy1z1rn7y8r7qzgi4y0nx8w70hdw03giw446pkisaa9v")) + (("rccl" "6.0.0") . ,(base32 "0kf0gfazqy1z1rn7y8r7qzgi4y0nx8w70hdw03giw446pkisaa9v")) + (("rccl" "5.7.1") . ,(base32 "1vvy5s0cmphvh7hr0qn0nz2snl2f9pk3rrcaka41j613z6xjhncw")) + ; rocalution + (("rocalution" "6.2.2") . ,(base32 "0sasjh5cyc41rwpdgw04l4nrsflxnc1m94y0prq5kx6nwgbch9p4")) + (("rocalution" "6.2.1") . ,(base32 "0sasjh5cyc41rwpdgw04l4nrsflxnc1m94y0prq5kx6nwgbch9p4")) + (("rocalution" "6.2.0") . ,(base32 "1gm7hvvxch2l6ygbnnk5adbzjzz7sbz65755a68sg6ayvnscv049")) + (("rocalution" "6.1.2") . ,(base32 "00y0ar97mmiqdzrrbq6sicpbmb0sprjaf5xyijpw8dbwr4al3rvp")) + (("rocalution" "6.1.1") . ,(base32 "00y0ar97mmiqdzrrbq6sicpbmb0sprjaf5xyijpw8dbwr4al3rvp")) + (("rocalution" "6.0.2") . ,(base32 "1dxm1h35nr1a2rda7lgr56lkd080qwpbmcc2y8ia7ad6il47xcws")) + (("rocalution" "6.0.0") . ,(base32 "1dxm1h35nr1a2rda7lgr56lkd080qwpbmcc2y8ia7ad6il47xcws")) + (("rocalution" "5.7.1") . ,(base32 "1vk6p6jn5ddpwg6lifjk4wjhb2nrhaamj2wgkaj8y2vcwqbajhgr")) + ; rocblas + (("rocblas" "6.2.2") . ,(base32 "0qszyx89viykpz19j38qfczsyixk8531r5mh97iciqf5n3nlgb4q")) + (("rocblas" "6.2.1") . ,(base32 "0qszyx89viykpz19j38qfczsyixk8531r5mh97iciqf5n3nlgb4q")) + (("rocblas" "6.2.0") . ,(base32 "0d72x1wych786gx1d1c8148cnjvrdhbc0l3dkk3jmyqp6xbwrbw9")) + (("rocblas" "6.1.2") . ,(base32 "1q1igpd837k94vx6qp6g5cpigpxc88f1x93g2v8h156368gscpsh")) + (("rocblas" "6.1.1") . ,(base32 "0rfvp6awg3j25ra75870xpyl36qiqsib3yv1lrvjp8j3kvv71y9z")) + (("rocblas" "6.0.2") . ,(base32 "0jbi9sx0bgdwqmix3m3aikjnch1s7qbdylfcqx6kfvf11gz1vbqv")) + (("rocblas" "6.0.0") . ,(base32 "0jbi9sx0bgdwqmix3m3aikjnch1s7qbdylfcqx6kfvf11gz1vbqv")) + (("rocblas" "5.7.1") . ,(base32 "1ffwdyn5f237ad2m4k8b2ah15s0g2jfd6hm9qsywnsrby31af0nz")) + ; rocdbgapi + (("rocdbgapi" "6.2.2") . ,(base32 "0jshnchp11rmraa34qaw5xmgjl959lmlqk6gliyspqxinackknls")) + (("rocdbgapi" "6.2.1") . ,(base32 "0jshnchp11rmraa34qaw5xmgjl959lmlqk6gliyspqxinackknls")) + (("rocdbgapi" "6.2.0") . ,(base32 "0jshnchp11rmraa34qaw5xmgjl959lmlqk6gliyspqxinackknls")) + (("rocdbgapi" "6.1.2") . ,(base32 "1n6hdkv9agws5yzj79bff1j32b43caz6h5v1nb4cjjxqxb4hl04k")) + (("rocdbgapi" "6.1.1") . ,(base32 "1n6hdkv9agws5yzj79bff1j32b43caz6h5v1nb4cjjxqxb4hl04k")) + (("rocdbgapi" "6.0.2") . ,(base32 "1i2jwydnvr0fbbjaac620fy2zkqy0ji7c7d4f9ig9dsidi75lb7q")) + (("rocdbgapi" "6.0.0") . ,(base32 "1i2jwydnvr0fbbjaac620fy2zkqy0ji7c7d4f9ig9dsidi75lb7q")) + (("rocdbgapi" "5.7.1") . ,(base32 "0p1zmsy552j780j5ppqihajy3ixbv15diyjwr8f5immsqj0yzid8")) + ; rocfft + (("rocfft" "6.2.2") . ,(base32 "0ssa1ifqyznrd5yl7icp8vlfvq02pdyqhpx6mzhxzczf98zmmxd9")) + (("rocfft" "6.2.1") . ,(base32 "0ssa1ifqyznrd5yl7icp8vlfvq02pdyqhpx6mzhxzczf98zmmxd9")) + (("rocfft" "6.2.0") . ,(base32 "0sc8xrn4rr9bzd8lsd0lhh38sa90rxc1d06ckn91nca96gci96f1")) + (("rocfft" "6.1.2") . ,(base32 "0gsj3lcgppjvppqrldiqgzxsdp0d7vv8rhjg71jww0k76x2lvzf2")) + (("rocfft" "6.1.1") . ,(base32 "0gsj3lcgppjvppqrldiqgzxsdp0d7vv8rhjg71jww0k76x2lvzf2")) + (("rocfft" "6.0.2") . ,(base32 "0xvw2q031ggbhdjr8m9yfh79hk7hdrc9ikd9aqy1sy86bv5yqs78")) + (("rocfft" "6.0.0") . ,(base32 "032jxp8vgm7qvlp74bbqm0c9lgxl6wirrrnrbqvb72mj6ypn25x3")) + (("rocfft" "5.7.1") . ,(base32 "1q6yfjvl62jhrl83a5mcj6l4n26ak08mlh9vaf6kyk8yg39s550r")) + ; rocgdb + (("rocgdb" "6.2.2") . ,(base32 "1y2q3gr11m790s88rk86x8hqsgjlk4bqa4lgp373dzips3c4cwgi")) + (("rocgdb" "6.2.1") . ,(base32 "1y2q3gr11m790s88rk86x8hqsgjlk4bqa4lgp373dzips3c4cwgi")) + (("rocgdb" "6.2.0") . ,(base32 "07c0pcbg5kifs0h1gyxsxkk81rs55k8xlgbf8zc48pw0fmwq18ym")) + (("rocgdb" "6.1.2") . ,(base32 "1chrxshq0355xaz60wcl5mqnwvffn57yl08cmb7cxns1jl2vixz3")) + (("rocgdb" "6.1.1") . ,(base32 "1chrxshq0355xaz60wcl5mqnwvffn57yl08cmb7cxns1jl2vixz3")) + (("rocgdb" "6.0.2") . ,(base32 "1bhwgbqs13ll82m17g31c452mchbz76qx224f7hd38qzr29zzrax")) + (("rocgdb" "6.0.0") . ,(base32 "1bhwgbqs13ll82m17g31c452mchbz76qx224f7hd38qzr29zzrax")) + (("rocgdb" "5.7.1") . ,(base32 "04gvap8bkrmgrkg005jy766jnlp50ri9sm99xb7xwmgbyjzgnm2f")) + ; rocm-cmake + (("rocm-cmake" "6.2.2") . ,(base32 "05dm7dgg4r5gqbz8sj360nnm348mqxr0fbj3gc0x32l8mw81szf5")) + (("rocm-cmake" "6.2.1") . ,(base32 "05dm7dgg4r5gqbz8sj360nnm348mqxr0fbj3gc0x32l8mw81szf5")) + (("rocm-cmake" "6.2.0") . ,(base32 "05dm7dgg4r5gqbz8sj360nnm348mqxr0fbj3gc0x32l8mw81szf5")) + (("rocm-cmake" "6.1.2") . ,(base32 "0rn9sgj7bgxhajy8b28afzvikfpz0wxsnbk2p25xc9bf1qzzw513")) + (("rocm-cmake" "6.1.1") . ,(base32 "0rn9sgj7bgxhajy8b28afzvikfpz0wxsnbk2p25xc9bf1qzzw513")) + (("rocm-cmake" "6.0.2") . ,(base32 "14vsqcxllgj7cd51z78fvb6wjzzqimr7xbafaw1rlhwf897xca59")) + (("rocm-cmake" "6.0.0") . ,(base32 "14vsqcxllgj7cd51z78fvb6wjzzqimr7xbafaw1rlhwf897xca59")) + (("rocm-cmake" "5.7.1") . ,(base32 "0dfhqffgmrbcyxyri2qxpyfdyf8b75bprvnq77q2g281kswg6n39")) + ; rocm-compilersupport + (("rocm-compilersupport" "6.0.2") . ,(base32 "0qknmf3qzi4m05lxnyw9wl094vl2nk6lr3isjx6g541yz59qsyzl")) + (("rocm-compilersupport" "6.0.0") . ,(base32 "1xl83g1am8fczd47y24icxr659bqmd82skyz3zsqr8nh44458pj9")) + (("rocm-compilersupport" "5.7.1") . ,(base32 "0p28jsbwjk19c4i6vwqkwgwpa4qkmqsgpyhhxsx3albnbz8wc7a0")) + ; rocm-device-libs + (("rocm-device-libs" "6.0.2") . ,(base32 "1d3c2fbcab9pkah9c3yc6gy7bq6i7516p7l19pb47p0956hvnwgd")) + (("rocm-device-libs" "6.0.0") . ,(base32 "1d3c2fbcab9pkah9c3yc6gy7bq6i7516p7l19pb47p0956hvnwgd")) + (("rocm-device-libs" "5.7.1") . ,(base32 "1xc4g5qb8x5hgnvrpzxqxqbsdnwaff1r12aqb8a84mmj5bznq701")) + ; rocm_bandwidth_test + (("rocm_bandwidth_test" "6.2.2") . ,(base32 "0swrjgr9rns5rfhf42dpjp5srndfcvi0p5jc4lsjymna5pz8d3dk")) + (("rocm_bandwidth_test" "6.2.1") . ,(base32 "0swrjgr9rns5rfhf42dpjp5srndfcvi0p5jc4lsjymna5pz8d3dk")) + (("rocm_bandwidth_test" "6.2.0") . ,(base32 "0swrjgr9rns5rfhf42dpjp5srndfcvi0p5jc4lsjymna5pz8d3dk")) + (("rocm_bandwidth_test" "6.1.2") . ,(base32 "0b5jrf87wa5dqmipdc4wmr63g31hhgn5ikcl6qgbb51w2gq0vvya")) + (("rocm_bandwidth_test" "6.1.1") . ,(base32 "0b5jrf87wa5dqmipdc4wmr63g31hhgn5ikcl6qgbb51w2gq0vvya")) + (("rocm_bandwidth_test" "6.0.2") . ,(base32 "1p9ldrk43imwl8bz5c4pxaxwwmipgqg7k3xzkph2jq7ji455v4zz")) + (("rocm_bandwidth_test" "6.0.0") . ,(base32 "1p9ldrk43imwl8bz5c4pxaxwwmipgqg7k3xzkph2jq7ji455v4zz")) + (("rocm_bandwidth_test" "5.7.1") . ,(base32 "1p9ldrk43imwl8bz5c4pxaxwwmipgqg7k3xzkph2jq7ji455v4zz")) + ; rocm_smi_lib + (("rocm_smi_lib" "6.2.2") . ,(base32 "1b4dw02wfjz104waf123jk99vjm12qapzpxrifc69hhbv0q98sc4")) + (("rocm_smi_lib" "6.2.1") . ,(base32 "1b4dw02wfjz104waf123jk99vjm12qapzpxrifc69hhbv0q98sc4")) + (("rocm_smi_lib" "6.2.0") . ,(base32 "04abxvma78dvk3nvh9ap6kvyb0n1w2h9d7bzyv1qk243x9h8c8qs")) + (("rocm_smi_lib" "6.1.2") . ,(base32 "0f73k2da53hwylwf9basmd8wla8wjcdsvrggh2ccv4z9lpy319wf")) + (("rocm_smi_lib" "6.1.1") . ,(base32 "1cr0my0nhj3k3zd837931gcdvpsa9wyvx7i1fk7rhylvapyfgx4s")) + (("rocm_smi_lib" "6.0.2") . ,(base32 "1w0v29288v4lph8lzjmkjmc3fzygwfsn81h9fcr63mggjj37cbkx")) + (("rocm_smi_lib" "6.0.0") . ,(base32 "14srslb19lwf25apqcyjyjlj6yda6mj830w5s5gcgb3lq49v7iaz")) + (("rocm_smi_lib" "5.7.1") . ,(base32 "0d9cacap0k8k7hmlfbpnrqbrj86pmxk3w1fl8ijglm8a3267i51m")) + ; rocminfo + (("rocminfo" "6.2.2") . ,(base32 "1hc6fdrdxb0147s335bbg7z9w00hgn42632s35fc97nkl55hvwvc")) + (("rocminfo" "6.2.1") . ,(base32 "1hc6fdrdxb0147s335bbg7z9w00hgn42632s35fc97nkl55hvwvc")) + (("rocminfo" "6.2.0") . ,(base32 "0x0l87741bar4gscj3p0kdjbp7f88kvqh2w96lliwwzdv95fmgsa")) + (("rocminfo" "6.1.2") . ,(base32 "0b8s8ppxm1vx9wlv2x552p03fhy5wscwzpbswggi8zgsscl4l2wn")) + (("rocminfo" "6.1.1") . ,(base32 "0b8s8ppxm1vx9wlv2x552p03fhy5wscwzpbswggi8zgsscl4l2wn")) + (("rocminfo" "6.0.2") . ,(base32 "1jrhddmn5s25vcf3bi6nd6bvl4i47g3bf7qy0adv2shw4h5iwi4k")) + (("rocminfo" "6.0.0") . ,(base32 "1jrhddmn5s25vcf3bi6nd6bvl4i47g3bf7qy0adv2shw4h5iwi4k")) + (("rocminfo" "5.7.1") . ,(base32 "1a6viq9i7hcjn7xfyswzg7ivb5sp577097fiplzf7znkl3dahcsk")) + ; rocprim + (("rocprim" "6.2.2") . ,(base32 "0vv6rvn55ysmsf9xcm1glf7gcgdcv8ywxhvnm9aqpw6ky8vlxmqb")) + (("rocprim" "6.2.1") . ,(base32 "0vv6rvn55ysmsf9xcm1glf7gcgdcv8ywxhvnm9aqpw6ky8vlxmqb")) + (("rocprim" "6.2.0") . ,(base32 "01ligmg6pwkb0dnj4iq6z3m860hzral01bcayw1nizfrl9kldqdh")) + (("rocprim" "6.1.2") . ,(base32 "0sj4r3jh1gvrjp5hjmbdpnd5545fl1qc7ginlpf1f52g18zq2rxq")) + (("rocprim" "6.1.1") . ,(base32 "0sj4r3jh1gvrjp5hjmbdpnd5545fl1qc7ginlpf1f52g18zq2rxq")) + (("rocprim" "6.0.2") . ,(base32 "1qrimz28pifqyp70w5jlqynq0cp1gg2fbp2spf09wgcimbdylswx")) + (("rocprim" "6.0.0") . ,(base32 "1qrimz28pifqyp70w5jlqynq0cp1gg2fbp2spf09wgcimbdylswx")) + (("rocprim" "5.7.1") . ,(base32 "0rawbvyilzb1swj03f03h56i0gs52cg9kbcyz591ipdgqmd0bsgs")) + ; rocprofiler + (("rocprofiler" "6.2.2") . ,(base32 "0d1ng0h44spkcblpvcpjg6hq6kx8pq300wh44cbx1makjxmm9w0f")) + (("rocprofiler" "6.2.1") . ,(base32 "0d1ng0h44spkcblpvcpjg6hq6kx8pq300wh44cbx1makjxmm9w0f")) + (("rocprofiler" "6.2.0") . ,(base32 "19k4q2z2fxspsmmmndx42wihx2ayi2hlypr0j1fskxc1l2smlwx1")) + (("rocprofiler" "6.1.2") . ,(base32 "0hl9xqjfnjf7hl6rr5j6wrlhqhryng7gx7cik1ixdxhqkalmfrmc")) + (("rocprofiler" "6.1.1") . ,(base32 "0hl9xqjfnjf7hl6rr5j6wrlhqhryng7gx7cik1ixdxhqkalmfrmc")) + (("rocprofiler" "6.0.2") . ,(base32 "0n8ah8m1kgdringn3q48kmqr973iabny6f5mfmlhc72w1vv30f6b")) + (("rocprofiler" "6.0.0") . ,(base32 "0n8ah8m1kgdringn3q48kmqr973iabny6f5mfmlhc72w1vv30f6b")) + (("rocprofiler" "5.7.1") . ,(base32 "0rjz7nkw17c1vc7sm72qbcsmjjn3m5byvxaz5h1p1vxyvh5zpkyn")) + ; rocprofiler-register + (("rocprofiler-register" "6.2.2") . ,(base32 "02cxwx3v71x2sdaffhfy5vnyq5fg9lr6n4995fryy2w4szw7qvzq")) + (("rocprofiler-register" "6.2.1") . ,(base32 "02cxwx3v71x2sdaffhfy5vnyq5fg9lr6n4995fryy2w4szw7qvzq")) + (("rocprofiler-register" "6.2.0") . ,(base32 "02cxwx3v71x2sdaffhfy5vnyq5fg9lr6n4995fryy2w4szw7qvzq")) + (("rocprofiler-register" "6.1.2") . ,(base32 "0q31813yw3vrbwmd0k5rf4ik1v2vcywld0qf59b62m2jkli56ghg")) + (("rocprofiler-register" "6.1.1") . ,(base32 "0q31813yw3vrbwmd0k5rf4ik1v2vcywld0qf59b62m2jkli56ghg")) + ; rocprofiler-sdk + (("rocprofiler-sdk" "6.2.2") . ,(base32 "0ijfyfsxdnwqdidy4v3kbrqhi1h3z1xg1i1dsssbvfx62y4z2r4q")) + (("rocprofiler-sdk" "6.2.1") . ,(base32 "0ijfyfsxdnwqdidy4v3kbrqhi1h3z1xg1i1dsssbvfx62y4z2r4q")) + (("rocprofiler-sdk" "6.2.0") . ,(base32 "1xlcdz9z51knpr1nm2q8jik02mvahi3pnprl8ch404n4nvaq5i25")) + ; rocr-runtime + (("rocr-runtime" "6.2.2") . ,(base32 "0dnx5xxyr7ppkg7fvnaasx29nd0hv23410in032fjlm7c18z04sm")) + (("rocr-runtime" "6.2.1") . ,(base32 "0dnx5xxyr7ppkg7fvnaasx29nd0hv23410in032fjlm7c18z04sm")) + (("rocr-runtime" "6.2.0") . ,(base32 "0164gdlygyhvpik3bdf9ykrb3q70vvwgjlnvvh7wfr4k4lin4b0m")) + (("rocr-runtime" "6.1.2") . ,(base32 "0g6m7by4ww72zkpq2mhjrsr8lsfg5indgvr90d1p8kfsl873021p")) + (("rocr-runtime" "6.1.1") . ,(base32 "1yh25avclnxwhx5mljf97ymhazny46vvmm78yv3n7wgsqlpvylsk")) + (("rocr-runtime" "6.0.2") . ,(base32 "00hjznlrxxkkp1s8vq4id7vac6bynvz0f67ngs7d88q7kvvhdly4")) + (("rocr-runtime" "6.0.0") . ,(base32 "00hjznlrxxkkp1s8vq4id7vac6bynvz0f67ngs7d88q7kvvhdly4")) + (("rocr-runtime" "5.7.1") . ,(base32 "02g53357i15d8laxlhvib7h01kfarlq8hyfm7rm3ii2wgrm23c0g")) + ; rocrand + (("rocrand" "6.2.2") . ,(base32 "1jc66rn63dqmbcf1kr8j00djp0in54hpkmq0a4niffnji6hrmc5i")) + (("rocrand" "6.2.1") . ,(base32 "09f5ymw3983wkcc9sbra184wgpjccb7xmp7bp6dxhyn39nk3c9nz")) + (("rocrand" "6.2.0") . ,(base32 "09f5ymw3983wkcc9sbra184wgpjccb7xmp7bp6dxhyn39nk3c9nz")) + (("rocrand" "6.1.2") . ,(base32 "0q2fc8pr3my4v58dxgdi63a39dclgi4403vzp3z0hpjs6l8pnm0f")) + (("rocrand" "6.1.1") . ,(base32 "0q2fc8pr3my4v58dxgdi63a39dclgi4403vzp3z0hpjs6l8pnm0f")) + (("rocrand" "6.0.2") . ,(base32 "0rcs7wjz27hxhxdr5bs69yfg0b16l93llviw8771vkpywdh1q684")) + (("rocrand" "6.0.0") . ,(base32 "1x7nwsrs1fd8b2vrdq80bd415qvlrp8zrwl235af1g87jl0kia8y")) + (("rocrand" "5.7.1") . ,(base32 "1dc5nj36wkyndkir4b89pvi3v3dwh28v4ici7iln6hg46bzd63nq")) + ; rocsolver + (("rocsolver" "6.2.2") . ,(base32 "0r3finx2g4qva73pw32vxvgwykj7lrgkk9cy7mn9iy3w2sng4j3x")) + (("rocsolver" "6.2.1") . ,(base32 "0r3finx2g4qva73pw32vxvgwykj7lrgkk9cy7mn9iy3w2sng4j3x")) + (("rocsolver" "6.2.0") . ,(base32 "0zdf412kyrr7ibsrfn71dakl75k84snq0jpy5phrfbx5xxqs6lg3")) + (("rocsolver" "6.1.2") . ,(base32 "1h23k9r6ghdb6l0v7yscyfss076jq0gm17wz24nqylxp3h5g85z6")) + (("rocsolver" "6.1.1") . ,(base32 "1h23k9r6ghdb6l0v7yscyfss076jq0gm17wz24nqylxp3h5g85z6")) + (("rocsolver" "6.0.2") . ,(base32 "0yh12fmd23a6i664vr3wvb3isljls2y2dqj0p18h054j02km02dn")) + (("rocsolver" "6.0.0") . ,(base32 "0yh12fmd23a6i664vr3wvb3isljls2y2dqj0p18h054j02km02dn")) + (("rocsolver" "5.7.1") . ,(base32 "1gls5k6m3xzzivps2l69qcrb9b4kvmwm3ak44zgjk930ifds66db")) + ; rocsparse + (("rocsparse" "6.2.2") . ,(base32 "1s1lz30kjpg8zd0n88ifd0h9dgv7qvhflf5g34ijms1pwcvj1ldr")) + (("rocsparse" "6.2.1") . ,(base32 "1s1lz30kjpg8zd0n88ifd0h9dgv7qvhflf5g34ijms1pwcvj1ldr")) + (("rocsparse" "6.2.0") . ,(base32 "1s1lz30kjpg8zd0n88ifd0h9dgv7qvhflf5g34ijms1pwcvj1ldr")) + (("rocsparse" "6.1.2") . ,(base32 "0j8ncvfr1gqgxdsbcsxqg1br8m2v4whb8kkw5qh4mqs3szppy4ys")) + (("rocsparse" "6.1.1") . ,(base32 "0j8ncvfr1gqgxdsbcsxqg1br8m2v4whb8kkw5qh4mqs3szppy4ys")) + (("rocsparse" "6.0.2") . ,(base32 "0x0096xkyk1qlsk9xy8wnkq6whmax5sy08z30lisvdhkg482fdlx")) + (("rocsparse" "6.0.0") . ,(base32 "1q2j6i8zna4vvrcrwy2kcnyj7r5p8hjn9pl28rhrhgn8vh3dpdp5")) + (("rocsparse" "5.7.1") . ,(base32 "17qp4qhhlp30z57r43irqj734zk7pq0lq5s3ms6lc98rm1pbsjnz")) + ; roct-thunk-interface + (("roct-thunk-interface" "6.2.2") . ,(base32 "04n9w0vbklv7vfb6qzpsx06mc8dgzxfgbqiykqm1v8pp786w2v10")) + (("roct-thunk-interface" "6.2.1") . ,(base32 "04n9w0vbklv7vfb6qzpsx06mc8dgzxfgbqiykqm1v8pp786w2v10")) + (("roct-thunk-interface" "6.2.0") . ,(base32 "0zahlp61lkwcs27lgb0rbvxaxgpfkaz1f715j075whmzvsfp9kj1")) + (("roct-thunk-interface" "6.1.2") . ,(base32 "0nzz1nj6hahi5m21jsjx0ryzndqnvsgd4v0i4qp7s7isgra40s40")) + (("roct-thunk-interface" "6.1.1") . ,(base32 "0nzz1nj6hahi5m21jsjx0ryzndqnvsgd4v0i4qp7s7isgra40s40")) + (("roct-thunk-interface" "6.0.2") . ,(base32 "068yk5ll5c62m8crf2d482pqly4y3jg7x4l5gdv2rfa31zw2590p")) + (("roct-thunk-interface" "6.0.0") . ,(base32 "068yk5ll5c62m8crf2d482pqly4y3jg7x4l5gdv2rfa31zw2590p")) + (("roct-thunk-interface" "5.7.1") . ,(base32 "075advkplqlj9y3m3bsww4yiz3qxrfmxwhcf0giaa9dzrn9020wc")) + ; rocthrust + (("rocthrust" "6.2.2") . ,(base32 "08825v4daa5ig9f3dvscgh7kvk5xclzrkbrki3bc7d28xm5kxxdw")) + (("rocthrust" "6.2.1") . ,(base32 "08825v4daa5ig9f3dvscgh7kvk5xclzrkbrki3bc7d28xm5kxxdw")) + (("rocthrust" "6.2.0") . ,(base32 "11wjgl5b130g4cr2gipfgjgiqh6rczwysqpcpn12x2iv2r3hsfq5")) + (("rocthrust" "6.1.2") . ,(base32 "09irjpbwh2ggfjwcipgxqwpbnq00h2dzgcrykp365pddmmxjfkqd")) + (("rocthrust" "6.1.1") . ,(base32 "09irjpbwh2ggfjwcipgxqwpbnq00h2dzgcrykp365pddmmxjfkqd")) + (("rocthrust" "6.0.2") . ,(base32 "16m4j29aj0wkjwzynw3ry0xmjk1pjv35yhnlqwdkas4xqz2wakk6")) + (("rocthrust" "6.0.0") . ,(base32 "16m4j29aj0wkjwzynw3ry0xmjk1pjv35yhnlqwdkas4xqz2wakk6")) + (("rocthrust" "5.7.1") . ,(base32 "01zmy4gsd02w6gsah91458kbyl7kcvw3ffw2f09kl89v1xq0gdzr")) + ; roctracer + (("roctracer" "6.2.2") . ,(base32 "0ggkazbn8hfxgijqiy7k565y7zlgljnk0jpmb2dmzmy3l665kam6")) + (("roctracer" "6.2.1") . ,(base32 "0ggkazbn8hfxgijqiy7k565y7zlgljnk0jpmb2dmzmy3l665kam6")) + (("roctracer" "6.2.0") . ,(base32 "0ggkazbn8hfxgijqiy7k565y7zlgljnk0jpmb2dmzmy3l665kam6")) + (("roctracer" "6.1.2") . ,(base32 "1sh22vhx7para0ymqgskfl5hslbinxaccillals54pf9dplwvbvb")) + (("roctracer" "6.1.1") . ,(base32 "1sh22vhx7para0ymqgskfl5hslbinxaccillals54pf9dplwvbvb")) + (("roctracer" "6.0.2") . ,(base32 "1sh22vhx7para0ymqgskfl5hslbinxaccillals54pf9dplwvbvb")) + (("roctracer" "6.0.0") . ,(base32 "1sh22vhx7para0ymqgskfl5hslbinxaccillals54pf9dplwvbvb")) + (("roctracer" "5.7.1") . ,(base32 "11bd53vylassbg0xcpa9hncvwrv0xcb04z51b12h2iyc1341i91z")) + ; tensile + (("tensile" "6.2.2") . ,(base32 "0jxbhpnxmg27908x8yn33r1ljbbxinng5j7v868s4pci9gbdkxxl")) + (("tensile" "6.2.1") . ,(base32 "0jxbhpnxmg27908x8yn33r1ljbbxinng5j7v868s4pci9gbdkxxl")) + (("tensile" "6.2.0") . ,(base32 "0jxbhpnxmg27908x8yn33r1ljbbxinng5j7v868s4pci9gbdkxxl")) + (("tensile" "6.1.2") . ,(base32 "1b5m6cjgmvcmahkj6mgzzxxg47fmnn74j9jj6dr1kfgxlaj78qmz")) + (("tensile" "6.1.1") . ,(base32 "1b5m6cjgmvcmahkj6mgzzxxg47fmnn74j9jj6dr1kfgxlaj78qmz")) + (("tensile" "6.0.2") . ,(base32 "0dwlwlww4s89kzynq9rzlx0zijsvpjh0hx9bxb5h11sw1lizdpq7")) + (("tensile" "6.0.0") . ,(base32 "0dwlwlww4s89kzynq9rzlx0zijsvpjh0hx9bxb5h11sw1lizdpq7")) + (("tensile" "5.7.1") . ,(base32 "0visjmv63fmk8ywqjfcfvfbsr5784pmv83gsff4xppgrry4cc8qb")) + ) +) + +(define rocm-patches + `( + ; llvm-project + (("llvm-project" "6.2.2") . ("amd/packages/patches/llvm-rocm-6.2.0.patch" + ;; upstream patches for llvm 18.1.8 + "clang-18.0-libc-search-path.patch" + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "6.2.1") . ("amd/packages/patches/llvm-rocm-6.2.0.patch" + ;; upstream patches for llvm 18.1.8 + "clang-18.0-libc-search-path.patch" + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "6.2.0") . ("amd/packages/patches/llvm-rocm-6.2.0.patch" + ;; upstream patches for llvm 18.1.8 + "clang-18.0-libc-search-path.patch" + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "6.1.2") . ("amd/packages/patches/llvm-rocm-6.1.1.patch" + ;; upstream patches for llvm 17.0.6 + ;; "clang-17.0-libc-search-path.patch" does not apply cleanly + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "6.1.1") . ("amd/packages/patches/llvm-rocm-6.1.1.patch" + ;; upstream patches for llvm 17.0.6 + ;; "clang-17.0-libc-search-path.patch" does not apply cleanly + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "6.0.2") . ("amd/packages/patches/llvm-rocm-5.7.1.patch" + ;; upstream patches for llvm 17.0.6 + ;; "clang-17.0-libc-search-path.patch" does not apply cleanly + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "6.0.0") . ("amd/packages/patches/llvm-rocm-5.7.1.patch" + ;; upstream patches for llvm 17.0.6 + ;; "clang-17.0-libc-search-path.patch" does not apply cleanly + "clang-17.0-link-dsymutil-latomic.patch")) + (("llvm-project" "5.7.1") . ("amd/packages/patches/llvm-rocm-5.7.1.patch" + ;; upstream patches for llvm 17.0.6 + ;; "clang-17.0-libc-search-path.patch" does not apply cleanly + "clang-17.0-link-dsymutil-latomic.patch")) + ; hipify + (("hipify" "6.2.2") . ("amd/packages/patches/hipify-6.2.0.patch")) + (("hipify" "6.2.1") . ("amd/packages/patches/hipify-6.2.0.patch")) + (("hipify" "6.2.0") . ("amd/packages/patches/hipify-6.2.0.patch")) + ; rocprofiler-register + (("rocprofiler-sdk" "6.2.2") . ("amd/packages/patches/rocprof-sdk-6.2.0.patch")) + (("rocprofiler-sdk" "6.2.1") . ("amd/packages/patches/rocprof-sdk-6.2.0.patch")) + (("rocprofiler-sdk" "6.2.0") . ("amd/packages/patches/rocprof-sdk-6.2.0.patch")) + ; rocprofiler-register + (("rocprofiler-register" "6.2.2") . ("amd/packages/patches/rocprof-register-6.2.0.patch")) + (("rocprofiler-register" "6.2.1") . ("amd/packages/patches/rocprof-register-6.2.0.patch")) + (("rocprofiler-register" "6.2.0") . ("amd/packages/patches/rocprof-register-6.2.0.patch")) + (("rocprofiler-register" "6.1.2") . ("amd/packages/patches/rocprof-register-6.2.0.patch")) + ; rocr-runtime + (("rocr-runtime" "6.2.2") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "6.2.1") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "6.2.0") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "6.1.2") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "6.1.1") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "6.0.2") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "6.0.0") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + (("rocr-runtime" "5.7.1") . ("amd/packages/patches/rocr-runtime-5.5.patch")) + ; hip + (("hip" "6.2.2") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "6.2.1") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "6.2.0") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "6.1.2") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "6.1.1") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "6.0.2") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "6.0.0") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + (("hip" "5.7.1") . ("amd/packages/patches/hip-headers-5.6.1.patch")) + ; hipcc + (("hipcc" "6.0.2") . ("amd/packages/patches/hipcc-5.6.1.patch")) + (("hipcc" "6.0.0") . ("amd/packages/patches/hipcc-5.6.1.patch")) + (("hipcc" "5.7.1") . ("amd/packages/patches/hipcc-5.6.1.patch")) + ; hipamd (post rocm-5.5.X) + (("clr" "6.0.2") . ("amd/packages/patches/hipamd-5.6.1.patch")) + (("clr" "6.0.0") . ("amd/packages/patches/hipamd-5.6.1.patch")) + (("clr" "5.7.1") . ("amd/packages/patches/hipamd-5.6.1.patch")) + ; tensile + (("tensile" "6.2.2") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "6.2.1") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "6.2.0") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "6.1.2") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "6.1.1") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "6.0.2") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "6.0.0") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + (("tensile" "5.7.1") . ("amd/packages/patches/tensile-5.3.3-copy-if-not-exist.patch")) + ; rocblas + (("rocblas" "6.2.2") . ("amd/packages/patches/rocblas-6.2.0.patch")) + (("rocblas" "6.2.1") . ("amd/packages/patches/rocblas-6.2.0.patch")) + (("rocblas" "6.2.0") . ("amd/packages/patches/rocblas-6.2.0.patch")) + ; hipblas + (("hipblas" "6.2.2") . ("amd/packages/patches/hipblas-6.2.0.patch")) + (("hipblas" "6.2.1") . ("amd/packages/patches/hipblas-6.2.0.patch")) + (("hipblas" "6.2.0") . ("amd/packages/patches/hipblas-6.2.0.patch")) + ; rocm-bandwidth-test + (("rocm_bandwidth_test" "6.1.2") . ("amd/packages/patches/rocm-bandwidth-test-reorg.patch")) + (("rocm_bandwidth_test" "6.1.1") . ("amd/packages/patches/rocm-bandwidth-test-reorg.patch")) + (("rocm_bandwidth_test" "6.0.2") . ("amd/packages/patches/rocm-bandwidth-test-reorg.patch")) + (("rocm_bandwidth_test" "6.0.0") . ("amd/packages/patches/rocm-bandwidth-test-reorg.patch")) + ) +) + +(define* (rocm-origin name version + #:key (recursive? #f)) + "This procedure returns origin objects for ROCm components." + (origin + (method git-fetch) + (uri (git-reference (url (string-append "https://github.com/ROCm/" name)) + (commit (string-append "rocm-" version)) + (recursive? recursive?))) + (file-name (git-file-name name + (string-append "rocm-" version))) + (sha256 (assoc-ref rocm-hashes + (list name version))) + (patches (map search-patch + (or (assoc-ref rocm-patches + (list name version)) + '()))))) diff --git a/amd/packages/rocm-tools.scm b/amd/packages/rocm-tools.scm new file mode 100644 index 0000000..2b58017 --- /dev/null +++ b/amd/packages/rocm-tools.scm @@ -0,0 +1,131 @@ +;;; Copyright © 2023 Advanced Micro Devices, Inc. +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (amd packages rocm-tools) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix build-system cmake) + #:use-module (guix build-system python) + #:use-module (guix git-download) + #:use-module (guix licenses) + + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages linux) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-science) + #:use-module (gnu packages serialization) + + #:use-module (amd packages rocm-origin) + #:use-module (amd packages rocm-base)) + +; rocminfo +(define (make-rocminfo rocr-runtime) + (package + (name "rocminfo") + (version (package-version rocr-runtime)) + (source + (rocm-origin name version)) + (build-system cmake-build-system) + (arguments + `(#:build-type "Release" + #:tests? #f)) + (inputs (list rocr-runtime python)) + (propagated-inputs (list grep kmod)) + (synopsis "ROCm application for reporting system info") + (description + "List @acronym{HSA,Heterogeneous System Architecture} Agents available to ROCm and show their properties.") + (home-page "https://github.com/RadeonOpenCompute/rocminfo") + (license ncsa))) + +(define-public rocminfo + (make-rocminfo rocr-runtime)) + +; rocm-bandwidth-test +(define (make-rocm-bandwidth rocr-runtime) + (package + (name "rocm-bandwidth-test") + (version (package-version rocr-runtime)) + (source + (rocm-origin "rocm_bandwidth_test" version)) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ;No tests. + #:configure-flags #~(list "-DCMAKE_CXX_FLAGS=-Wno-error=cpp" ;ignores include reorg issue + ))) + (inputs (list rocr-runtime)) + (synopsis "Bandwith test for ROCm") + (description + "RocBandwidthTest is designed to capture the performance +characteristics of buffer copying and kernel read/write operations. The help +screen of the benchmark shows various options one can use in initiating +copy/read/writer operations. In addition one can also query the topology of the +system in terms of memory pools and their agents.") + (home-page "https://github.com/ROCm/rocm_bandwidth_test") + (license ncsa))) + +(define-public rocm-bandwidth + (make-rocm-bandwidth rocr-runtime)) + +; rocm-smi +(define (make-rocm-smi version) + (package + (name "rocm-smi") + (version version) + (source + (rocm-origin "rocm_smi_lib" version)) + (build-system cmake-build-system) + (arguments + `(#:build-type "Release" + #:tests? #f)) ;No tests. + (inputs (list python)) + (propagated-inputs (list grep coreutils)) + (synopsis "The ROCm System Management Interface (ROCm SMI) Library") + (description + "The ROCm System Management Interface Library, or ROCm SMI library, +is part of the Radeon Open Compute ROCm software stack. It is a C library for Linux that +provides a user space interface for applications to monitor and control GPU applications.") + (home-page "https://github.com/RadeonOpenCompute/rocm_smi_lib.git") + (license ncsa))) + +(define-public rocm-smi + (make-rocm-smi rocm-version-latest)) + +; tensile +(define (make-tensile version) + (package + (name "tensile") + (version version) + (source + (rocm-origin name version)) + (build-system python-build-system) + (native-inputs (list python-pandas)) + (propagated-inputs (list msgpack-3 python-msgpack python-pyyaml + python-joblib python-psutil)) + (synopsis "A GEMM kernel generator for AMD GPUs.") + (description + "Tensile is a tool for creating benchmark-driven backend libraries for GEMMs, GEMM-like problems +(such as batched GEMM), and general N-dimensional tensor contractions on a GPU. The Tensile library +is mainly used as backend library to rocBLAS. Tensile acts as the performance backbone for a wide +variety of 'compute' applications running on AMD GPUs.") + (home-page "https://github.com/ROCmSoftwarePlatform/Tensile.git") + (license expat))) + +(define-public tensile + (make-tensile rocm-version-latest)) |