-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Changes to CMakePresets.json to add ninja clang target on windows #10668
Changes to CMakePresets.json to add ninja clang target on windows #10668
Conversation
Do you want to maybe just match what I did for the Windows on ARM64 |
Hi @max-krasnyansky , the preset target names were changed as per the above comment. The aim is to facilitate users to build with clang on x64/x86 Platforms on windows. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Srihari-mcw
Sorry. I approved first but then realized that there is still no toolchain file.
Just copy cmake/arm64-windows-llvm.cmake to cmake/x64-windows-llvm.cmake and update CFLAGS and things.
We probably don't need to use .exe
in the compiler name either.
HI @max-krasnyansky , updates were made to use .cmake file. Thanks |
…erganov#10668) * Update cmakepreset.json to use clang with ninja by default * Update cmakepreset.json to add clang and ninja based configs * Updates to build.md file * Make updates to rename preset targets * Update with .cmake file * Remove additional whitespaces * Add .cmake file for x64-windows-llvm * Update docs/build.md * Update docs/build.md --------- Co-authored-by: Max Krasnyansky <max.krasnyansky@gmail.com>
This PR adds changes to CMakePresets.json to add a ninja clang target on windows. This will help users to build llama.cpp with clang and ninja dependencies, with relative ease. The additional dependencies are listed in build.md
Build commands :
Experiments were conducted to test llama.cpp with MSVC (Visual Studio Generator), Clang (Ninja) and Clang-Cl (Visual Studio Generator) and to compare the performance
Best performance was seen among the three for clang with ninja generator
Ninja Generator, Clang.exe/Clang++.exe (17.0.3)
Both the clang builds are done without the openmp dependencies
The tests were conducted in AMD Raphael 7600X which supports the following flags (The same were kept on in our windows tests) :
AVX = 1 | AVX_VNNI = 0 | AVX2 = 1 | AVX512 = 1 | AVX512_VBMI = 1 | AVX512_VNNI = 1 | AVX512_BF16 = 1 | FMA = 1 | NEON = 0 | SVE = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | MATMUL_INT8 = 0 | LLAMAFILE = 1|
Prompt Processing
Text Generation
OS : Windows
Tests done with Meta Llama2 7B model