Repository navigation
Cache the kernel lookup of cufunction with GPUCompiler's cached_lookup - #3482
Merged
Merged
Conversation
…okup` Every launch resolved the method instance, built the compiler configuration and job, took a global lock and queried GPUCompiler's cache: about 5500 instructions, a third of an asynchronous `@cuda`. Wrap that in `GPUCompiler.cached_lookup`, keyed on the context and the compiler options. A hit now takes about 270 instructions, and `@cuda` goes from 1.67 to 1.38 µs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3482 +/- ##
==========================================
- Coverage 87.75% 85.63% -2.12%
==========================================
Files 193 192 -1
Lines 20275 19992 -283
==========================================
- Hits 17792 17121 -671
- Misses 2483 2871 +388 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
CUDA.jl BenchmarksDetails
This comment was automatically generated by workflow using github-action-benchmark. |
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 resolves the method instance, builds the compiler configuration and job, takes a global lock and queries GPUCompiler's cache: about 5500 instructions, a third of an asynchronous
@cuda. This wraps that lookup inGPUCompiler.cached_lookup(JuliaGPU/GPUCompiler.jl#1061), keyed on the context and the compiler options.RTX 5080, Julia 1.12:
cufunction(hit)@cuda(async)