From 71eeeed3335373bbb74f5e192b168b4b07556ce8 Mon Sep 17 00:00:00 2001 From: mag1cian Date: Fri, 10 Jul 2026 15:33:09 +0800 Subject: [PATCH] cuda: build.rs add trigger Signed-off-by: mag1cian --- vortex-cuda/build.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vortex-cuda/build.rs b/vortex-cuda/build.rs index e201345cd73..0621a2884b3 100644 --- a/vortex-cuda/build.rs +++ b/vortex-cuda/build.rs @@ -35,6 +35,13 @@ fn main() { println!("cargo:rerun-if-env-changed=PROFILE"); + // nvcc availability depends on PATH (e.g. entering/leaving a nix shell that + // provides cuda_nvcc). Without this, cargo caches a stale build.rs result + // from an environment without nvcc, and switching to one with nvcc does not + // trigger PTX recompilation — producing a binary with an empty embedded_ptx + // table that silently falls back to CPU at runtime. + println!("cargo:rerun-if-env-changed=PATH"); + // Regenerate bit_unpack kernels only when the generator changes println!( "cargo:rerun-if-changed={}",