From 8c24ea9a03461d2d2991f91f58e7c71cc10f35aa Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Thu, 30 Jan 2025 13:53:46 +0100 Subject: [PATCH] nvapple --- src/ptx.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ptx.jl b/src/ptx.jl index a90317dc..9c5c5e74 100644 --- a/src/ptx.jl +++ b/src/ptx.jl @@ -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)")