diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix index b3753a63339a..27509ee99339 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/magma/generic.nix @@ -18,15 +18,12 @@ , gfortran , cudaCapabilities ? cudaPackages.cudaFlags.cudaCapabilities , gpuTargets ? [ ] # Non-CUDA targets, that is HIP -, hip -, hipblas -, hipsparse +, rocmPackages , lapack , lib , libpthreadstubs , magmaRelease , ninja -, openmp , rocmSupport ? false , static ? false , stdenv @@ -47,7 +44,7 @@ let # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like cudaFlags.realArches. # For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must # remove it. - rocmArches = lists.map (x: strings.removePrefix "gfx" x) hip.gpuTargets; + rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets; supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets; unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches; @@ -124,11 +121,13 @@ stdenv.mkDerivation { cuda_nvprof.dev # <cuda_profiler_api.h> ] ++ lists.optionals (strings.versionAtLeast cudaVersion "11.8") [ cuda_profiler_api.dev # <cuda_profiler_api.h> + ] ++ lists.optionals (strings.versionAtLeast cudaVersion "12.0") [ + cuda_cccl.dev # <nv/target> ]) ++ lists.optionals rocmSupport [ - hip - hipblas - hipsparse - openmp + rocmPackages.clr + rocmPackages.hipblas + rocmPackages.hipsparse + rocmPackages.llvm.openmp ]; cmakeFlags = [ @@ -142,8 +141,8 @@ stdenv.mkDerivation { "-DCMAKE_CXX_COMPILER=${backendStdenv.cc}/bin/c++" "-DMAGMA_ENABLE_CUDA=ON" ] ++ lists.optionals rocmSupport [ - "-DCMAKE_C_COMPILER=${hip}/bin/hipcc" - "-DCMAKE_CXX_COMPILER=${hip}/bin/hipcc" + "-DCMAKE_C_COMPILER=${rocmPackages.clr}/bin/hipcc" + "-DCMAKE_CXX_COMPILER=${rocmPackages.clr}/bin/hipcc" "-DMAGMA_ENABLE_HIP=ON" ]; |