-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Closed
Labels
enhancementNew feature or requestNew feature or request
Activity
and it would increase the size of a package with GGML_CPU_ALL_VARIANTS=ON.
How much does it increase with?
This is from my openSUSE Tumbleweed package for b7378
The additional ivybridge backend is 710Kib. You can compare to the others. I don't LTO (link-time optimization) in these packages yet; not sure if that will have an impact. The vulkan backend is huge by comparison!
▶ rpm -ql libggml0 | xargs ls -ldh
drwxr-xr-x 2 root root 4.0K Dec 13 10:12 /usr/lib64/ggml
-rwxr-xr-x 1 root root 63K Dec 13 08:15 /usr/lib64/ggml/libggml-blas.so
-rwxr-xr-x 1 root root 764K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-alderlake.so
-rwxr-xr-x 1 root root 768K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-haswell.so
-rwxr-xr-x 1 root root 865K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-icelake.so
-rwxr-xr-x 1 root root 710K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-ivybridge.so
-rwxr-xr-x 1 root root 701K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-sandybridge.so
-rwxr-xr-x 1 root root 1013K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-sapphirerapids.so
-rwxr-xr-x 1 root root 865K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-skylakex.so
-rwxr-xr-x 1 root root 587K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-sse42.so
-rwxr-xr-x 1 root root 579K Dec 13 08:15 /usr/lib64/ggml/libggml-cpu-x64.so
-rwxr-xr-x 1 root root 715K Dec 13 08:15 /usr/lib64/ggml/libggml-opencl.so
-rwxr-xr-x 1 root root 119K Dec 13 08:15 /usr/lib64/ggml/libggml-rpc.so
-rwxr-xr-x 1 root root 51M Dec 13 08:15 /usr/lib64/ggml/libggml-vulkan.so
lrwxrwxrwx 1 root root 17 Dec 13 08:15 /usr/lib64/libggml-base.so -> libggml-base.so.0
lrwxrwxrwx 1 root root 21 Dec 13 08:15 /usr/lib64/libggml-base.so.0 -> libggml-base.so.0.9.4
-rwxr-xr-x 1 root root 551K Dec 13 08:15 /usr/lib64/libggml-base.so.0.9.4
lrwxrwxrwx 1 root root 12 Dec 13 08:15 /usr/lib64/libggml.so -> libggml.so.0
lrwxrwxrwx 1 root root 16 Dec 13 08:15 /usr/lib64/libggml.so.0 -> libggml.so.0.9.4
-rwxr-xr-x 1 root root 50K Dec 13 08:15 /usr/lib64/libggml.so.0.9.4
drwxr-xr-x 2 root root 4.0K Dec 13 10:12 /usr/share/licenses/libggml0
-rw-r--r-- 1 root root 1.1K Dec 13 01:35 /usr/share/licenses/libggml0/LICENSE
added a commit that references this issue on Dec 19, 2025
added 2 commits that reference this issue on Dec 24, 2025
added a commit that references this issue on Dec 28, 2025
added a commit that references this issue on Feb 5, 2026
added a commit that references this issue on Apr 27, 2026
added a commit that references this issue on May 7, 2026
added 2 commits that reference this issue on May 16, 2026
added a commit that references this issue on May 29, 2026
added a commit that references this issue on May 31, 2026
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.
Prerequisites
Feature Description
Hello,
I looked at the CMake code and noticed that one could add an additional CPU backend for Ivy Bridge/Piledriver.
From
ggml/src/CMakeLists.txtatb7360:Ivy Bridge and Piledriver support
F16Cbut notAVX2. Support could be added with:I looked at the code rest of the code, and conditions on
__F16C__but not__AVX2__are few, but not zero. I'm not sure what the performance difference would be, and it would increase the size of a package withGGML_CPU_ALL_VARIANTS=ON.Piledriver also seems to support
FMA. It could have its own backend with:I noticed there are some issues with MSVC around these two features specifically, but I think it's worth adding support just for GCC/Linux.
I would like to know if you would consider adding these additional backend(s), or if we could add comments in the
CMakeLists.txtthat these and other specific targets would not have dedicated backends. Thanks.Motivation
I think it's worth adding the backend(s) for people who don't build their own custom binaries, and use packages built with
GGML_CPU_ALL_VARIANTS=ONon older hardware. I think it supports Better packaging for llama.cpp to support downstream consumers. I have some Ivy Bridges with a "larger" amount of RAM I would like to try outllama.cppon, and I build my own generic Linux packages.Possible Implementation
I've already looked at the code, and so far I noticed that 2 lines need to be added to build an additional
ivybridgebackend. I built openSUSE, Fedora, and AlmaLinux packages with the additional backend successfully. I haven't tried to run the complete CI pipeline as suggested, so I didn't open an PR, and am looking for your feedback on the issue.