Skip to content

Commit 1547745

Browse files
committed
cleanup
1 parent 357c4d3 commit 1547745

File tree

4 files changed

+6
-36
lines changed

4 files changed

+6
-36
lines changed

Project.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ Adapt = "4"
3333
CEnum = "0.4, 0.5"
3434
ExprTools = "0.1"
3535
GPUArrays = "11.2.1"
36-
GPUCompiler = "1.5"
36+
GPUCompiler = "1.6"
3737
GPUToolbox = "0.1, 0.2"
3838
KernelAbstractions = "0.9.1"
3939
LLVM = "6, 7, 8, 9"
4040
NEO_jll = "=24.26.30049"
4141
Preferences = "1"
42-
SPIRVIntrinsics = "0.2"
42+
SPIRVIntrinsics = "0.4"
4343
SPIRV_LLVM_Translator_jll = "20"
4444
SpecialFunctions = "1.3, 2"
4545
StaticArrays = "1"
@@ -49,7 +49,3 @@ oneAPI_Support_jll = "0.8"
4949

5050
[extras]
5151
libigc_jll = "94295238-5935-5bd7-bb0f-b00942e9bdd5"
52-
53-
[sources]
54-
GPUCompiler = {url="https://github.com/JuliaGPU/GPUCompiler.jl", rev="vc/mtv"}
55-
SPIRVIntrinsics = {url="https://github.com/JuliaGPU/OpenCL.jl", rev="vc/mtv", subdir="lib/intrinsics"}

src/compiler/compilation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const oneAPICompilerJob = CompilerJob{SPIRVCompilerTarget,oneAPICompilerParams}
66

77
GPUCompiler.runtime_module(::oneAPICompilerJob) = oneAPI
88

9-
GPUCompiler.method_table_view(job::oneAPICompilerJob) = GPUCompiler.StackedMethodTable(job.world, method_table, spirv_method_table)
9+
GPUCompiler.method_table_view(job::oneAPICompilerJob) = GPUCompiler.StackedMethodTable(job.world, method_table, SPIRVIntrinsics.method_table)
1010

1111
# filter out OpenCL built-ins
1212
# TODO: eagerly lower these using the translator API

src/oneAPI.jl

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,12 @@ using .oneL0
2626
functional() = oneL0.functional[]
2727

2828

29-
## device overrides
30-
31-
# local method table for device functions
32-
Base.Experimental.@MethodTable(method_table)
33-
34-
macro device_override(ex)
35-
esc(quote
36-
Base.Experimental.@overlay($method_table, $ex)
37-
end)
38-
end
39-
40-
macro device_function(ex)
41-
ex = macroexpand(__module__, ex)
42-
def = ExprTools.splitdef(ex)
43-
44-
# generate a function that errors
45-
def[:body] = quote
46-
error("This function is not intended for use on the CPU")
47-
end
48-
49-
esc(quote
50-
$(ExprTools.combinedef(def))
51-
@device_override $ex
52-
end)
53-
end
54-
5529
# device functionality
5630
import SPIRVIntrinsics
5731
SPIRVIntrinsics.@import_all
5832
SPIRVIntrinsics.@reexport_public
59-
60-
const spirv_method_table = SPIRVIntrinsics.method_table
33+
# local method table for device functions
34+
Base.Experimental.@MethodTable(method_table)
6135

6236
include("device/runtime.jl")
6337
include("device/array.jl")

src/oneAPIKernels.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module oneAPIKernels
22

33
using ..oneAPI
4-
using ..oneAPI: @device_override
4+
using ..oneAPI: @device_override, method_table
55

66
import KernelAbstractions as KA
77

0 commit comments

Comments
 (0)