Make GPUCompiler IR relocatable across Julia sessions#878
Open
maleadt wants to merge 31 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #878 +/- ##
==========================================
+ Coverage 81.75% 82.13% +0.37%
==========================================
Files 26 26
Lines 4879 5032 +153
==========================================
+ Hits 3989 4133 +144
- Misses 890 899 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vchuravy
reviewed
Jul 14, 2026
maleadt
marked this pull request as ready for review
July 15, 2026 20:34
Member
Author
|
Okay, this is starting to look good. IR should be fully relocatable after this, at least for back-ends supporting run-time relocations. |
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 libjulia runtime globals as symbolic relocations until final backend lowering, instead of persisting session-specific host addresses in IR or cached code. Relocations can target Julia object identities or named runtime globals, through either dedicated pointer-sized slots or words embedded in device-side object representations.
Relocation metadata remains associated with the IR through linking and optimization, with stable, collision-safe slot names. Backends may preserve relocations for their loader to resolve and patch at runtime, while the default lowering eagerly embeds addresses from the current Julia session.
CUDA.jl uses this in JuliaGPU/CUDA.jl#3200 to materialize relocations as CuGlobal slots populated at load time, allowing generated PTX to be cached across Julia sessions. Other backends retain the existing eager behavior.
Supersedes #125 and #348