Hello,
Your windows binaries releases have probably been built with MSVC and I think there's a better way to do it.
Expected Behavior
I have a Intel® Core™ i7-10700K and the builds are supposed to recognize those architectures: [AVX | AVX2 | FMA | SSE3 | F16C]
Current Behavior
Windows (MSVC build)
system_info: n_threads = 14 / 16 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 0 |
NEON = 0 | ARM_FMA = 0 | F16C = 0 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 0 | VSX = 0 |
It misses the FMA, SSE3 and the F16C architectures.
Fix with Clang
If you build with Clang you'll get all the architectures right:
Windows (Clang build)
system_info: n_threads = 14 / 16 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 |
NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 0 | SSE3 = 1 | VSX = 0 |
How to build with Clang
- Install Clang
To do this, you have to install something called LLVM
I downloaded LLVM-16.0.0-win64.exe but it could be LLVM-16.0.0-win32.exe for people that has Windows 32 bit.
During the install, Choose "Add LLVM to the system PATH for all users"
After the installation you can verify if you have clang installed on your computer by running clang --version on your cmd
Normally you'll get something like this
C:\Users\Utilisateur>clang --version
clang version 16.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
- Install chocolate (that's necessary to install Ninja (which is necessary to build with clang 😵 ))
To do that, open powershell as an administrator and run this command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- Install Ninja
Open powershell as an administrator and run this command:
- Build with clang
run your cmd on the llama.cpp repository and run those commands
cmake -G "Ninja" -S . -B Windows-build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
cmake --build Windows-build/ --config Release
You'll get your exe here:
Hello,
Your windows binaries releases have probably been built with MSVC and I think there's a better way to do it.
Expected Behavior
I have a Intel® Core™ i7-10700K and the builds are supposed to recognize those architectures: [AVX | AVX2 | FMA | SSE3 | F16C]
Current Behavior
Windows (MSVC build)
It misses the FMA, SSE3 and the F16C architectures.
Fix with Clang
If you build with Clang you'll get all the architectures right:
Windows (Clang build)
How to build with Clang
To do this, you have to install something called LLVM
I downloaded LLVM-16.0.0-win64.exe but it could be LLVM-16.0.0-win32.exe for people that has Windows 32 bit.
During the install, Choose "Add LLVM to the system PATH for all users"
After the installation you can verify if you have clang installed on your computer by running
clang --versionon your cmdNormally you'll get something like this
To do that, open powershell as an administrator and run this command:
Open powershell as an administrator and run this command:
run your cmd on the llama.cpp repository and run those commands
You'll get your exe here: