Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ jobs:
--exclude cust
'

# Exclude cust_raw because it triggers hundreds of warnings.
- name: Check documentation
run: |
docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ jobs:
run: cargo test --workspace --exclude blastoff --exclude cudnn --exclude cudnn-sys --exclude cust

# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
# Exclude cust_raw because it triggers hundreds of warnings.
- name: Check documentation
env:
RUSTDOCFLAGS: -Dwarnings
Expand Down
6 changes: 4 additions & 2 deletions crates/nvvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,10 @@ pub enum NvvmArch {
/// This default value of 7.5 corresponds to Turing and later devices. We default to this
/// because it is the minimum supported by CUDA 13.0 while being in the middle of the range
/// supported by CUDA 12.x.
// WARNING: If you change the default, consider updating the `--target-arch` values used for
// compiletests in `ci_linux.yml` and `.github/workflows/ci_{linux,windows}.yml`.
// WARNING: If you change the default, consider updating:
// - The `--target-arch` values used for compiletests in `ci_linux.yml` and
// `.github/workflows/ci_{linux,windows}.yml`.
// - The CUDA versions used in `setup_cuda_environment` in `compiletests`.
#[default]
Compute75,
Compute80,
Expand Down
43 changes: 27 additions & 16 deletions tests/compiletests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,30 +576,41 @@ fn setup_cuda_environment() {
// Set library path to include CUDA NVVM libraries
let lib_path_var = dylib_path_envvar();

// Try to find CUDA installation
let cuda_paths = vec![
"/usr/local/cuda/nvvm/lib64",
"/usr/local/cuda-12/nvvm/lib64",
"/usr/local/cuda-11/nvvm/lib64",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.8\\nvvm\\lib\\x64",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.0\\nvvm\\lib\\x64",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\nvvm\\lib\\x64",
];

let mut found_cuda_paths = Vec::new();

// Check CUDA_PATH environment variable
if let Ok(cuda_path) = env::var("CUDA_PATH") {
let nvvm_path = Path::new(&cuda_path).join("nvvm").join("lib64");
if nvvm_path.exists() {
found_cuda_paths.push(nvvm_path.to_string_lossy().to_string());
#[cfg(unix)]
{
let nvvm_path = Path::new(&cuda_path).join("nvvm").join("lib64");
if nvvm_path.exists() {
found_cuda_paths.push(nvvm_path.to_string_lossy().to_string());
}
}
let nvvm_path_win = Path::new(&cuda_path).join("nvvm").join("lib").join("x64");
if nvvm_path_win.exists() {
found_cuda_paths.push(nvvm_path_win.to_string_lossy().to_string());
#[cfg(windows)]
{
let nvvm_path = Path::new(&cuda_path).join("nvvm").join("lib").join("x64");
if nvvm_path.exists() {
found_cuda_paths.push(nvvm_path.to_string_lossy().to_string());
}
}
}

// Try to find CUDA installation
#[cfg(unix)]
let cuda_paths = vec![
"/usr/local/cuda/nvvm/lib64",
"/usr/local/cuda-13/nvvm/lib64",
"/usr/local/cuda-12/nvvm/lib64",
];
#[cfg(windows)]
let cuda_paths = vec![
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v13.0\\nvvm\\lib\\x64",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.9\\nvvm\\lib\\x64",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.8\\nvvm\\lib\\x64",
"C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.0\\nvvm\\lib\\x64",
];

// Check standard paths
for path in &cuda_paths {
if Path::new(path).exists() {
Expand Down
Loading