Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove intel mkl from flake.nix due to missing files #2277

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Remove intel mkl from flake.nix due to missing files #2277

merged 1 commit into from
Jul 21, 2023

Conversation

Freed-Wu
Copy link
Contributor

NixOS's mkl misses some libraries like mkl-sdl.pc. See #2261
Currently NixOS doesn't have intel C compiler (icx, icpx). See https://discourse.nixos.org/t/packaging-intel-math-kernel-libraries-mkl/975
So remove it from flake.nix

Some minor changes:

Now build it for NixOS on x86_64-linux will use openBlas:

$ nix build --impure
$ tree result/
 result
├──  bin
│  ├──  baby-llama
│  ├──  benchmark
│  ├──  convert-lora-to-ggml.py
│  ├──  convert.py
│  ├──  embd-input-test
│  ├──  embedding
│  ├──  llama
│  ├──  llama-server
│  ├──  perplexity
│  ├──  quantize
│  ├──  quantize-stats
│  ├──  save-load-state
│  ├──  simple
│  ├──  test-grad0
│  ├──  test-quantize-fns
│  ├──  test-quantize-perf
│  ├──  test-sampling
│  ├──  test-tokenizer-0
│  └──  train-text-from-scratch
└──  lib
   ├──  libembdinput.so
   ├──  libggml_shared.so
   └──  libllama.so
$ ldd result/bin/llama | rg openblas
7:      libopenblas.so.0 => /nix/store/0cz1gdz17hk9myawjpycscm4dnhy7b3l-openblas-0.3.21/lib/libopenblas.so.0 (0x00007f2ea7860000)

I have tested it can work for NixOS on x86_64-linux.

NixOS's mkl misses some libraries like mkl-sdl.pc. See #2261
Currently NixOS doesn't have intel C compiler (icx, icpx). See https://discourse.nixos.org/t/packaging-intel-math-kernel-libraries-mkl/975
So remove it from flake.nix

Some minor changes:

- Change pkgs.python310 to pkgs.python3 to keep latest
- Add pkgconfig to devShells.default
- Remove installPhase because we have `cmake --install` from #2256
@ggerganov ggerganov merged commit 78a3d13 into ggerganov:master Jul 21, 2023
24 checks passed
@Freed-Wu Freed-Wu deleted the flake branch July 22, 2023 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants