Skip to content

Commit dee5390

Browse files
committed
Work around tileiras picking up wrong ptxas on systems with CUDA env vars set.
1 parent 7fcc45b commit dee5390

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ext/CUDAExt.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ function emit_binary(cache::CacheView, mi::Core.MethodInstance;
6060
output_path = tempname() * ".cubin"
6161
try
6262
write(input_path, bytecode)
63-
run(`$(CUDA_Compiler_jll.tileiras()) $input_path -o $output_path --gpu-name $(opts.sm_arch) -O$(opts.opt_level)`)
63+
cmd = addenv(`$(CUDA_Compiler_jll.tileiras()) $input_path -o $output_path --gpu-name $(opts.sm_arch) -O$(opts.opt_level)`,
64+
"CUDA_ROOT" => CUDA_Compiler_jll.artifact_dir)
65+
run(cmd)
6466
res.cuda_bin = read(output_path)
6567
finally
6668
rm(input_path, force=true)

0 commit comments

Comments
 (0)