Skip to content

Commit 180e447

Browse files
authored
panic on ptxas failure
1 parent 5e2462b commit 180e447

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/cuda_builder/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ impl CudaBuilder {
378378
.output()
379379
.expect("Failed to run ptxas");
380380
println!("cargo:warning=PTXAS output: {:?}", ptxas_output);
381+
if !ptxas_output.status.success() {
382+
panic!("ptxas failed with exit code: {:?}", ptxas_output.status.code());
383+
}
381384

382385
if let Some(copy_path) = &self.ptx_file_copy_path {
383386
println!("cargo:warning=Copying PTX file from {} to {}", path.display(), copy_path.display());

0 commit comments

Comments
 (0)