Add CodeInstance support to kernel renaming#2475
Merged
imreddyTeja merged 2 commits intomainfrom Apr 6, 2026
Merged
Conversation
908269f to
537fdb0
Compare
petebachant
approved these changes
Mar 30, 2026
Member
petebachant
left a comment
There was a problem hiding this comment.
LGTM. I don't think I ever added a unit test for this, but if it were possible, that would be nice to ensure we can do kernel renaming on Julia 1.10--1.12.
Member
Author
That is a good point. ll add a unit test to our current 1.10 buildkite pipeline. The gpu ci is currently only run with 1.10., so 1.11 and 1.12 won't be covered |
petebachant
reviewed
Mar 31, 2026
| @testset "kernel renaming" begin | ||
| ext = Base.get_extension(ClimaCore, :ClimaCoreCUDAExt) | ||
| @assert !isnothing(ext) # cuda must be loaded to test this extension | ||
| ext.NAME_KERNELS_FROM_STACK_TRACE[] = true |
Member
There was a problem hiding this comment.
Might want to move this out into the buildkite env vars if that's the typical usage. Not sure how you usually do it, but I typically go through the env vars.
37e5153 to
6ae4739
Compare
In 1.12, kernel renaming does not function correctly when used interactively in the REPL. It looks like in 1.12 many of the frames that used to be MethodInstance(s) are now CodeInstance(s). This commit adds support for CodeInstance frames.
6ae4739 to
3a306c1
Compare
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.
In 1.12, kernel renaming does not function correctly when used interactively in the REPL. For example,
profiling
update_jacobianresults in 213 calls to kernels named__repl_entry_eval_expanded_with_loc_FILE_src_REPL_jl_L301. It looks like in 1.12 many of the frames that used to beMethodInstance(s) are nowCodeInstance(s). This commit adds support forCodeInstanceframes.Before:
After: