Skip to content

Commit 8c24ea9

Browse files
committed
nvapple
1 parent e18b7c2 commit 8c24ea9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ptx.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ llvm_triple(target::PTXCompilerTarget) = Int===Int64 ? "nvptx64-nvidia-cuda" : "
4646

4747
function llvm_machine(target::PTXCompilerTarget)
4848
triple = llvm_triple(target)
49-
t = Target(triple=triple)
49+
50+
# Julia does not ship NVPTX support in its LLVM on Apple
51+
t = @static if !Sys.isapple()
52+
Target(triple=triple)
53+
else
54+
Target()
55+
end
56+
5057

5158
tm = TargetMachine(t, triple, "sm_$(target.cap.major)$(target.cap.minor)",
5259
"+ptx$(target.ptx.major)$(target.ptx.minor)")

0 commit comments

Comments
 (0)