Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA 12.4 #227

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords = [
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[package.metadata.docs.rs]
features = ["cuda-12030", "f16", "cudnn"]
features = ["cuda-12040", "f16", "cudnn"]

[features]
default = ["std", "cublas", "cublaslt", "cudnn", "curand", "driver", "nccl", "nvrtc"]
Expand All @@ -33,6 +33,7 @@ cuda-12000 = []
cuda-12010 = []
cuda-12020 = []
cuda-12030 = []
cuda-12040 = []

dynamic-linking = []

Expand Down
4 changes: 3 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ fn main() {

#[cfg(not(any(
feature = "cuda-version-from-build-system",
feature = "cuda-12040",
feature = "cuda-12030",
feature = "cuda-12020",
feature = "cuda-12010",
feature = "cuda-12000",
feature = "cuda-11080",
feature = "cuda-11070",
)))]
compile_error!("Must specify one of the following features: [cuda-version-from-build-system, cuda-12030, cuda-12020, cuda-12010, cuda-12000, cuda-11080, cuda-11070]");
compile_error!("Must specify one of the following features: [cuda-version-from-build-system, cuda-12040, cuda-12030, cuda-12020, cuda-12010, cuda-12000, cuda-11080, cuda-11070]");

#[cfg(feature = "cuda-version-from-build-system")]
cuda_version_from_build_system();
Expand Down Expand Up @@ -43,6 +44,7 @@ fn cuda_version_from_build_system() {
let key = "CUDA_VERSION ";
let start = key.len() + contents.find(key).unwrap();
match contents[start..].lines().next().unwrap() {
"12040" => println!("cargo:rustc-cfg=feature=\"cuda-12040\""),
"12030" => println!("cargo:rustc-cfg=feature=\"cuda-12030\""),
"12020" => println!("cargo:rustc-cfg=feature=\"cuda-12020\""),
"12010" => println!("cargo:rustc-cfg=feature=\"cuda-12010\""),
Expand Down
Empty file modified src/cublas/sys/bindgen.sh
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions src/cublas/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ mod sys_12030;
#[cfg(feature = "cuda-12030")]
pub use sys_12030::*;

#[cfg(feature = "cuda-12040")]
mod sys_12040;
#[cfg(feature = "cuda-12040")]
pub use sys_12040::*;

pub unsafe fn lib() -> &'static Lib {
static LIB: std::sync::OnceLock<Lib> = std::sync::OnceLock::new();
LIB.get_or_init(|| Lib::new(libloading::library_filename("cublas")).unwrap())
Expand Down
Loading
Loading