Skip to content

Report kernel lookups to the compile hook instead of recompiling - #659

Merged
maleadt merged 1 commit into
mainfrom
tb/compile-hook
Oct 8, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/compile-hook

Conversation

@maleadt

@maleadt maleadt commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

To make the @device_code_* macros see cached kernels, compile_or_lookup bypassed the cache whenever a hook was installed, so that GPUCompiler's compile would report the kernel. Every launch inside one of these macros therefore recompiled its kernel. GPUCompiler 2.13 (JuliaGPU/GPUCompiler.jl#992) adds run_compile_hook, which reports a job without compiling it; this calls it on every lookup and keeps using the cache.

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.
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.80%. Comparing base (4352038) to head (7ff7005).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maleadt
maleadt merged commit 9713607 into main Oct 8, 2026
2 of 3 checks passed
@maleadt
maleadt deleted the tb/compile-hook branch October 8, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant