File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545
4646 - name : Clippy
4747 run : cargo clippy --all-targets -- -D warnings
48+
49+ # Hosted runners have no GPU, so the kernels cannot run here. They still
50+ # compile: nvcc parses kernels.cu, the linker resolves every FFI symbol
51+ # against the real libraries, and a signature drift between ffi.rs and the
52+ # kernels fails in CI instead of on the next machine with a GPU. The parity
53+ # suite notices there is no device at runtime and skips itself.
54+ cuda-build :
55+ runs-on : ubuntu-latest
56+ steps :
57+ - uses : actions/checkout@v4
58+
59+ - name : Install Rust
60+ uses : dtolnay/rust-toolchain@stable
61+
62+ - name : Install CUDA toolkit (no driver, compile only)
63+ uses : Jimver/cuda-toolkit@v0.2.36
64+ with :
65+ cuda : ' 12.4.1'
66+ method : ' network'
67+
68+ - name : Cache cargo
69+ uses : actions/cache@v4
70+ with :
71+ path : |
72+ ~/.cargo/registry
73+ ~/.cargo/git
74+ target
75+ key : ${{ runner.os }}-cargo-cuda-${{ hashFiles('**/Cargo.lock') }}
76+
77+ - name : Build with the cuda feature
78+ run : cargo build --features cuda --all-targets
79+
80+ - name : Parity tests (self-skip without a device)
81+ run : cargo test --features cuda --test cuda_parity -- --test-threads=1
You can’t perform that action at this time.
0 commit comments