Skip to content

Commit

Permalink
Add support for Cuda 11.4 (#266)
Browse files Browse the repository at this point in the history
* Empty commit

* Add bindings for all modules except cudnn and nccl

* Fix build when using system version

* Add bindings for cudnn and nccl modules
  • Loading branch information
elmattic authored Jun 28, 2024
1 parent 2747ba3 commit 2949600
Show file tree
Hide file tree
Showing 19 changed files with 36,381 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ features = ["cuda-12050", "f16", "cudnn"]
default = ["std", "cublas", "cublaslt", "cudnn", "curand", "driver", "nccl", "nvrtc"]

cuda-version-from-build-system = []
cuda-11040 = []
cuda-11050 = []
cuda-11060 = []
cuda-11070 = []
Expand Down
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ fn main() {
(11, 6)
} else if cfg!(feature = "cuda-11050") {
(11, 5)
} else if cfg!(feature = "cuda-11040") {
(11, 4)
} else {
#[cfg(not(feature = "cuda-version-from-build-system"))]
panic!("Must specify one of the following features: [cuda-version-from-build-system, cuda-12050, cuda-12040, cuda-12030, cuda-12020, cuda-12010, cuda-12000, cuda-11080, cuda-11070, cuda-11060, cuda-11050]");
panic!("Must specify one of the following features: [cuda-version-from-build-system, cuda-12050, cuda-12040, cuda-12030, cuda-12020, cuda-12010, cuda-12000, cuda-11080, cuda-11070, cuda-11060, cuda-11050, cuda-11040]");

#[cfg(feature = "cuda-version-from-build-system")]
{
Expand Down Expand Up @@ -76,6 +78,7 @@ fn cuda_version_from_build_system() -> (usize, usize) {
"11.7" => (11, 7),
"11.6" => (11, 6),
"11.5" => (11, 5),
"11.4" => (11, 4),
v => panic!("Unsupported cuda toolkit version: `{v}`. Please raise a github issue."),
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/cublas/sys/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#[cfg(feature = "cuda-11040")]
mod sys_11040;
#[cfg(feature = "cuda-11040")]
pub use sys_11040::*;

#[cfg(feature = "cuda-11050")]
mod sys_11050;
#[cfg(feature = "cuda-11050")]
Expand Down
Loading

0 comments on commit 2949600

Please sign in to comment.