Repository navigation
Report kernel lookups to the compile hook instead of recompiling - #659
Merged
Merged
Conversation
The @device_code macros observe kernels through GPUCompiler's compile hook. To report cached kernels to it, compile_or_lookup bypassed the cache whenever a hook was installed, so every launch inside one of these macros recompiled its kernel. GPUCompiler 2.13 adds run_compile_hook, which reports a job without compiling it; call it on every lookup and keep using the cache.
maleadt
force-pushed
the
tb/compile-hook
branch
from
October 7, 2026 15:20
866104f to
7ff7005
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #659 +/- ##
==========================================
- Coverage 81.12% 80.80% -0.32%
==========================================
Files 57 56 -1
Lines 4121 4100 -21
==========================================
- Hits 3343 3313 -30
- Misses 778 787 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To make the
@device_code_*macros see cached kernels,compile_or_lookupbypassed the cache whenever a hook was installed, so that GPUCompiler'scompilewould report the kernel. Every launch inside one of these macros therefore recompiled its kernel. GPUCompiler 2.13 (JuliaGPU/GPUCompiler.jl#992) addsrun_compile_hook, which reports a job without compiling it; this calls it on every lookup and keeps using the cache.