1 { gcc12Stdenv # FIXME: Try removing this with a new ROCm release https://github.com/NixOS/nixpkgs/issues/271943
16 rocmUpdateScript = callPackage ./update.nix { };
19 llvm = recurseIntoAttrs (callPackage ./llvm/default.nix { inherit rocmUpdateScript rocm-device-libs rocm-runtime rocm-thunk clr; });
21 rocm-core = callPackage ./rocm-core {
22 inherit rocmUpdateScript;
23 stdenv = llvm.rocmClangStdenv;
26 rocm-cmake = callPackage ./rocm-cmake {
27 inherit rocmUpdateScript;
28 stdenv = llvm.rocmClangStdenv;
31 rocm-thunk = callPackage ./rocm-thunk {
32 inherit rocmUpdateScript;
33 stdenv = llvm.rocmClangStdenv;
36 rocm-smi = python3Packages.callPackage ./rocm-smi {
37 inherit rocmUpdateScript;
38 stdenv = llvm.rocmClangStdenv;
41 # Eventually will be in the LLVM repo
42 rocm-device-libs = callPackage ./rocm-device-libs {
43 inherit rocmUpdateScript rocm-cmake;
44 stdenv = llvm.rocmClangStdenv;
47 rocm-runtime = callPackage ./rocm-runtime {
48 inherit rocmUpdateScript rocm-device-libs rocm-thunk;
49 stdenv = llvm.rocmClangStdenv;
52 # Eventually will be in the LLVM repo
53 rocm-comgr = callPackage ./rocm-comgr {
54 inherit rocmUpdateScript rocm-cmake rocm-device-libs;
55 stdenv = llvm.rocmClangStdenv;
58 rocminfo = callPackage ./rocminfo {
59 inherit rocmUpdateScript rocm-cmake rocm-runtime;
60 stdenv = llvm.rocmClangStdenv;
63 clang-ocl = callPackage ./clang-ocl {
64 inherit rocmUpdateScript rocm-cmake rocm-device-libs;
65 stdenv = llvm.rocmClangStdenv;
69 hsa-amd-aqlprofile-bin = callPackage ./hsa-amd-aqlprofile-bin {
70 stdenv = llvm.rocmClangStdenv;
73 # Broken, too many errors
74 rdc = callPackage ./rdc {
75 inherit rocmUpdateScript rocm-smi rocm-runtime;
77 # stdenv = llvm.rocmClangStdenv;
80 rocm-docs-core = python3Packages.callPackage ./rocm-docs-core { stdenv = gcc12Stdenv; };
82 hip-common = callPackage ./hip-common {
83 inherit rocmUpdateScript;
84 stdenv = llvm.rocmClangStdenv;
87 # Eventually will be in the LLVM repo
88 hipcc = callPackage ./hipcc {
89 inherit rocmUpdateScript;
90 stdenv = llvm.rocmClangStdenv;
93 # Replaces hip, opencl-runtime, and rocclr
94 clr = callPackage ./clr {
95 inherit rocmUpdateScript hip-common hipcc rocm-device-libs rocm-comgr rocm-runtime roctracer rocminfo rocm-smi;
97 stdenv = llvm.rocmClangStdenv;
100 hipify = callPackage ./hipify {
101 inherit rocmUpdateScript;
102 inherit (llvm) clang;
103 stdenv = llvm.rocmClangStdenv;
107 rocprofiler = callPackage ./rocprofiler {
108 inherit rocmUpdateScript clr rocm-core rocm-thunk rocm-device-libs roctracer rocdbgapi rocm-smi hsa-amd-aqlprofile-bin;
109 inherit (llvm) clang;
110 stdenv = gcc12Stdenv;
114 roctracer = callPackage ./roctracer {
115 inherit rocmUpdateScript rocm-device-libs rocm-runtime clr;
116 stdenv = gcc12Stdenv;
120 rocgdb = callPackage ./rocgdb {
121 inherit rocmUpdateScript;
122 elfutils = elfutils.override { enableDebuginfod = true; };
123 stdenv = gcc12Stdenv;
126 rocdbgapi = callPackage ./rocdbgapi {
127 inherit rocmUpdateScript rocm-cmake rocm-comgr rocm-runtime;
128 stdenv = llvm.rocmClangStdenv;
131 rocr-debug-agent = callPackage ./rocr-debug-agent {
132 inherit rocmUpdateScript clr rocdbgapi;
133 stdenv = llvm.rocmClangStdenv;
136 rocprim = callPackage ./rocprim {
137 inherit rocmUpdateScript rocm-cmake clr;
138 stdenv = llvm.rocmClangStdenv;
141 rocsparse = callPackage ./rocsparse {
142 inherit rocmUpdateScript rocm-cmake rocprim clr;
143 stdenv = llvm.rocmClangStdenv;
146 rocthrust = callPackage ./rocthrust {
147 inherit rocmUpdateScript rocm-cmake rocprim clr;
148 stdenv = llvm.rocmClangStdenv;
151 rocrand = callPackage ./rocrand {
152 inherit rocmUpdateScript rocm-cmake clr;
153 stdenv = llvm.rocmClangStdenv;
156 hiprand = rocrand; # rocrand includes hiprand
158 rocfft = callPackage ./rocfft {
159 inherit rocmUpdateScript rocm-cmake rocrand rocfft clr;
160 inherit (llvm) openmp;
161 stdenv = llvm.rocmClangStdenv;
164 rccl = callPackage ./rccl {
165 inherit rocmUpdateScript rocm-cmake rocm-smi clr hipify;
166 stdenv = llvm.rocmClangStdenv;
169 hipcub = callPackage ./hipcub {
170 inherit rocmUpdateScript rocm-cmake rocprim clr;
171 stdenv = llvm.rocmClangStdenv;
174 hipsparse = callPackage ./hipsparse {
175 inherit rocmUpdateScript rocm-cmake rocsparse clr;
176 inherit (llvm) openmp;
177 stdenv = llvm.rocmClangStdenv;
180 hipfort = callPackage ./hipfort {
181 inherit rocmUpdateScript rocm-cmake;
182 stdenv = llvm.rocmClangStdenv;
185 hipfft = callPackage ./hipfft {
186 inherit rocmUpdateScript rocm-cmake rocfft clr;
187 inherit (llvm) openmp;
188 stdenv = llvm.rocmClangStdenv;
191 tensile = python3Packages.callPackage ./tensile {
192 inherit rocmUpdateScript rocminfo;
193 stdenv = llvm.rocmClangStdenv;
196 rocblas = callPackage ./rocblas {
197 inherit rocblas rocmUpdateScript rocm-cmake clr tensile;
198 inherit (llvm) openmp;
199 stdenv = llvm.rocmClangStdenv;
202 rocsolver = callPackage ./rocsolver {
203 inherit rocmUpdateScript rocm-cmake rocblas rocsparse clr;
204 stdenv = llvm.rocmClangStdenv;
207 rocwmma = callPackage ./rocwmma {
208 inherit rocmUpdateScript rocm-cmake rocm-smi rocblas clr;
209 inherit (llvm) openmp;
210 stdenv = llvm.rocmClangStdenv;
213 rocalution = callPackage ./rocalution {
214 inherit rocmUpdateScript rocm-cmake rocprim rocsparse rocrand rocblas clr;
215 inherit (llvm) openmp;
216 stdenv = llvm.rocmClangStdenv;
219 rocmlir = callPackage ./rocmlir {
220 inherit rocmUpdateScript rocm-cmake clr;
221 stdenv = llvm.rocmClangStdenv;
224 rocmlir-rock = rocmlir.override {
225 buildRockCompiler = true;
228 hipsolver = callPackage ./hipsolver {
229 inherit rocmUpdateScript rocm-cmake rocblas rocsolver clr;
230 stdenv = llvm.rocmClangStdenv;
233 hipblas = callPackage ./hipblas {
234 inherit rocmUpdateScript rocm-cmake rocblas rocsolver clr;
235 stdenv = llvm.rocmClangStdenv;
238 # hipBlasLt - Very broken with Tensile at the moment, only supports GFX9
239 # hipTensor - Only supports GFX9
241 miopengemm = callPackage ./miopengemm {
242 inherit rocmUpdateScript rocm-cmake clr;
243 stdenv = llvm.rocmClangStdenv;
246 composable_kernel = callPackage ./composable_kernel {
247 inherit rocmUpdateScript rocm-cmake clr;
248 inherit (llvm) openmp clang-tools-extra;
249 stdenv = llvm.rocmClangStdenv;
252 half = callPackage ./half {
253 inherit rocmUpdateScript rocm-cmake;
254 stdenv = llvm.rocmClangStdenv;
257 miopen = callPackage ./miopen {
258 inherit rocmUpdateScript rocm-cmake rocblas clang-ocl miopengemm composable_kernel rocm-comgr clr rocm-docs-core half;
259 inherit (llvm) clang-tools-extra;
260 stdenv = llvm.rocmClangStdenv;
261 rocmlir = rocmlir-rock;
262 boost = boost179.override { enableStatic = true; };
265 miopen-hip = miopen.override {
269 miopen-opencl = miopen.override {
273 migraphx = callPackage ./migraphx {
274 inherit rocmUpdateScript rocm-cmake rocblas composable_kernel miopengemm miopen clr half rocm-device-libs;
275 inherit (llvm) openmp clang-tools-extra;
276 stdenv = llvm.rocmClangStdenv;
277 rocmlir = rocmlir-rock;
280 rpp = callPackage ./rpp {
281 inherit rocmUpdateScript rocm-cmake rocm-docs-core clr half;
282 inherit (llvm) openmp;
283 stdenv = llvm.rocmClangStdenv;
286 rpp-hip = rpp.override {
291 rpp-opencl = rpp.override {
296 rpp-cpu = rpp.override {
301 mivisionx = callPackage ./mivisionx {
302 inherit rocmUpdateScript rocm-cmake rocm-device-libs clr rpp rocblas miopengemm miopen migraphx half rocm-docs-core;
303 inherit (llvm) clang openmp;
304 opencv = opencv.override { enablePython = true; };
306 stdenv = llvm.rocmClangStdenv;
308 # Unfortunately, rocAL needs a custom libjpeg-turbo until further notice
309 # See: https://github.com/ROCm/MIVisionX/issues/1051
310 libjpeg_turbo = libjpeg_turbo.overrideAttrs {
313 src = fetchFromGitHub {
315 repo = "libjpeg-turbo";
316 rev = "640d7ee1917fcd3b6a5271aa6cf4576bccc7c5fb";
317 sha256 = "sha256-T52whJ7nZi8jerJaZtYInC2YDN0QM+9tUDqiNr6IsNY=";
320 # overwrite all patches, since patches for newer version do not apply
321 patches = [ ../6/0001-Compile-transupp.c-as-part-of-the-library.patch ];
325 mivisionx-hip = mivisionx.override {
331 mivisionx-opencl = mivisionx.override {
333 miopen = miopen-opencl;
338 mivisionx-cpu = mivisionx.override {
345 # Emulate common ROCm meta layout
346 # These are mainly for users. I strongly suggest NOT using these in nixpkgs derivations
347 # Don't put these into `propagatedBuildInputs` unless you want PATH/PYTHONPATH issues!
348 # See: https://rocm.docs.amd.com/en/docs-5.7.1/_images/image.004.png
349 # See: https://rocm.docs.amd.com/en/docs-5.7.1/deploy/linux/os-native/package_manager_integration.html
351 rocm-developer-tools = symlinkJoin {
352 name = "rocm-developer-tools-meta";
355 hsa-amd-aqlprofile-bin
362 rocm-language-runtime
366 rocm-ml-sdk = symlinkJoin {
367 name = "rocm-ml-sdk-meta";
377 rocm-ml-libraries = symlinkJoin {
378 name = "rocm-ml-libraries-meta";
390 rocm-hip-sdk = symlinkJoin {
391 name = "rocm-hip-sdk-meta";
412 rocm-hip-runtime-devel
416 rocm-hip-libraries = symlinkJoin {
417 name = "rocm-hip-libraries-meta";
437 rocm-openmp-sdk = symlinkJoin {
438 name = "rocm-openmp-sdk-meta";
444 llvm.openmp # openmp-extras-devel (https://github.com/ROCm/aomp)
445 rocm-language-runtime
449 rocm-opencl-sdk = symlinkJoin {
450 name = "rocm-opencl-sdk-meta";
462 rocm-opencl-runtime = symlinkJoin {
463 name = "rocm-opencl-runtime-meta";
469 rocm-language-runtime
473 rocm-hip-runtime-devel = symlinkJoin {
474 name = "rocm-hip-runtime-devel-meta";
490 rocm-hip-runtime = symlinkJoin {
491 name = "rocm-hip-runtime-meta";
497 rocm-language-runtime
501 rocm-language-runtime = symlinkJoin {
502 name = "rocm-language-runtime-meta";
508 llvm.openmp # openmp-extras-runtime (https://github.com/ROCm/aomp)
512 rocm-all = symlinkJoin {
513 name = "rocm-all-meta";
524 rocm-hip-runtime-devel
526 rocm-language-runtime