Repository navigation
fix(cuda-bindings): resolve build failure by checking CUDA_HOME - #17
Merged
Merged
Conversation
Signed-off-by: Jonatan Lindh <[email protected]>
JonatanLindh
force-pushed
the
fix-cuda13-build
branch
2 times, most recently
from
May 11, 2026 12:24
506ad99 to
ddc6f07
Compare
nihalpasham
self-requested a review
May 12, 2026 04:41
nihalpasham
approved these changes
May 12, 2026
nihalpasham
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the fix. Approved as-is
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.
Resolves #16
Problem
In environments where
CUDA_TOOLKIT_PATHis not explicitly set but standard environment variables likeCUDA_HOMEare,build.rssilently falls back to/usr/local/cuda. If this directory doesn't exist or contains a different CUDA version,std::fs::read_to_stringsilently fails.This causes the build script to skip enabling the
cuda_has_cuEventElapsedTime_v2feature flag, resulting in a crypticcannot find functioncompilation error downstream on CUDA 13 (when CUDA_HOME is the correct location).Changes
cuda_toolkit_dir()now checksCUDA_HOME before falling back to/usr/local/cuda`.cargo:rerun-if-env-changed=CUDA_HOME.unwrap_or(false)with acargo:warning. If the script cannot readcuda.h, it now emits a visible warning duringcargo buildexplaining exactly which path failed.Checklist
cargo fmt.cargo clippy.