Skip to content

feat: accelerate CI build speed by using pre-built pulls.#1634

Open
Cyberhan123 wants to merge 1 commit into
leejet:masterfrom
Cyberhan123:super-fast-build
Open

feat: accelerate CI build speed by using pre-built pulls.#1634
Cyberhan123 wants to merge 1 commit into
leejet:masterfrom
Cyberhan123:super-fast-build

Conversation

@Cyberhan123

@Cyberhan123 Cyberhan123 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request adds support for using prebuilt GGML SDKs as an alternative to building GGML from source or using a system-installed version. It introduces new CMake options and logic to locate, download, extract, and integrate a prebuilt GGML package, improving build flexibility and simplifying downstream packaging. Documentation and contribution guidelines are updated to reflect this new workflow and its requirements.

Support for prebuilt GGML SDKs:

  • Added the SD_USE_PREBUILT_GGML CMake option and related variables (e.g., GGML_ROOT_DIR, GGML_RELEASE_BASE_URL, GGML_RELEASE_TAG, etc.) to allow specifying or downloading a prebuilt GGML SDK instead of building from source or using a system library. Mutual exclusion with SD_USE_SYSTEM_GGML is enforced. (CMakeLists.txt)
  • Integrated new logic in CMakeLists.txt to handle prebuilt GGML SDKs: imports the SDK, sets up CMake targets, and ensures runtime binaries are copied if needed. (CMakeLists.txt) [1] [2]
  • Added the cmake/fetch_prebuilt_ggml.cmake module, which implements platform detection, archive download and extraction, package root location, and CMake target patching for prebuilt GGML SDKs.

Documentation and contribution guidelines:

  • Updated docs/build.md with instructions for building using a prebuilt GGML SDK, including both unpacked and downloadable workflows, and notes on compatibility requirements.
  • Clarified in CONTRIBUTING.md that prebuilt GGML SDKs must match the validated GGML revision and ABI-sensitive options (such as GGML_MAX_NAME=128).

technologies

To add some information about the related technologies:
https://github.com/seasonjs/ggml.cpp-build provides a pre-build option, allowing for the direct construction of a unified cross-platform package. While this increases the download size, it's possible to parse the manifests.json file and then split it into CUDA, HIP, and CPU components. However, this would require writing a script for parsing, and I don't want this PR to be too large. Therefore, I think this feature can be implemented later.
The successfully implemented prototype is available at https://github.com/seasonjs/stable-diffusion.cpp-build.

performance

Speed ​​and performance have seen an exponential improvement, reducing the time from one hour to just four minutes.

Checklist

- Introduced option SD_USE_PREBUILT_GGML to allow the use of a prebuilt GGML SDK.
- Added CMake variables for configuring the prebuilt GGML SDK, including GGML_ROOT_DIR, GGML_RELEASE_BASE_URL, GGML_RELEASE_TAG, GGML_ASSET_NAME, GGML_DOWNLOAD_URL, and GGML_CACHE_DIR.
- Implemented logic in CMake to handle downloading and extracting the prebuilt GGML SDK.
- Updated documentation to include instructions for building with a prebuilt GGML SDK.
- Added a new CMake script (fetch_prebuilt_ggml.cmake) to manage the fetching and configuration of the prebuilt GGML SDK.
- Updated CONTRIBUTING.md to specify that prebuilt GGML SDKs must match the validated revision and ABI-sensitive build options.
Copilot AI review requested due to automatic review settings June 11, 2026 04:42

Copilot AI left a comment

Copy link
Copy Markdown

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.

This PR adds first-class support for consuming a prebuilt ggml SDK (either unpacked locally or downloaded from a release) to speed up builds/packaging, and updates CI packaging jobs to use that prebuilt ggml flow.

Changes:

  • Introduces SD_USE_PREBUILT_GGML and related GGML_* CMake cache variables to import ggml from an SDK instead of building the bundled submodule.
  • Adds a new CMake helper (cmake/fetch_prebuilt_ggml.cmake) to download/cache/extract and patch imported ggml targets, plus runtime-binary copying.
  • Updates CI build matrix and artifact packaging to build against the prebuilt ggml SDK, and documents the workflow/ABI constraints.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/build.md Documents how to build using an unpacked or downloadable prebuilt ggml SDK.
cmake/fetch_prebuilt_ggml.cmake Implements downloading/caching/extracting and importing of prebuilt ggml SDKs + runtime copy helper.
CONTRIBUTING.md Clarifies ABI/build-option requirements for prebuilt ggml SDKs.
CMakeLists.txt Adds prebuilt-ggml option & wires it into dependency setup and runtime copying.
.github/workflows/build.yml Switches CI builds/artifacts to use prebuilt ggml SDK flow and simplifies build jobs.

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

Comment thread cmake/fetch_prebuilt_ggml.cmake
Comment thread cmake/fetch_prebuilt_ggml.cmake
Comment thread docs/build.md
Comment thread .github/workflows/build.yml
Comment thread .github/workflows/build.yml
@Cyberhan123 Cyberhan123 changed the title Accelerate CI build speed by using pre-built pulls. feat: accelerate CI build speed by using pre-built pulls. Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants