Skip to content

Make GPUCompiler IR relocatable across Julia sessions#878

Draft
maleadt wants to merge 11 commits into
mainfrom
tb/relocations
Draft

Make GPUCompiler IR relocatable across Julia sessions#878
maleadt wants to merge 11 commits into
mainfrom
tb/relocations

Conversation

@maleadt

@maleadt maleadt commented Jul 14, 2026

Copy link
Copy Markdown
Member

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

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.93281% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.92%. Comparing base (2eaea7f) to head (f6b05c4).

Files with missing lines Patch % Lines
src/jlgen.jl 84.34% 18 Missing ⚠️
src/validation.jl 81.57% 7 Missing ⚠️
src/interface.jl 85.71% 2 Missing ⚠️
src/mcgen.jl 97.14% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/interface.jl Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants