feat: accelerate CI build speed by using pre-built pulls.#1634
Open
Cyberhan123 wants to merge 1 commit into
Open
feat: accelerate CI build speed by using pre-built pulls.#1634Cyberhan123 wants to merge 1 commit into
Cyberhan123 wants to merge 1 commit into
Conversation
- 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.
There was a problem hiding this comment.
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_GGMLand relatedGGML_*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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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:
SD_USE_PREBUILT_GGMLCMake 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 withSD_USE_SYSTEM_GGMLis enforced. (CMakeLists.txt)CMakeLists.txtto handle prebuilt GGML SDKs: imports the SDK, sets up CMake targets, and ensures runtime binaries are copied if needed. (CMakeLists.txt) [1] [2]cmake/fetch_prebuilt_ggml.cmakemodule, which implements platform detection, archive download and extraction, package root location, and CMake target patching for prebuilt GGML SDKs.Documentation and contribution guidelines:
docs/build.mdwith instructions for building using a prebuilt GGML SDK, including both unpacked and downloadable workflows, and notes on compatibility requirements.CONTRIBUTING.mdthat prebuilt GGML SDKs must match the validated GGML revision and ABI-sensitive options (such asGGML_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