link manifest: record CUDA runtime libs and toolkit search dirs - #114
Open
peters wants to merge 1 commit into
Open
link manifest: record CUDA runtime libs and toolkit search dirs#114peters wants to merge 1 commit into
peters wants to merge 1 commit into
Conversation
CUDA builds of the static archive set reference the CUDA runtime, cuBLAS, and (unless VMM is disabled) the driver API, but transcribe-link.json never recorded them — every non-CMake consumer failed to link with undefined cuda* symbols and had to hand-roll the toolkit paths (e.g. horizon's build.rs workaround). The manifest now mirrors ggml-cuda's own link list into system_libs and records the toolkit's library dir (+ driver-stubs dir) in a new search_dirs field; the -sys build script and the link-smoke harness consume it. Verified locally: static CUDA install, toy C consumer built from the manifest alone, CUDA0 enumerated at runtime.
Contributor
|
Thank you for this, I'll take a look when I get a chance |
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.
transcribe-link.jsonomits the CUDA runtime libraries forTRANSCRIBE_CUDAbuilds (system_libscarries only stdc++/m/pthread/dl), so every non-CMake consumer fails to link with undefinedcuda*symbols and has to hand-roll the toolkit paths (e.g. the workaround in horizon'sbuild.rsguessing a root fromCUDA_PATH/CUDA_HOME).What changed
cmake/transcribe-install.cmake: acudabackend branch mirrors ggml-cuda's own link list —cudart,cublas, and (unlessGGML_CUDA_NO_VMM) thecudadriver lib — and records the CUDAToolkit library dir plus its driver-stubs subdir in a newsearch_dirsmanifest field (configure time knows the real paths; consumers stop guessing).bindings/rust/sys/build.rs: emitscargo:rustc-link-searchfor eachsearch_dirsentry.scripts/ci/link_smoke.py: passes-Lfor each entry (read with.get, so older manifests still parse).docs/bindings.md: schema note.Verified locally (Linux, CUDA 12): static
TRANSCRIBE_CUDA=ONconfigure → manifest carriessearch_dirs: ["/usr/local/cuda/lib64", "/usr/local/cuda/lib64/stubs"]andsystem_libs: [..., "cudart", "cublas", "cuda"]; full build + install +scripts/ci/link_smoke.py→ the toy C consumer links from the manifest alone and enumeratesCUDA0at runtime. CPU-only configure regression-checked:search_dirsempty,system_libsunchanged.