Skip to content

Commit 1d1a0e4

Browse files
committed
Test CUDA 13.0 on Windows CI.
1 parent e4e5ed3 commit 1d1a0e4

File tree

4 files changed

+109
-8
lines changed

4 files changed

+109
-8
lines changed

.github/workflows/ci_windows.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26+
cuda: ["12.8.1", "13.0.2"]
2627
include:
2728
- os: windows-latest
2829
target: x86_64-pc-windows-msvc
29-
cuda: "12.8.1"
3030
linux-local-args: []
3131
sub-packages:
3232
[
@@ -39,14 +39,15 @@ jobs:
3939
"cublas_dev",
4040
"curand",
4141
"curand_dev",
42+
"nvvm",
4243
]
4344

4445
steps:
4546
- name: Checkout repository
4647
uses: actions/checkout@v4
4748

4849
- name: Install CUDA
49-
uses: Jimver/[email protected].22
50+
uses: Jimver/[email protected].29
5051
id: cuda-toolkit
5152
with:
5253
cuda: ${{ matrix.cuda }}
@@ -57,7 +58,6 @@ jobs:
5758
log-file-suffix: "${{matrix.os}}-${{matrix.cuda}}"
5859

5960
- name: List CUDA_PATH files
60-
shell: pwsh
6161
run: Get-ChildItem -Path $env:CUDA_PATH -Recurse | ForEach-Object { $_.FullName }
6262

6363
# random command that forces rustup to install stuff in rust-toolchain
@@ -68,9 +68,12 @@ jobs:
6868
run: rustup component add rustfmt clippy
6969

7070
- name: Update PATH to expose CUDA codegen backend
71-
shell: pwsh
7271
run: |
73-
echo "$env:CUDA_PATH\nvvm\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
72+
# njn: explain
73+
echo "$env:CUDA_PATH\nvvm\bin" | `
74+
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
75+
echo "$env:CUDA_PATH\nvvm\bin\x64" | `
76+
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
7477
7578
- name: Verify CUDA, Rust installation
7679
run: |
@@ -103,15 +106,21 @@ jobs:
103106
# Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust.
104107
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
105108
- name: Test
106-
run: cargo test --workspace --exclude blastoff --exclude cudnn --exclude cudnn-sys --exclude cust
109+
run: |
110+
cargo test --workspace `
111+
--exclude blastoff --exclude cudnn --exclude cudnn-sys --exclude cust
107112
108113
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
109114
# Exclude cust_raw because it triggers hundreds of warnings.
110115
- name: Check documentation
111116
env:
112117
RUSTDOCFLAGS: -Dwarnings
113-
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude cudnn --exclude cudnn-sys --exclude cust_raw
118+
run: |
119+
cargo doc --workspace --all-features --document-private-items --no-deps `
120+
--exclude cudnn --exclude cudnn-sys --exclude cust_raw
114121
115122
# Disabled due to dll issues, someone with Windows knowledge needed
116123
# - name: Compiletest
117-
# run: cargo run -p compiletests --release --no-default-features -- --target-arch compute_61,compute_75,compute_90
124+
# run: |
125+
# cargo run -p compiletests --release --no-default-features -- `
126+
# --target-arch compute_61,compute_75,compute_90

Cargo.lock

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/cust_raw/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ bindgen = "0.71.1"
1414
bimap = "0.6.3"
1515
cc = "1.2.17"
1616
doxygen-bindgen = "0.1"
17+
walkdir = "2.5"
1718

1819
[package.metadata.docs.rs]
1920
features = [

crates/cust_raw/build/cuda_sdk.rs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,68 @@ impl CudaSdk {
4545
// Retrieve the NVVM related paths.
4646
let nvvm_include_paths = Self::find_nvvm_include_dirs(cuda_root.as_path())?;
4747
let nvvm_library_paths = Self::find_nvvm_library_dirs(cuda_root.as_path())?;
48+
49+
// use std::fs;
50+
51+
// fn main2(root_path: std::path::PathBuf) {
52+
// use std::ffi::OsStr;
53+
// use walkdir::WalkDir;
54+
55+
// for entry in WalkDir::new(root_path).into_iter().filter_map(|e| e.ok()) {
56+
// let path = entry.path();
57+
// let depth = entry.depth();
58+
59+
// // Indent based on depth
60+
// let indent = " ".repeat(depth);
61+
62+
// if path.is_dir() {
63+
// eprintln!(
64+
// "{}├── {}",
65+
// indent,
66+
// path.file_name()
67+
// .unwrap_or(OsStr::new("???"))
68+
// .to_string_lossy()
69+
// );
70+
// } else {
71+
// eprintln!(
72+
// "{}└── {}",
73+
// indent,
74+
// path.file_name()
75+
// .unwrap_or(OsStr::new("???"))
76+
// .to_string_lossy()
77+
// );
78+
// }
79+
// }
80+
// }
81+
// main2(cuda_root.clone());
82+
83+
// eprintln!("1---");
84+
// let path = &cuda_root;
85+
// if let Ok(paths) = fs::read_dir(path) {
86+
// for path in paths {
87+
// eprintln!("Name: {}", path.unwrap().path().display())
88+
// }
89+
// }
90+
// eprintln!("1---");
91+
92+
// eprintln!("2---");
93+
// let path = cuda_root.join("nvvm");
94+
// if let Ok(paths) = fs::read_dir(path) {
95+
// for path in paths {
96+
// eprintln!("Name: {}", path.unwrap().path().display())
97+
// }
98+
// }
99+
// eprintln!("2---");
100+
101+
// eprintln!("3---");
102+
// let path = cuda_root.join("nvvm").join("libdevice");
103+
// if let Ok(paths) = fs::read_dir(&path) {
104+
// for path in paths {
105+
// eprintln!("Name: {}", path.unwrap().path().display())
106+
// }
107+
// }
108+
// eprintln!("3---");
109+
48110
let libdevice_bitcode_path = cuda_root
49111
.join("nvvm")
50112
.join("libdevice")

0 commit comments

Comments
 (0)