Skip to content

Move the legacy deferred_codegen_jobs to deprecated.jl - #1131

Merged
maleadt merged 1 commit into
mainfrom
tb/legacy-deferred-codegen-jobs
Nov 27, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/legacy-deferred-codegen-jobs

Conversation

@maleadt

@maleadt maleadt commented Nov 27, 2026

Copy link
Copy Markdown
Member

Follow-up to #1128. Back-ends now request deferred compilation with deferred_codegen! (JuliaGPU/CUDA.jl#3640, JuliaGPU/Metal.jl#1190, JuliaGPU/OpenCL.jl#636, JuliaGPU/KernelAbstractions.jl#998), so the old way of registering jobs directly in GPUCompiler.deferred_codegen_jobs is only kept for compatibility.

This moves the dictionary and its lookup to src/deprecated.jl, with a note on what to remove in the next breaking release. Nothing changes functionally.

It is not marked with @deprecate_binding. Enzyme.jl imports and writes the dictionary from a generated function and has no replacement yet (EnzymeAD/Enzyme.jl#3511), so a warning would reach its users without a way to act on it. Released versions of the back-ends write it too. Once Enzyme has moved and the back-end PRs are released, a deprecation warning can follow.

The tests that use the legacy path (test/native.jl and the Enzyme helper) are marked as such. native, ptx and metal tests pass locally on Julia 1.13 with CI=true.

Registering jobs there directly races with concurrent compilations, and back-ends now use
`deferred_codegen!` instead. The dictionary and its lookup stay, since released back-ends
and Enzyme.jl still use them, but they now live with the other interfaces to remove in the
next breaking release. There is no deprecation warning yet: Enzyme.jl writes it from a
generated function and has no replacement.
@maleadt
maleadt merged commit 96b057a into main Nov 27, 2026
29 of 31 checks passed
@maleadt
maleadt deleted the tb/legacy-deferred-codegen-jobs branch November 27, 2026 14:51
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.12%. Comparing base (27f0d5c) to head (f4bb093).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1131      +/-   ##
==========================================
+ Coverage   93.01%   93.12%   +0.10%     
==========================================
  Files          32       32              
  Lines        8562     8552      -10     
==========================================
  Hits         7964     7964              
+ Misses        598      588      -10     

☔ 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.

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