about summary refs log tree commit diff
path: root/pkgs/development/rocm-modules/5
diff options
context:
space:
mode:
authorMadoura <madouura@gmail.com>2023-10-10 23:32:21 -0500
committerMadoura <madouura@gmail.com>2023-10-12 07:31:57 -0500
commit45548839681e58a002106c52c55c0a2540c2a7f7 (patch)
tree6075a6ad6726bb093758e531fbb512dac4cb7606 /pkgs/development/rocm-modules/5
parent56c11dd1fd81bea2d1618066b5bd8feaef47e457 (diff)
rocmPackages: Implement meta package sets
Diffstat (limited to 'pkgs/development/rocm-modules/5')
-rw-r--r--pkgs/development/rocm-modules/5/default.nix188
1 files changed, 188 insertions, 0 deletions
diff --git a/pkgs/development/rocm-modules/5/default.nix b/pkgs/development/rocm-modules/5/default.nix
index 886d39f26b555..8bb9f03355b64 100644
--- a/pkgs/development/rocm-modules/5/default.nix
+++ b/pkgs/development/rocm-modules/5/default.nix
@@ -1,5 +1,6 @@
 { callPackage
 , recurseIntoAttrs
+, symlinkJoin
 , fetchFromGitHub
 , cudaPackages
 , python3Packages
@@ -337,4 +338,191 @@ in rec {
     useOpenCL = false;
     useCPU = true;
   };
+
+  ## Meta ##
+  # Emulate common ROCm meta layout
+  # These are mainly for users. I strongly suggest NOT using these in nixpkgs derivations
+  # Don't put these into `propagatedBuildInputs` unless you want PATH/PYTHONPATH issues!
+  # See: https://rocm.docs.amd.com/en/latest/_images/image.004.png
+  # See: https://rocm.docs.amd.com/en/latest/deploy/linux/os-native/package_manager_integration.html
+  meta = rec {
+    rocm-developer-tools = symlinkJoin {
+      name = "rocm-developer-tools-meta";
+
+      paths = [
+        hsa-amd-aqlprofile-bin
+        rocm-core
+        rocr-debug-agent
+        roctracer
+        rocdbgapi
+        rocprofiler
+        rocgdb
+        rocm-language-runtime
+      ];
+    };
+
+    rocm-ml-sdk = symlinkJoin {
+      name = "rocm-ml-sdk-meta";
+
+      paths = [
+        rocm-core
+        miopen-hip
+        rocm-hip-sdk
+        rocm-ml-libraries
+      ];
+    };
+
+    rocm-ml-libraries = symlinkJoin {
+      name = "rocm-ml-libraries-meta";
+
+      paths = [
+        llvm.clang
+        llvm.mlir
+        llvm.openmp
+        rocm-core
+        miopen-hip
+        rocm-hip-libraries
+      ];
+    };
+
+    rocm-hip-sdk = symlinkJoin {
+      name = "rocm-hip-sdk-meta";
+
+      paths = [
+        rocprim
+        rocalution
+        hipfft
+        rocm-core
+        hipcub
+        hipblas
+        rocrand
+        rocfft
+        rocsparse
+        rccl
+        rocthrust
+        rocblas
+        hipsparse
+        hipfort
+        rocwmma
+        hipsolver
+        rocsolver
+        rocm-hip-libraries
+        rocm-hip-runtime-devel
+      ];
+    };
+
+    rocm-hip-libraries = symlinkJoin {
+      name = "rocm-hip-libraries-meta";
+
+      paths = [
+        rocblas
+        hipfort
+        rocm-core
+        rocsolver
+        rocalution
+        rocrand
+        hipblas
+        rocfft
+        hipfft
+        rccl
+        rocsparse
+        hipsparse
+        hipsolver
+        rocm-hip-runtime
+      ];
+    };
+
+    rocm-openmp-sdk = symlinkJoin {
+      name = "rocm-openmp-sdk-meta";
+
+      paths = [
+        rocm-core
+        llvm.clang
+        llvm.mlir
+        llvm.openmp # openmp-extras-devel (https://github.com/ROCm-Developer-Tools/aomp)
+        rocm-language-runtime
+      ];
+    };
+
+    rocm-opencl-sdk = symlinkJoin {
+      name = "rocm-opencl-sdk-meta";
+
+      paths = [
+        rocm-core
+        rocm-runtime
+        clr
+        clr.icd
+        rocm-thunk
+        rocm-opencl-runtime
+      ];
+    };
+
+    rocm-opencl-runtime = symlinkJoin {
+      name = "rocm-opencl-runtime-meta";
+
+      paths = [
+        rocm-core
+        clr
+        clr.icd
+        rocm-language-runtime
+      ];
+    };
+
+    rocm-hip-runtime-devel = symlinkJoin {
+      name = "rocm-hip-runtime-devel-meta";
+
+      paths = [
+        clr
+        rocm-core
+        hipify
+        rocm-cmake
+        llvm.clang
+        llvm.mlir
+        llvm.openmp
+        rocm-thunk
+        rocm-runtime
+        rocm-hip-runtime
+      ];
+    };
+
+    rocm-hip-runtime = symlinkJoin {
+      name = "rocm-hip-runtime-meta";
+
+      paths = [
+        rocm-core
+        rocminfo
+        clr
+        rocm-language-runtime
+      ];
+    };
+
+    rocm-language-runtime = symlinkJoin {
+      name = "rocm-language-runtime-meta";
+
+      paths = [
+        rocm-runtime
+        rocm-core
+        rocm-comgr
+        llvm.openmp # openmp-extras-runtime (https://github.com/ROCm-Developer-Tools/aomp)
+      ];
+    };
+
+    rocm-all = symlinkJoin {
+      name = "rocm-all-meta";
+
+      paths = [
+        rocm-developer-tools
+        rocm-ml-sdk
+        rocm-ml-libraries
+        rocm-hip-sdk
+        rocm-hip-libraries
+        rocm-openmp-sdk
+        rocm-opencl-sdk
+        rocm-opencl-runtime
+        rocm-hip-runtime-devel
+        rocm-hip-runtime
+        rocm-language-runtime
+      ];
+    };
+  };
 }