Make GPUCompiler IR relocatable across Julia sessions#878
Draft
maleadt wants to merge 11 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #878 +/- ##
==========================================
+ Coverage 81.57% 81.92% +0.34%
==========================================
Files 25 25
Lines 4847 5000 +153
==========================================
+ Hits 3954 4096 +142
- Misses 893 904 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vchuravy
reviewed
Jul 14, 2026
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.
Keep Julia values and runtime globals as symbolic host references until final backend lowering, instead of persisting session addresses in IR or cached metadata.
Normalize runtime globals into word-sized slots, sanitize value-global names, and make reference-aware linking collision-safe. Default backends still embed current-session values; loaders may retain relocatable slots.
For example in CUDA.jl, JuliaGPU/CUDA.jl#3200, we can use CuGlobals to populate the IR at load time, making it possible to cache even generated PTX code. Other back-ends fall back to relocating at compile time; the default behavior of GPUCompiler.jl.
Supersedes #125 and #348