diff options
author | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-06-29 15:51:08 +0000 |
---|---|---|
committer | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-06-29 15:51:08 +0000 |
commit | b5bdbef53a62ef8ed6a5c84494341df93948f2e8 (patch) | |
tree | cf76a3bf06ef1880935091f9b34182d9cc231d63 /candle-kernels/build.rs | |
parent | 889f7e09716f1b16f7b2f39e73047cd40437c82f (diff) | |
download | candle-b5bdbef53a62ef8ed6a5c84494341df93948f2e8.tar.gz candle-b5bdbef53a62ef8ed6a5c84494341df93948f2e8.tar.bz2 candle-b5bdbef53a62ef8ed6a5c84494341df93948f2e8.zip |
Fixing kernel cache (a bit brutal for now, but if build triggers,
rebuild ALL kernels).
Diffstat (limited to 'candle-kernels/build.rs')
-rw-r--r-- | candle-kernels/build.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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 = |