[pull] main from Rust-GPU:main#47
Merged
pull[bot] merged 6 commits intoHaofei:mainfrom Nov 22, 2025
Merged
Conversation
The docs on the `CudaBuilder::arch` method are a subset of those on the `CudaBuilder::arch` field. So just remove all the method docs except for the pointer to the arch docs. XXX: NVVM IR 1.6 -> 2.0 https://docs.nvidia.com/cuda/archive/12.0.0/cuda-toolkit-release-notes/index.html
It can be used in `NvvmOption::from_str`, and will also be used in a subsequent commit in compiletests.
It's possible with the `#[default]` attribute.
…mpute_75`. CUDA 12.0 was released in December 2022, and CUDA 13.0 was released in August 2025. It feels like a good time to drop CUDA 11.x support. This means later Kepler devices with compute capabilities of 3.5 and 3.7 will no longer be supported. The minimum version of NVVM IR increases from 1.6 to 2.0, because that's what CUDA 12.0 uses. Along with this, change the default compiler target to `compute_75`. This is a good choice because it's the minimum supported by CUDA 13.0, and gets Rust CUDA a step closer to working with CUDA 13.0. The existing defaults were all over the place. - `NvvmArch::default()` was `compute_52`. - `CudaBuilder`'s default was `compute_61`. - compiletest's default was `compute_70`. This commit makes the latter two determined by `NvvmArch::default()`, which is changed to `compute_75`. Currently CI runs compiletests on `compute_61`, `compute_70`, and `compute_90`; this commit changes the `compute_70` to `compute_75`. It seems sensible to have the default value as one of the things tested by CI. This comment also adds a comment on NvvmArch with a table of CUDA/`compute_*` values, which I found very useful. Resources: - https://en.wikipedia.org/wiki/CUDA#GPUs_supported for compute capabilities supported by different CUDA versions. - https://docs.nvidia.com/cuda/archive/12.0.0/cuda-toolkit-release-notes/index.html for NVVM IR version information.
This got dropped in a previous commit and is making CI fail with:
```
--- stderr
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bindgen-0.71.1/lib.rs:604:27:
Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"
stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/f34ba774c78ea32b7c40598b8ad23e75cdac42a6/library/std/src/panicking.rs:697:5
1: core::panicking::panic_fmt
at /rustc/f34ba774c78ea32b7c40598b8ad23e75cdac42a6/library/core/src/panicking.rs:75:14
2: core::result::unwrap_failed
at /rustc/f34ba774c78ea32b7c40598b8ad23e75cdac42a6/library/core/src/result.rs:1852:5
3: core::result::Result<T,E>::expect
4: bindgen::ensure_libclang_is_loaded::{{closure}}
5: std::sync::once_lock::OnceLock<T>::get_or_init::{{closure}}
6: std::sync::once_lock::OnceLock<T>::initialize::{{closure}}
7: std::sync::poison::once::Once::call_once_force::{{closure}}
8: std::sys::sync::once::futex::Once::call
at /rustc/f34ba774c78ea32b7c40598b8ad23e75cdac42a6/library/std/src/sys/sync/once/futex.rs:178:21
9: std::sync::poison::once::Once::call_once_force
10: std::sync::once_lock::OnceLock<T>::initialize
11: std::sync::once_lock::OnceLock<T>::get_or_try_init
12: std::sync::once_lock::OnceLock<T>::get_or_init
13: bindgen::ensure_libclang_is_loaded
14: bindgen::Bindings::generate
15: bindgen::Builder::generate
16: build_script_main::create_cuda_driver_bindings
17: build_script_main::main
18: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )