Repository navigation
Fix precompilation on Julia 1.10 before 1.10.11 - #1033
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
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 incompile_method_instancemapped them toC_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: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.