-
Notifications
You must be signed in to change notification settings - Fork 13k
ggml-cpu: drop support for nnpa intrinsics #15821
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
Merged
taronaeo
merged 2 commits into
ggml-org:master
from
taronaeo:refactor/rm-nnpa-intrinsics
Sep 6, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,18 +42,6 @@ cmake --build build --config Release -j $(nproc) | |
cmake --build build --config Release -j $(nproc) | ||
``` | ||
|
||
- By default, NNPA is disabled by default. To enable it: | ||
|
||
```bash | ||
cmake -S . -B build \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DGGML_BLAS=ON \ | ||
-DGGML_BLAS_VENDOR=OpenBLAS \ | ||
-DGGML_NNPA=ON | ||
|
||
cmake --build build --config Release -j $(nproc) | ||
``` | ||
|
||
- For debug builds: | ||
|
||
```bash | ||
|
@@ -164,15 +152,11 @@ All models need to be converted to Big-Endian. You can achieve this in three cas | |
|
||
Only available in IBM z15/LinuxONE 3 or later system with the `-DGGML_VXE=ON` (turned on by default) compile flag. No hardware acceleration is possible with llama.cpp with older systems, such as IBM z14/arch12. In such systems, the APIs can still run but will use a scalar implementation. | ||
|
||
### 2. NNPA Vector Intrinsics Acceleration | ||
|
||
Only available in IBM z16/LinuxONE 4 or later system with the `-DGGML_NNPA=ON` (turned off by default) compile flag. No hardware acceleration is possible with llama.cpp with older systems, such as IBM z15/arch13. In such systems, the APIs can still run but will use a scalar implementation. | ||
|
||
### 3. zDNN Accelerator (WIP) | ||
### 2. zDNN Accelerator (WIP) | ||
|
||
Only available in IBM z17/LinuxONE 5 or later system with the `-DGGML_ZDNN=ON` compile flag. No hardware acceleration is possible with llama.cpp with older systems, such as IBM z15/arch13. In such systems, the APIs will default back to CPU routines. | ||
|
||
### 4. Spyre Accelerator | ||
### 3. Spyre Accelerator | ||
|
||
_Only available with IBM z17 / LinuxONE 5 or later system. No support currently available._ | ||
|
||
|
@@ -230,10 +214,6 @@ IBM VXE/VXE2 SIMD acceleration depends on the BLAS implementation. It is strongl | |
CXXFLAGS="-include cstdint" pip3 install -r requirements.txt | ||
``` | ||
|
||
5. `-DGGML_NNPA=ON` generates gibberish output | ||
|
||
Answer: We are aware of this as detailed in [this issue](https://github.com/ggml-org/llama.cpp/issues/14877). Please either try reducing the number of threads, or disable the compile option using `-DGGML_NNPA=OFF`. | ||
|
||
## Getting Help on IBM Z & LinuxONE | ||
|
||
1. **Bugs, Feature Requests** | ||
|
@@ -258,38 +238,38 @@ IBM VXE/VXE2 SIMD acceleration depends on the BLAS implementation. It is strongl | |
|
||
## Appendix B: SIMD Support Matrix | ||
|
||
| | VX/VXE/VXE2 | NNPA | zDNN | Spyre | | ||
| ---------- | ----------- | ---- | ---- | ----- | | ||
| FP32 | ✅ | ✅ | ✅ | ❓ | | ||
| FP16 | ✅ | ✅ | ❓ | ❓ | | ||
| BF16 | 🚫 | 🚫 | ❓ | ❓ | | ||
| Q4_0 | ✅ | ✅ | ❓ | ❓ | | ||
| Q4_1 | ✅ | ✅ | ❓ | ❓ | | ||
| MXFP4 | 🚫 | 🚫 | ❓ | ❓ | | ||
| Q5_0 | ✅ | ✅ | ❓ | ❓ | | ||
| Q5_1 | ✅ | ✅ | ❓ | ❓ | | ||
| Q8_0 | ✅ | ✅ | ❓ | ❓ | | ||
| Q2_K | 🚫 | 🚫 | ❓ | ❓ | | ||
| Q3_K | ✅ | ✅ | ❓ | ❓ | | ||
| Q4_K | ✅ | ✅ | ❓ | ❓ | | ||
| Q5_K | ✅ | ✅ | ❓ | ❓ | | ||
| Q6_K | ✅ | ✅ | ❓ | ❓ | | ||
| TQ1_0 | 🚫 | 🚫 | ❓ | ❓ | | ||
| TQ2_0 | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ2_XXS | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ2_XS | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ2_S | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ3_XXS | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ3_S | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ1_S | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ1_M | 🚫 | 🚫 | ❓ | ❓ | | ||
| IQ4_NL | ✅ | ✅ | ❓ | ❓ | | ||
| IQ4_XS | ✅ | ✅ | ❓ | ❓ | | ||
| FP32->FP16 | 🚫 | ✅ | ❓ | ❓ | | ||
| FP16->FP32 | 🚫 | ✅ | ❓ | ❓ | | ||
| | VX/VXE/VXE2 | zDNN | Spyre | | ||
|------------|-------------|------|-------| | ||
| FP32 | ✅ | ✅ | ❓ | | ||
| FP16 | ✅ | ❓ | ❓ | | ||
| BF16 | 🚫 | ❓ | ❓ | | ||
| Q4_0 | ✅ | ❓ | ❓ | | ||
| Q4_1 | ✅ | ❓ | ❓ | | ||
| MXFP4 | 🚫 | ❓ | ❓ | | ||
| Q5_0 | ✅ | ❓ | ❓ | | ||
| Q5_1 | ✅ | ❓ | ❓ | | ||
| Q8_0 | ✅ | ❓ | ❓ | | ||
| Q2_K | 🚫 | ❓ | ❓ | | ||
| Q3_K | ✅ | ❓ | ❓ | | ||
| Q4_K | ✅ | ❓ | ❓ | | ||
| Q5_K | ✅ | ❓ | ❓ | | ||
| Q6_K | ✅ | ❓ | ❓ | | ||
| TQ1_0 | 🚫 | ❓ | ❓ | | ||
| TQ2_0 | 🚫 | ❓ | ❓ | | ||
| IQ2_XXS | 🚫 | ❓ | ❓ | | ||
| IQ2_XS | 🚫 | ❓ | ❓ | | ||
| IQ2_S | 🚫 | ❓ | ❓ | | ||
| IQ3_XXS | 🚫 | ❓ | ❓ | | ||
| IQ3_S | 🚫 | ❓ | ❓ | | ||
| IQ1_S | 🚫 | ❓ | ❓ | | ||
| IQ1_M | 🚫 | ❓ | ❓ | | ||
| IQ4_NL | ✅ | ❓ | ❓ | | ||
| IQ4_XS | ✅ | ❓ | ❓ | | ||
| FP32->FP16 | 🚫 | ❓ | ❓ | | ||
| FP16->FP32 | 🚫 | ❓ | ❓ | | ||
|
||
- ✅ - acceleration available | ||
- 🚫 - acceleration unavailable, will still run using scalar implementation | ||
- ❓ - acceleration unknown, please contribute if you can test it yourself | ||
|
||
Last Updated by **Aaron Teo ([email protected])** on Aug 22, 2025. | ||
Last Updated by **Aaron Teo ([email protected])** on Sep 6, 2025. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.