Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/compiler/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ end
# `image === nothing` identifies a `oneAPIResults` that hasn't been compiled yet. The
# `compile_hook` check additionally forces the compile path so reflection-style
# consumers (`@device_code_*`) observe the compilation even on a cache hit.
function compile_or_lookup(@nospecialize(job::CompilerJob))::oneAPIResults
# Specialize on the target/parameter types so callers can avoid boxing CompilerJob.
# Keep the body out of callers that specialize per kernel.
@noinline function compile_or_lookup(job::CompilerJob)::oneAPIResults
res = GPUCompiler.cached_results(oneAPIResults, job)
if res === nothing || res.image === nothing || GPUCompiler.compile_hook[] !== nothing
compiled = compile_to_obj(job)
Expand Down
Loading