Skip to content

Commit a649d75

Browse files
authored
cuda: build.rs add trigger (#8708)
1 parent 1bcaf3f commit a649d75

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

vortex-cuda/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ fn main() {
3535

3636
println!("cargo:rerun-if-env-changed=PROFILE");
3737

38+
// nvcc availability depends on PATH (e.g. entering/leaving a nix shell that
39+
// provides cuda_nvcc). Without this, cargo caches a stale build.rs result
40+
// from an environment without nvcc, and switching to one with nvcc does not
41+
// trigger PTX recompilation — producing a binary with an empty embedded_ptx
42+
// table that silently falls back to CPU at runtime.
43+
println!("cargo:rerun-if-env-changed=PATH");
44+
3845
// Regenerate bit_unpack kernels only when the generator changes
3946
println!(
4047
"cargo:rerun-if-changed={}",

0 commit comments

Comments
 (0)