@@ -12,26 +12,6 @@ module Runtime
1212using .. GPUCompiler
1313using LLVM
1414using LLVM. Interop
15- using ExprTools: splitdef, combinedef
16-
17-
18- macro device_function (ex)
19- ex = macroexpand (__module__, ex)
20- def = splitdef (ex)
21-
22- # generate a function that errors
23- def[:body ] = quote
24- error (" This function is not intended for use on the CPU" )
25- end
26-
27- esc (quote
28- $ (combinedef (def))
29-
30- # NOTE: no use of `@consistent_overlay` here because the regular function errors
31- Base. Experimental. @overlay ($ (GPUCompiler). GLOBAL_METHOD_TABLE, $ ex)
32- end )
33- end
34-
3515
3616
3717# # representation of a runtime method instance
@@ -91,7 +71,6 @@ function compile(def, return_type, types, llvm_return_type=nothing, llvm_types=n
9171 meth = RuntimeMethodInstance (def,
9272 return_type, types, name,
9373 llvm_return_type, llvm_types, llvm_name)
94- println (" Compile called for def $(def) " )
9574
9675 if haskey (methods, name)
9776 error (" Runtime function $name has already been registered!" )
@@ -103,7 +82,6 @@ function compile(def, return_type, types, llvm_return_type=nothing, llvm_types=n
10382 # work around that by generating an llvmcall stub. can we do better by
10483 # using the new nonrecursive codegen to handle function lookup ourselves?
10584 if def isa Symbol
106- println (" Symbol passed to compile: $(def) " )
10785 args = [gensym () for typ in types]
10886 @eval @device_function @inline $ def ($ (args... )) =
10987 ccall ($ (" extern $llvm_name " ), llvmcall, $ return_type, ($ (types... ),), $ (args... ))
0 commit comments