Skip to content

Fix precompilation on Julia 1.10 before 1.10.11 - #1033

Merged
maleadt merged 1 commit into
mainfrom
tb/old-1.10-precompile
Oct 20, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/old-1.10-precompile

Conversation

@maleadt

@maleadt maleadt commented Oct 19, 2026

Copy link
Copy Markdown
Member

Fixes #1019.

While generating output (e.g. during precompilation), Julia emits code in imaging mode regardless of what we request, leaving Julia-value globals with null initializers. Before 1.10.11, Julia lacks jl_get_llvm_gvs_globals, so there is no way to pair those globals with their values (#753). The fallback in compile_method_instance mapped them to C_NULL; before #878 that silently became a null pointer, but relocation lowering now rejects it, which breaks precompilation of GPUCompiler's own workload on Julia 1.10.0–1.10.10:

ERROR: LoadError: Missing Julia object for global '*Core.nothing#9555'

This leaves such globals out of the map, restoring the pre-2.11 behavior. Code compiled during precompilation on those versions still contains null pointers for Julia values, as it always has, but results are session-local on 1.10, so it is not reused. 1.11 and 1.12 releases without the API are not affected (checked 1.11.8 and 1.12.4).

CI only covers the latest 1.10.x, which has the API, so it never exercises this path. Adding 'min' to the version matrix would.

While generating output, Julia before 1.10.11 emits Julia-value globals
with null initializers and has no API to pair them with their values.
The fallback mapped those globals to C_NULL, which relocation lowering
rejects since #878, breaking precompilation of GPUCompiler itself on
those versions (#1019). Leave them out of the map instead, which
restores the pre-2.11 behavior of keeping them null.

Fixes #1019
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.41%. Comparing base (8cef038) to head (4133cd6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1033      +/-   ##
==========================================
+ Coverage   92.40%   92.41%   +0.01%     
==========================================
  Files          31       31              
  Lines        7237     7236       -1     
==========================================
  Hits         6687     6687              
+ Misses        550      549       -1     

☔ 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.

@maleadt
maleadt merged commit d11381a into main Oct 20, 2026
36 checks passed
@maleadt
maleadt deleted the tb/old-1.10-precompile branch October 20, 2026 04:50
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.

Pre-compilation broken on Julia versions < 1.10.11

1 participant