Skip to content

Commit

Permalink
nvapple
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jan 30, 2025
1 parent e18b7c2 commit 8c24ea9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ptx.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ llvm_triple(target::PTXCompilerTarget) = Int===Int64 ? "nvptx64-nvidia-cuda" : "

function llvm_machine(target::PTXCompilerTarget)
triple = llvm_triple(target)
t = Target(triple=triple)

# Julia does not ship NVPTX support in its LLVM on Apple
t = @static if !Sys.isapple()
Target(triple=triple)
else
Target()
end


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

0 comments on commit 8c24ea9

Please sign in to comment.