Support backend-defined jobs in reflection hooks - #925
Merged
Conversation
Accept backend-defined jobs in the individual device_code macros. Expose the shared hook and macro builder, with a job filter for backend-specific stages, and print already-inferred code so reflection can preserve constant specializations. Report unsupported stages explicitly and keep the all-stage dump specific to the LLVM pipeline. Cover foreign jobs, mixed jobs, filtering, keyword forwarding, and hook suppression.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #925 +/- ##
==========================================
+ Coverage 85.49% 85.76% +0.26%
==========================================
Files 29 29
Lines 5584 5598 +14
==========================================
+ Hits 4774 4801 +27
+ Misses 810 797 -13 ☔ 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.
GPUCompiler's reflection macros currently expect a
CompilerJob, tying them to GPUCompiler's compilation pipeline. Backends such as cuTile have their own job types and compilation stages, but still need to inspect kernels launched by an expression—including expressions that use multiple backends.Allow the individual
@device_code_*macros to accept backend-defined jobs and dispatch to their reflection methods. Documentcompile_hookas the shared entry point, including how backends report cached compilations. Backends can also build their own stage macros with an optional job filter, and display already-inferred code with type-instability highlighting. This lets them preserve constant specializations instead of reconstructing a generic inference request.Missing LLVM or native reflection produces an explicit unsupported-operation error. The all-stage
@device_codedirectory dump remains specific to GPUCompiler's LLVM pipeline.Bump the version to 2.6 for downstream compatibility bounds.