Skip to content
Open
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
4 changes: 1 addition & 3 deletions .github/workflows/ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ jobs:
run: cargo build --all-features -p cust_raw

# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
# Exclude vecadd because of a link error involving nanorand and `SystemFunction036` (a.k.a.
# `RtlGenRandom`).
- name: Build workspace
run: cargo build --workspace --exclude cudnn --exclude cudnn-sys --exclude "vecadd*"
run: cargo build --workspace --exclude cudnn --exclude cudnn-sys

# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
- name: Clippy
Expand Down
6 changes: 6 additions & 0 deletions examples/vecadd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ use std::path;
use cuda_builder::CudaBuilder;

fn main() {
// On Windows, nanorand's entropy uses SystemFunction036 (RtlGenRandom) from advapi32.
// Explicitly link it so the MSVC linker resolves the symbol (avoids LNK2019 when
// mixing CRTs or with certain link orders).
#[cfg(target_os = "windows")]
println!("cargo:rustc-link-lib=advapi32");

println!("cargo::rerun-if-changed=build.rs");
println!("cargo::rerun-if-changed=kernels");

Expand Down