fix(cuda): add -DGGML_CUDA=ON to Windows CUDA build#12
Merged
Conversation
The Windows CUDA cmake invocation was missing -DGGML_CUDA=ON, which meant the ggml CUDA backend was never compiled in. Without it, the build silently falls back to CPU even when the CUDA toolkit is installed. This is the same fix already applied to the Linux CUDA build in commit 6a68a98. Fixes: lemonade-sdk/lemonade#2171 (sdcpp:cuda falls back to CPU on Windows + RTX 4090) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Actions Windows CUDA build configuration to explicitly enable the ggml CUDA backend during CMake configuration, aligning it with the existing Linux CUDA workflow behavior so Windows “cuda” artifacts don’t silently build CPU-only binaries.
Changes:
- Add
-DGGML_CUDA=ONto the Windows CUDA CMake invocation in the CI workflow.
💡 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.
Problem
The Windows CUDA cmake invocation was missing
-DGGML_CUDA=ON, which meant the ggml CUDA backend was never compiled in. Without it, the build silently falls back to CPU even when the CUDA toolkit is installed and the binary is labelledwindows-cuda-sm_XX.This is the same fix already applied to the Linux CUDA build in commit 6a68a98 (PR leejet#13).
Root Cause
SD_CUBLASis not a valid CMake option in stable-diffusion.cpp (there is nooption(SD_CUBLAS ...)in CMakeLists.txt). It is silently ignored. The correct flag isGGML_CUDA=ON(directly, or viaSD_CUDA=ONwhich sets it). Without-DGGML_CUDA=ON, the CUDA ggml backend is never compiled, and stable-diffusion.cpp falls back to CPU computation at runtime.Fix
Add
-DGGML_CUDA=ONto the Windows CUDA cmake invocation (matching the Linux approach from PR leejet#13).Closes
lemonade-sdk/lemonade#2171 (sdcpp:cuda falls back to CPU on Windows + RTX 4090)