diff options
| author | David Elsing <david.elsing@posteo.net> | 2026-02-03 21:33:21 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-02-10 23:49:15 +0100 |
| commit | dea0a3842b80c036f071b84893f19c8ce38fc7c2 (patch) | |
| tree | 9ed95b399c6a26dc43dfd7dbffd497605998a6c9 /gnu/packages/rocm-libs.scm | |
| parent | eb541097d19a15c5184d5f94bc4a7d8f9b26b921 (diff) | |
gnu: Add miopen.
* gnu/packages/rocm-libs.scm (miopen): New variable.
* gnu/packages/patches/miopen-zstd.patch (miopen): New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/rocm-libs.scm')
| -rw-r--r-- | gnu/packages/rocm-libs.scm | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/gnu/packages/rocm-libs.scm b/gnu/packages/rocm-libs.scm index 3d7522d3f89..0d63415e0a3 100644 --- a/gnu/packages/rocm-libs.scm +++ b/gnu/packages/rocm-libs.scm @@ -24,14 +24,17 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages gcc) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages logging) + #:use-module (gnu packages machine-learning) #:use-module (gnu packages maths) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pretty-print) @@ -42,6 +45,7 @@ #:use-module (gnu packages rocm) #:use-module (gnu packages rocm-tools) #:use-module (gnu packages serialization) + #:use-module (gnu packages sqlite) #:use-module (srfi srfi-1)) ;; The components are tightly integrated and can only be upgraded as a unit. If @@ -796,3 +800,74 @@ GPUs using the HIP programming language.") half-precision floating point type (IEEE 754 conformant) together with common operations on this type.") (license license:expat))) + +(define-public miopen + (package + (name "miopen") + (version %rocm-version) + (source + (rocm-library-source + "miopen" + #:patches + (search-patches + "miopen-zstd.patch"))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ; requires GPU + #:build-type "Release" + #:configure-flags + #~(list + "-DCMAKE_CXX_COMPILER=hipcc" + "-DBoost_USE_STATIC_LIBS=OFF" + #$(string-append "-DAMDGPU_TARGETS=" (current-amd-gpu-targets-string))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'disable-tidy+tests + (lambda _ + (substitute* "CMakeLists.txt" + (("add_subdirectory.*test.*") "") + (("set\\(MIOPEN_TIDY_ERRORS ALL\\)") "")))) + (add-after 'unpack 'adjust-ck-checks + (lambda _ + (substitute* (find-files "src" ".*mha.*\\.cpp$") + (("MIOPEN_USE_COMPOSABLEKERNEL") "MIOPEN_USE_CK_MHA_OPS")) + (substitute* + (cons* + "src/mlo_dir_conv.cpp" + "src/solver/conv_ck_igemm_fwd_bias_res_add_activ_fused.cpp" + "src/solver/conv_ck_igemm_fwd_bias_activ_fused.cpp" + (find-files "src" ".*xdl.*\\.cpp$")) + (("MIOPEN_USE_COMPOSABLEKERNEL") "MIOPEN_USE_CK_XDL_OPS"))))))) + (inputs + (list + boost + composable-kernel + hipblas + hipblas-common + hipblaslt + rocblas + rocm-hip-runtime + rocmlir + rocrand + roctracer + sqlite + `(,zstd "lib"))) + (native-inputs + (list + eigen + frugally-deep + functionalplus + googletest + half-rocm + nlohmann-json + pkg-config + rocm-cmake + rocm-toolchain)) + (properties `((amd-gpu-targets . ,%default-amd-gpu-targets))) + (home-page %rocm-libraries-url) + (synopsis "GPU library for machine learning primitives") + (description "@code{MIOpen} is a library which exposes a C API to GPU +machine learning primitives. This package contains the HIP version based on +ROCm.") + (license license:expat))) |
