Skip to content

Commit b06c16e

Browse files
authored
nix: fix blas support (ggml-org#6281)
Since no blas was provided to buildInputs, the executable is built without blas support. This is a backport of NixOS/nixpkgs#298567
1 parent 1f2fd4e commit b06c16e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.devops/nix/package.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
git,
1111
python3,
1212
mpi,
13-
openblas, # TODO: Use the generic `blas` so users could switch between alternative implementations
13+
blas,
1414
cudaPackages,
1515
darwin,
1616
rocmPackages,
@@ -181,6 +181,7 @@ effectiveStdenv.mkDerivation (
181181
++ optionals useMpi [ mpi ]
182182
++ optionals useOpenCL [ clblast ]
183183
++ optionals useRocm rocmBuildInputs
184+
++ optionals useBlas [ blas ]
184185
++ optionals useVulkan vulkanBuildInputs;
185186

186187
cmakeFlags =
@@ -216,8 +217,7 @@ effectiveStdenv.mkDerivation (
216217
# Should likely use `rocmPackages.clr.gpuTargets`.
217218
"-DAMDGPU_TARGETS=gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102"
218219
]
219-
++ optionals useMetalKit [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ]
220-
++ optionals useBlas [ (lib.cmakeFeature "LLAMA_BLAS_VENDOR" "OpenBLAS") ];
220+
++ optionals useMetalKit [ (lib.cmakeFeature "CMAKE_C_FLAGS" "-D__ARM_FEATURE_DOTPROD=1") ];
221221

222222
# TODO(SomeoneSerge): It's better to add proper install targets at the CMake level,
223223
# if they haven't been added yet.

0 commit comments

Comments
 (0)