From b5bdbef53a62ef8ed6a5c84494341df93948f2e8 Mon Sep 17 00:00:00 2001 From: Nicolas Patry Date: Thu, 29 Jun 2023 15:51:08 +0000 Subject: [PATCH] Fixing kernel cache (a bit brutal for now, but if build triggers, rebuild ALL kernels). --- candle-kernels/build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/candle-kernels/build.rs b/candle-kernels/build.rs index 37cf28ae..1c16e17c 100644 --- a/candle-kernels/build.rs +++ b/candle-kernels/build.rs @@ -83,6 +83,14 @@ mod cuda { .map(|p| p.unwrap()) .collect(); + for out_path in glob::glob(&format!("{out_dir}/**/*.ptx")).unwrap() { + std::fs::remove_file(out_path.unwrap()).unwrap(); + } + + for path in &kernel_paths { + println!("cargo:rerun-if-changed={}", path.display()); + } + for path in &mut include_directories { println!("cargo:rerun-if-changed={}", path.display()); let destination =