We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6519002 commit b5fbb79Copy full SHA for b5fbb79
samples/introduction/matmul/build.rs
@@ -0,0 +1,17 @@
1
+use std::env;
2
+use std::path;
3
+
4
+use cuda_builder::CudaBuilder;
5
6
+fn main() {
7
+ println!("cargo::rerun-if-changed=build.rs");
8
+ println!("cargo::rerun-if-changed=kernels");
9
10
+ let out_path = path::PathBuf::from(env::var("OUT_DIR").unwrap());
11
+ let manifest_dir = path::PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
12
13
+ CudaBuilder::new(manifest_dir.join("kernels"))
14
+ .copy_to(out_path.join("kernels.ptx"))
15
+ .build()
16
+ .unwrap();
17
+}
0 commit comments