cuda-bindings: handle CUDA header discovery errors#88
Open
yagna-1 wants to merge 2 commits into
Open
Conversation
cfa4b39 to
eb140b1
Compare
Contributor
|
I think this is not enough: in sbsa environment this wouldn’t work, even if cuda is installed. |
Author
|
Updated to scan CUDA target-layout directories via |
Report missing or unreadable CUDA headers directly from the build script and discover CUDA headers and libraries in both the standard toolkit layout and target-specific layouts such as targets/x86_64-linux and targets/sbsa-linux. Signed-off-by: yagna-1 <yagna-1@users.noreply.github.com>
eb140b1 to
fbf7a7a
Compare
Discover CUDA headers and libraries across target-specific toolkit layouts such as targets/x86_64-linux and targets/sbsa-linux instead of hardcoding a single target directory. Signed-off-by: yagna-1 <yagna-1@users.noreply.github.com>
Contributor
|
I think this introduces another problem: if multiple CUDA targets are installed, we may end up mixing dependencies and likely cause build/link errors. We should probably first discover the CUDA host target, and only then look for cuda.h under that target. |
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.
Summary
cuda-bindingsbuild script report missing or unreadable CUDA headers directly instead of falling through to a bindgen panic.include/layout and target-specific redistributable layouts such astargets/x86_64-linux/include/andtargets/sbsa-linux/include/.Fixes #87.
Test plan
cargo fmt --check --allcargo test -p cuda-device -p oxide-artifacts -p reserved-oxide-symbols --lib --testscargo test -p cargo-oxide --all-targetson a host without CUDA headers now fails with the directcuda-bindings: could not find cuda.h...build-script error instead of a bindgen panic.