Repository navigation
Publish Windows CUDA bundles and leave the CUDA runtime to the host - #25
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…solved paths when packaging
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Studio currently has no Windows CUDA build of sd.cpp from this mirror, so a Windows NVIDIA host that runs the native image engine falls back to an older upstream release (unslothai/unsloth#12470). This adds Windows CUDA bundles and makes every CUDA bundle much smaller by leaving the CUDA runtime to the host.
What changes
build-windows-cuda(new):win-cuda12-x64andwin-cuda13-x64, MSVC + Ninja, signed like the other Windows bundles, continue-on-error like the Linux CUDA leg.build-linux-cuda: now a cuda12 / cuda13 matrix (Linux-Ubuntu-22.04-x86_64-cuda12,-cuda13).unsloth-cuda-{linux,windows}-setup, so both projects link the same CUDA sonames.SD_BUILD_SHARED_GGML_LIB), so sd-cli and sd-server share one copy of the CUDA kernels. The stable-diffusion library itself stays static, so the architecture markers Studio scans for stay in the executables.DT_RPATH $ORIGIN(not RUNPATH): it is searched beforeLD_LIBRARY_PATH, so the bundle'slibggml*.soalways win over llama.cpp's same-named ones.package_bundle.pyships each shared library once, under its soname. zipfile follows symlinks, so a shared-ggml build otherwise stores the CUDA library three times. Paths are compared resolved, so a relativeBIN_DIRpackages the same, and other symlinked binaries or libraries still ship under their own names as before.Sizes (test build, not published)
Verification
libggml-cuda.so.0needslibcudart/libcublas/libcublasLt.so.<major>, every Linux ELF hasRPATH $ORIGIN;win-cuda12-x64ggml-cuda.dllimportscudart64_12.dll,cublas64_12.dll,cublasLt64_12.dll;win-cuda13-x64importscublas64_13.dllandcublasLt64_13.dllonly (CUDA 13 links cudart statically, as unslothai/llama.cpp's cuda13 build does); every DLL / EXE in both carries an Authenticode signature.libcudart.so.13/libcublas.so.13from the venv'snvidia/cu13/lib(the files llama-server uses).libcublasLt.so.13: cannot open shared object file); with Studio's environment it loads and lists the GPU. With llama.cpp's build dir placed first onLD_LIBRARY_PATHit still loads its ownlibggml*.so.