Repository navigation
build: link CUDA plugins against the libcuda stub when no driver is installed - #249
Merged
Merged
Conversation
…nstalled Since CUDA 13.4 the `cuda` apt metapackage no longer pulls in the NVIDIA driver, so the CI BIT runner has no libcuda.so and linking hmsbeagle-cuda fails with "cannot find -lcuda". Add the toolkit's lib64/stubs directory (shipped by cuda-driver-dev) to the link path. The stub's SONAME is libcuda.so.1, so the real driver is still loaded at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 CI BIT workflow has failed on
mastersince 2026-09-16. It last passed on 2026-08-22. Linkinghmsbeagle-cudafails with:Up to CUDA 13.3,
apt-get install cudaalso installed the NVIDIA driver (nvidia-driver-openandlibnvidia-compute), which provideslibcuda.so. The CUDA 13.4cudapackage no longer pulls in the driver, so the GitHub runner, which has no GPU, has nolibcuda.soto link against.Fix
Add
${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubstolink_directoriesinGPU/CMake_CUDAandGPU/CMake_TensorCores. Thecuda-driver-devpackage, which the toolkit still installs, ships a stublibcuda.sothere. This is NVIDIA's documented way to build without a driver. The stub's SONAME islibcuda.so.1, so the real driver is still the one loaded at runtime.Testing
On the ji-group fork, the same commit on
masterpasses both CI and CI BIT, and the CUDA plugin links: https://github.com/ji-group/beagle-lib/actions/runs/40994635657🤖 Generated with Claude Code