11# code reflection entry-points
22
33using CUDACore
4- using CUDACore: COMPILER_KWARGS, compiler_config, compile, link
54
65using CUPTI
76using CUPTI: CUpti_ModuleResourceData
@@ -35,9 +34,9 @@ convenient to display the SASS code for functions whose source code is not avail
3534See also: [`@device_code_sass`](@ref)
3635"""
3736function code_sass (io:: IO , @nospecialize (func), @nospecialize (types); kwargs... )
38- compiler_kwargs, kwargs = split_kwargs_runtime (kwargs, COMPILER_KWARGS)
37+ compiler_kwargs, kwargs = split_kwargs_runtime (kwargs, CUDACore . COMPILER_KWARGS)
3938 source = methodinstance (typeof (func), Base. to_tuple_type (types))
40- config = compiler_config (device (); compiler_kwargs... )
39+ config = CUDACore . compiler_config (device (); compiler_kwargs... )
4140 job = CompilerJob (source, config)
4241 code_sass (io, job; kwargs... )
4342end
@@ -78,9 +77,9 @@ function code_sass(io::IO, job::CompilerJob; raw::Bool=false)
7877 disassemble_cubin (io, cubin; raw)
7978 end
8079
81- compiled = compile (job)
80+ compiled = CUDACore . compile (job)
8281 CUPTI. enable! (cfg) do
83- link (job, compiled)
82+ CUDACore . link (job, compiled)
8483 end
8584
8685 return
@@ -174,9 +173,9 @@ for method in (:code_typed, :code_warntype, :code_llvm, :code_native)
174173 @eval begin
175174 function $method (io:: IO , @nospecialize (func), @nospecialize (types);
176175 kernel= false , kwargs... )
177- compiler_kwargs, kwargs = split_kwargs_runtime (kwargs, COMPILER_KWARGS)
176+ compiler_kwargs, kwargs = split_kwargs_runtime (kwargs, CUDACore . COMPILER_KWARGS)
178177 source = methodinstance (typeof (func), Base. to_tuple_type (types))
179- config = compiler_config (device (); kernel, compiler_kwargs... )
178+ config = CUDACore . compiler_config (device (); kernel, compiler_kwargs... )
180179 job = CompilerJob (source, config)
181180 GPUCompiler.$ method ($ (args... ); kwargs... )
182181 end
@@ -194,7 +193,7 @@ Return a type `r` such that `f(args...)::r` where `args::tt`.
194193"""
195194function return_type (@nospecialize (func), @nospecialize (tt))
196195 source = methodinstance (typeof (func), tt)
197- config = compiler_config (device ())
196+ config = CUDACore . compiler_config (device ())
198197 job = CompilerJob (source, config)
199198 interp = GPUCompiler. get_interpreter (job)
200199 sig = Base. signature_type (func, tt)
0 commit comments