File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ const SPIRV_LLVM_Backend_jll =
1010const SPIRV_LLVM_Translator_unified_jll =
1111 LazyModule (" SPIRV_LLVM_Translator_unified_jll" ,
1212 UUID (" 85f0d8ed-5b39-5caa-b1ae-7472de402361" ))
13+ const SPIRV_LLVM_Translator_jll =
14+ LazyModule (" SPIRV_LLVM_Translator_jll" ,
15+ UUID (" 4a5d46fc-d8cf-5151-a261-86b458210efb" ))
1316const SPIRV_Tools_jll =
1417 LazyModule (" SPIRV_Tools_jll" ,
1518 UUID (" 6ac6d60f-d740-5983-97d7-a4482c0689f4" ))
127130 cmd = ` $(cmd) -spirv-ext=$str `
128131 end
129132 elseif job. config. target. backend === :khronos
130- cmd = ` $(SPIRV_LLVM_Translator_unified_jll. llvm_spirv ()) -o $translated $input --spirv-debug-info-version=ocl-100`
133+ translator = if isavailable (SPIRV_LLVM_Translator_jll)
134+ SPIRV_LLVM_Translator_jll. llvm_spirv ()
135+ elseif isavailable (SPIRV_LLVM_Translator_unified_jll)
136+ SPIRV_LLVM_Translator_unified_jll. llvm_spirv ()
137+ else
138+ error (" This functionality requires the SPIRV_LLVM_Translator_jll or SPIRV_LLVM_Translator_unified_jll package, which should be installed and loaded first." )
139+ end
140+ cmd = ` $translator -o $translated $input --spirv-debug-info-version=ocl-100`
131141
132142 if ! isempty (job. config. target. extensions)
133143 str = join (map (ext-> " +$ext " , job. config. target. extensions), " ," )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1010REPL = " 3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
1111Random = " 9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1212SPIRV_LLVM_Backend_jll = " 4376b9bf-cff8-51b6-bb48-39421dff0d0c"
13- SPIRV_LLVM_Translator_unified_jll = " 85f0d8ed-5b39-5caa-b1ae-7472de402361 "
13+ SPIRV_LLVM_Translator_jll = " 4a5d46fc-d8cf-5151-a261-86b458210efb "
1414SPIRV_Tools_jll = " 6ac6d60f-d740-5983-97d7-a4482c0689f4"
1515StaticArrays = " 90137ffa-7385-5640-81b9-e52037218182"
1616Test = " 8dfed614-e22c-5e08-85e1-65c5234f0b40"
Original file line number Diff line number Diff line change 11using Distributed, Test, GPUCompiler, LLVM
22
3- using SPIRV_LLVM_Backend_jll, SPIRV_LLVM_Translator_unified_jll , SPIRV_Tools_jll
3+ using SPIRV_LLVM_Backend_jll, SPIRV_LLVM_Translator_jll , SPIRV_Tools_jll
44
55# include all helpers
66include (joinpath (@__DIR__ , " helpers" , " runtime.jl" ))
You can’t perform that action at this time.
0 commit comments