Skip to content

Enable BUILD_SHARED_LIBS=ON on all Windows builds - #3215

Merged
Green-Sky merged 1 commit into
ggml-org:masterfrom
IsaacDynamo:release-dll
Sep 16, 2023
Merged

Green-Sky merged 1 commit into
ggml-org:masterfrom
IsaacDynamo:release-dll

Conversation

@IsaacDynamo

Copy link
Copy Markdown
Contributor

Enabled BUILD_SHARED_LIBS=ON on all Windows builds. With this change the release .zip files also contain llama.dll.

The release .dll allows you to use llama-cpp-python without compiling everything yourself. This is convenient for the more involved build targets such as cuBLAS.

llama-cpp-python will use the release .dll when the LLAMA_CPP_LIB env variable is set to the path of llama.dll

Tested the AVX2, OpenBLAS and cuBLAS .dll's with the following commands, and they work:

set LLAMA_CPP_LIB=C:\llama-release-dll-b1248-11eb9fb-bin-win-cublas-cu12.2.0-x64\llama.dll
set PATH=C:\llama-release-dll-b1248-11eb9fb-bin-win-cublas-cu12.2.0-x64;%PATH%
python.exe -m llama_cpp.server --model llama-2-7b-chat.Q5_K_M.gguf

@slaren

slaren commented Sep 16, 2023

Copy link
Copy Markdown
Member

Looks like this also reduces the size of the releases by a factor of 10, which is great.

@Green-Sky Green-Sky linked an issue Sep 16, 2023 that may be closed by this pull request
@Green-Sky

Copy link
Copy Markdown
Collaborator

@IsaacDynamo did you check the cublas builds still work? they got suspiciously small :)

... also totally forgot i wanted to do this 😄

@slaren

slaren commented Sep 16, 2023

Copy link
Copy Markdown
Member

I tested the avx2 and cu12 executables and they work for me.

@Green-Sky
Green-Sky merged commit b541b4f into ggml-org:master Sep 16, 2023
pkrmf pushed a commit to morlockstudios-com/llama.cpp that referenced this pull request Sep 26, 2023
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
phuongncn pushed a commit to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4 that referenced this pull request Apr 28, 2026
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
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.

[HOWTO] Easily compile llama.dll without hassle.

3 participants