Repository navigation
Cache the kernel lookup of hipfunction with GPUCompiler's cached_lookup - #1189
Merged
Merged
Conversation
luraess
approved these changes
Oct 26, 2026
Contributor
AMDGPU.jl BenchmarksDetails
This comment was automatically generated by workflow using github-action-benchmark. |
…ookup` Every launch took a global lock, built the compiler configuration and job and queried GPUCompiler's cache, and then looked the `HIPKernel` up in a dictionary keyed on the kernel's callable. That dictionary kept every callable alive, e.g. a closure launched over a fresh array added an entry on every launch. Wrap the lookup in `GPUCompiler.cached_lookup` instead, keyed on the device and the compiler options, and construct the `HIPKernel` on each launch. A lookup hit goes from 2892 to 250 instructions, and `@roc` from about 9200 to 6600.
maleadt
force-pushed
the
tb/cached-lookup
branch
from
October 26, 2026 10:14
5945b68 to
bf01770
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.
Every launch takes a global lock, builds the compiler configuration and job, queries GPUCompiler's cache, and then looks the
HIPKernelup in_kernel_instances, a dictionary keyed on the kernel's callable. That dictionary keeps every callable alive: a closure launched over a fresh array adds an entry on every launch.This wraps the lookup in
GPUCompiler.cached_lookup(JuliaGPU/GPUCompiler.jl#1061), keyed on the device and the compiler options, and constructs theHIPKernelon each launch instead.gfx1036 iGPU, Julia 1.13:
hipfunction(hit)@roc