Skip to content

cmake: skip cvector-generator and export-lora when CPU backend is disabled#24053

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
arichiardi:fix-cvector-cpu-guard
Jun 4, 2026
Merged

cmake: skip cvector-generator and export-lora when CPU backend is disabled#24053
ggerganov merged 1 commit into
ggml-org:masterfrom
arichiardi:fix-cvector-cpu-guard

Conversation

@arichiardi
Copy link
Copy Markdown
Contributor

@arichiardi arichiardi commented Jun 2, 2026

Overview

Both cvector-generator and export-lora link against CPU backend symbols (ggml_backend_cpu_init,
ggml_get_f32_nd, etc.) unconditionally. When building with -DGGML_CPU=OFF, these tools fail to
link, causing cmake --install to error on a missing binary:

CMake Error at build/tools/cvector-generator/cmake_install.cmake:52 (file):
  file INSTALL cannot find
  "<repo-path>/llama.cpp/build/bin/llama-cvector-generator": No such
  file or directory.
Call Stack (most recent call first):
  build/tools/cmake_install.cmake:122 (include)
  build/cmake_install.cmake:67 (include)

Both tools are guarded by NOT GGML_BACKEND_DL but not by GGML_CPU. Added the missing check.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - AI assisted in identifying the issue and proposing the fix

Copilot AI review requested due to automatic review settings June 2, 2026 21:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Tightens the build conditions for certain tools/examples so they are only included when the CPU backend is enabled (in addition to requiring non-dynamic backend loading).

Changes:

  • Restrict cvector-generator and export-lora subdirectories to build only when GGML_CPU is enabled and GGML_BACKEND_DL is disabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/CMakeLists.txt
@github-actions github-actions Bot added model Model specific script Script related testing Everything test related python python script changes server ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend Hexagon labels Jun 2, 2026
@CISC
Copy link
Copy Markdown
Member

CISC commented Jun 3, 2026

Bad merge.

@CISC CISC removed request for a team, CISC and JohannesGaessler June 3, 2026 06:41
@CISC CISC removed model Model specific script Script related testing Everything test related python python script changes server ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend Hexagon labels Jun 3, 2026
@arichiardi
Copy link
Copy Markdown
Contributor Author

arichiardi commented Jun 3, 2026

Sorry let me rebase - fixed ✔️

@arichiardi arichiardi force-pushed the fix-cvector-cpu-guard branch from 0b22e90 to 516bd6e Compare June 3, 2026 13:54
@CISC CISC added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Jun 4, 2026
@ggerganov ggerganov merged commit 7ac5a42 into ggml-org:master Jun 4, 2026
25 checks passed
@arichiardi arichiardi deleted the fix-cvector-cpu-guard branch June 4, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

examples merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants