[GH-ISSUE #10918] Don't have these instructions on my HOST. #53695

Closed
opened 2026-04-29 04:32:48 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @phalexo on GitHub (May 30, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10918

What is the issue?

I have older CPUs, I want it compiled with minimal dependencies on specific Intel architecture.

Is there an earlier version that does not have this problem?

Relevant log output

cc: error: unrecognized command line option ‘-mavxvnni’; did you mean ‘-mavx512vnni’?
make[2]: *** [ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/build.make:79: ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/ggml-cpu/ggml-cpu.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:709: ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
(Pythagora) developer@ai:~/ollama$ vi [ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/build.make

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

Compiling from github source.

Originally created by @phalexo on GitHub (May 30, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10918 ### What is the issue? I have older CPUs, I want it compiled with minimal dependencies on specific Intel architecture. Is there an earlier version that does not have this problem? ### Relevant log output ```shell cc: error: unrecognized command line option ‘-mavxvnni’; did you mean ‘-mavx512vnni’? make[2]: *** [ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/build.make:79: ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/ggml-cpu/ggml-cpu.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:709: ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 (Pythagora) developer@ai:~/ollama$ vi [ml/backend/ggml/ggml/src/CMakeFiles/ggml-cpu-alderlake.dir/build.make ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version Compiling from github source.
GiteaMirror added the bug label 2026-04-29 04:32:48 -05:00
Author
Owner

@rick-github commented on GitHub (May 30, 2025):

Have you just tried installing ollama? It picks a backend based on the available features of the CPU, so shouldn't try and run backends that contain unsupported instructions.

Failing that, you can edit the build files to remove references to alderlake.

<!-- gh-comment-id:2923450998 --> @rick-github commented on GitHub (May 30, 2025): Have you just tried installing ollama? It picks a backend based on the available features of the CPU, so shouldn't try and run backends that contain unsupported instructions. Failing that, you can edit the build files to remove references to alderlake.
Author
Owner

@phalexo commented on GitHub (May 30, 2025):

Have you just tried installing ollama? It picks a backend based on the available features of the CPU, so shouldn't try and run backends that contain unsupported instructions.

Failing that, you can edit the build files to remove references to alderlake.

Apparently it is not identifying the architecture correctly.

Could you suggest which files I need to edit? Or at least the folder where I can grep for alderlake?

p.s. I not sure what is meant by "just tried installing?" I am doing "cmake -B build" [and then "cmake --build build" Should I do something else?

<!-- gh-comment-id:2923535146 --> @phalexo commented on GitHub (May 30, 2025): > Have you just tried installing ollama? It picks a backend based on the available features of the CPU, so shouldn't try and run backends that contain unsupported instructions. > > Failing that, you can edit the build files to remove references to alderlake. Apparently it is not identifying the architecture correctly. Could you suggest which files I need to edit? Or at least the folder where I can grep for alderlake? p.s. I not sure what is meant by "just tried installing?" I am doing "cmake -B build" [and then "cmake --build build" Should I do something else?
Author
Owner

@phalexo commented on GitHub (May 30, 2025):

I have SandyBridge I think, and it includes a lot of other stuff that I don't need or want.

-- Including CPU backend
-- x86 detected
-- Adding CPU backend variant ggml-cpu-x64:
-- x86 detected
-- Adding CPU backend variant ggml-cpu-sse42: -msse4.2 GGML_SSE42
-- x86 detected
-- Adding CPU backend variant ggml-cpu-sandybridge: -msse4.2;-mavx GGML_SSE42;GGML_AVX
-- x86 detected
-- Adding CPU backend variant ggml-cpu-haswell: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2 GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2
-- x86 detected
-- Adding CPU backend variant ggml-cpu-skylakex: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2;-mavx512f;-mavx512cd;-mavx512vl;-mavx512dq;-mavx512bw GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2;GGML_AVX512
-- x86 detected
-- Adding CPU backend variant ggml-cpu-icelake: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2;-mavx512f;-mavx512cd;-mavx512vl;-mavx512dq;-mavx512bw;-mavx512vbmi;-mavx512vnni GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2;GGML_AVX512;GGML_AVX512_VBMI;GGML_AVX512_VNNI
-- x86 detected
-- Adding CPU backend variant ggml-cpu-alderlake: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2;-mavxvnni GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2;GGML_AVX_VNNI

<!-- gh-comment-id:2923575151 --> @phalexo commented on GitHub (May 30, 2025): I have SandyBridge I think, and it includes a lot of other stuff that I don't need or want. -- Including CPU backend -- x86 detected -- Adding CPU backend variant ggml-cpu-x64: -- x86 detected -- Adding CPU backend variant ggml-cpu-sse42: -msse4.2 GGML_SSE42 -- x86 detected -- Adding CPU backend variant ggml-cpu-sandybridge: -msse4.2;-mavx GGML_SSE42;GGML_AVX -- x86 detected -- Adding CPU backend variant ggml-cpu-haswell: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2 GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2 -- x86 detected -- Adding CPU backend variant ggml-cpu-skylakex: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2;-mavx512f;-mavx512cd;-mavx512vl;-mavx512dq;-mavx512bw GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2;GGML_AVX512 -- x86 detected -- Adding CPU backend variant ggml-cpu-icelake: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2;-mavx512f;-mavx512cd;-mavx512vl;-mavx512dq;-mavx512bw;-mavx512vbmi;-mavx512vnni GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2;GGML_AVX512;GGML_AVX512_VBMI;GGML_AVX512_VNNI -- x86 detected -- Adding CPU backend variant ggml-cpu-alderlake: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2;-mavxvnni GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2;GGML_AVX_VNNI
Author
Owner

@rick-github commented on GitHub (May 30, 2025):

By installing I mean run the ollama installer: https://ollama.com/download

If that doesn't work: I don't know if this is the right way to do it, but edit ml/backend/ggml/ggml/src/CMakeLists.txt and comment out the architectures you don't want to compile around line 293.

<!-- gh-comment-id:2923590731 --> @rick-github commented on GitHub (May 30, 2025): By installing I mean run the ollama installer: https://ollama.com/download If that doesn't work: I don't know if this is the right way to do it, but edit `ml/backend/ggml/ggml/src/CMakeLists.txt` and comment out the architectures you don't want to compile around line 293.
Author
Owner

@phalexo commented on GitHub (May 30, 2025):

By installing I mean run the ollama installer: https://ollama.com/download

If that doesn't work: I don't know if this is the right way to do it, but edit ml/backend/ggml/ggml/src/CMakeLists.txt and comment out the architectures you don't want to compile around line 293.

I was able to compile successfully by removing all flags with "VNNI" but I am confused where the executable is. It used to be right in the ollama folder, i.e. ollama/ollama. I have not rebuilt this for a while, and now want to try out Google's MedGemma.

Is this repo still suitable to build an executable?

<!-- gh-comment-id:2923682122 --> @phalexo commented on GitHub (May 30, 2025): > By installing I mean run the ollama installer: https://ollama.com/download > > If that doesn't work: I don't know if this is the right way to do it, but edit `ml/backend/ggml/ggml/src/CMakeLists.txt` and comment out the architectures you don't want to compile around line 293. I was able to compile successfully by removing all flags with "VNNI" but I am confused where the executable is. It used to be right in the ollama folder, i.e. ollama/ollama. I have not rebuilt this for a while, and now want to try out Google's MedGemma. Is this repo still suitable to build an executable?
Author
Owner

@rick-github commented on GitHub (May 30, 2025):

go build .
./ollama --version

FYI, for most quants available for medgemma, only the text weights work in ollama. This is because it's a gemma3 variant, which uses the new ollama engine, which requires a fused text+vision GGUF file, not the separate files that most quants are in.

<!-- gh-comment-id:2923690354 --> @rick-github commented on GitHub (May 30, 2025): ``` go build . ./ollama --version ``` FYI, for most quants available for medgemma, only the text weights work in ollama. This is because it's a gemma3 variant, which uses the new ollama engine, which requires a fused text+vision GGUF file, not the separate files that most quants are in.
Author
Owner

@phalexo commented on GitHub (May 30, 2025):

go build .
./ollama --version

FYI, for most quants available for medgemma, only the text weights work in ollama. This is because it's a gemma3 variant, which uses the new ollama engine, which requires a fused text+vision GGUF file, not the separate files that most quants are in.

Ok, thanks, It is working fine.

<!-- gh-comment-id:2923747807 --> @phalexo commented on GitHub (May 30, 2025): > ``` > go build . > ./ollama --version > ``` > > FYI, for most quants available for medgemma, only the text weights work in ollama. This is because it's a gemma3 variant, which uses the new ollama engine, which requires a fused text+vision GGUF file, not the separate files that most quants are in. Ok, thanks, It is working fine.
Author
Owner

@phalexo commented on GitHub (May 31, 2025):

p.s.

How can I force these flags to be on? I used to modify the linux script to do this but not sure what to do after all the changes.

ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no

<!-- gh-comment-id:2923764725 --> @phalexo commented on GitHub (May 31, 2025): p.s. How can I force these flags to be on? I used to modify the linux script to do this but not sure what to do after all the changes. ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
Author
Owner

@rick-github commented on GitHub (May 31, 2025):

cmake -B build -DGGML_CUDA_FORCE_MMQ=1 -DGGML_CUDA_FORCE_CUBLAS=1
cmake --build build
go build .
<!-- gh-comment-id:2925334577 --> @rick-github commented on GitHub (May 31, 2025): ``` cmake -B build -DGGML_CUDA_FORCE_MMQ=1 -DGGML_CUDA_FORCE_CUBLAS=1 cmake --build build go build . ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#53695