nix: moved blas availability check to package inputs so it is still overridable

This commit is contained in:
hutli 2024-03-27 19:14:28 +01:00 committed by Someone
parent c873976649
commit d39b308eaf

View File

@ -18,13 +18,13 @@
vulkan-headers, vulkan-headers,
vulkan-loader, vulkan-loader,
clblast, clblast,
useBlas ? builtins.all (x: !x) [ useBlas ? builtins.all (x: !x) [
useCuda useCuda
useMetalKit useMetalKit
useOpenCL useOpenCL
useRocm useRocm
useVulkan useVulkan
], ] && blas.meta.available,
useCuda ? config.cudaSupport, useCuda ? config.cudaSupport,
useMetalKit ? stdenv.isAarch64 && stdenv.isDarwin && !useOpenCL, useMetalKit ? stdenv.isAarch64 && stdenv.isDarwin && !useOpenCL,
useMpi ? false, # Increases the runtime closure size by ~700M useMpi ? false, # Increases the runtime closure size by ~700M
@ -200,7 +200,7 @@ effectiveStdenv.mkDerivation (
++ optionals useMpi [ mpi ] ++ optionals useMpi [ mpi ]
++ optionals useOpenCL [ clblast ] ++ optionals useOpenCL [ clblast ]
++ optionals useRocm rocmBuildInputs ++ optionals useRocm rocmBuildInputs
++ optionals (useBlas && blas.meta.available) [ blas ] ++ optionals useBlas [ blas ]
++ optionals useVulkan vulkanBuildInputs; ++ optionals useVulkan vulkanBuildInputs;
cmakeFlags = cmakeFlags =