Pre-compilation broken on Julia versions < 1.10.11

Chiusa
#1,019 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #1033 di @maleadt — integrata

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
julia
Ambito
compilers

Direzione di ricerca

Start with the reported failing precompilation on Julia 1.10.10 and inspect the stack trace entry in GPUCompiler.jl's relocation.jl at collect_julia_value_relocations!, then review the linked GPUCompiler.jl utils.jl comment. Compare behavior across Julia 1.10 versions before and at 1.10.11. Done means GPUCompiler precompiles on supported Julia 1.10 versions, with a regression check for the reported failure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

installation regression

The project.toml allows any version of Julia 1.10 to be used, but after GPUCompiler.jl v2.11.0, precompilation errors on any Julia v1.10 version before v1.10.11. I believe this issue is caused by some interaction with LLVM.jl v10. Maybe this comment is relevant, because the jl_get_llvm_gvs_globals it refers to only exists in v1.10.11.

Apologies if this is not an actual issue or if the issue belongs in another repo.

julia +1.10.10 --startup-file=no
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.10 (2025-06-27)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.10) pkg> activate --temp
  Activating new project at `/var/folders/tv/2nhhthmn2m91qsmlfz4yvynh0000gn/T/jl_sQaHa4`

(jl_sQaHa4) pkg> add [email protected]
   Resolving package versions...
    Updating `/private/var/folders/tv/2nhhthmn2m91qsmlfz4yvynh0000gn/T/jl_sQaHa4/Project.toml`
⌃ [61eb1bfa] + GPUCompiler v2.11.1
    Updating `/private/var/folders/tv/2nhhthmn2m91qsmlfz4yvynh0000gn/T/jl_sQaHa4/Manifest.toml`
⌅ [fa961155] + CEnum v0.5.0
  [9db33cc3] + CompilerCaching v0.5.1
  [e2ba6199] + ExprTools v0.1.11
⌃ [61eb1bfa] + GPUCompiler v2.11.1
  [076d061b] + HashArrayMappedTries v0.2.0
  [692b3bcd] + JLLWrappers v1.8.0
  [929cbde3] + LLVM v10.2.1
  [11f193de] + LMDB v3.0.1
⌅ [aea7be01] + PrecompileTools v1.2.1
  [21216c6a] + Preferences v1.6.0
  [7e506255] + ScopedValues v1.6.2
  [6c6a2e73] + Scratch v1.3.0
  [e689c965] + Tracy v0.1.6
  [dad2f222] + LLVMExtra_jll v0.0.53+0
  [6206cf0b] + LMDB_jll v1.0.0+0
  [ad6e5548] + LibTracyClient_jll v0.13.1+0
  [8b5cbfcf] + tree_sitter_gcn_jll v0.1.0+0
  [44208993] + tree_sitter_llvm_jll v1.1.0+0
  [71e3f6e6] + tree_sitter_ptx_jll v0.1.0+0
  [f0e86581] + tree_sitter_spirv_jll v0.1.0+0
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [b77e0a4c] + InteractiveUtils
  [8f399da3] + Libdl
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [de0858da] + Printf
  [3fa0cd96] + REPL
  [9a3f8284] + Random
  [ea8e919c] + SHA v0.7.0
  [6462fe0b] + Sockets
  [fa267f1f] + TOML v1.0.3
  [cf7118a7] + UUIDs
  [4ec0a83e] + Unicode
        Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`
  ✗ GPUCompiler
Precompiling packages finished.
  0 dependencies successfully precompiled in 5 seconds. 19 already precompiled.
  1 dependency errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

(jl_sQaHa4) pkg> st --manifest
Status `/private/var/folders/tv/2nhhthmn2m91qsmlfz4yvynh0000gn/T/jl_sQaHa4/Manifest.toml`
⌅ [fa961155] CEnum v0.5.0
  [9db33cc3] CompilerCaching v0.5.1
  [e2ba6199] ExprTools v0.1.11
⌃ [61eb1bfa] GPUCompiler v2.11.1
  [076d061b] HashArrayMappedTries v0.2.0
  [692b3bcd] JLLWrappers v1.8.0
  [929cbde3] LLVM v10.2.1
  [11f193de] LMDB v3.0.1
⌅ [aea7be01] PrecompileTools v1.2.1
  [21216c6a] Preferences v1.6.0
  [7e506255] ScopedValues v1.6.2
  [6c6a2e73] Scratch v1.3.0
  [e689c965] Tracy v0.1.6
  [dad2f222] LLVMExtra_jll v0.0.53+0
  [6206cf0b] LMDB_jll v1.0.0+0
  [ad6e5548] LibTracyClient_jll v0.13.1+0
  [8b5cbfcf] tree_sitter_gcn_jll v0.1.0+0
  [44208993] tree_sitter_llvm_jll v1.1.0+0
  [71e3f6e6] tree_sitter_ptx_jll v0.1.0+0
  [f0e86581] tree_sitter_spirv_jll v0.1.0+0
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [b77e0a4c] InteractiveUtils
  [8f399da3] Libdl
  [56ddb016] Logging
  [d6f4376e] Markdown
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [6462fe0b] Sockets
  [fa267f1f] TOML v1.0.3
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`

(jl_sQaHa4) pkg> 


julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

GPUCompiler 

Failed to precompile GPUCompiler [61eb1bfa-7361-4325-ad38-22787b887f55] to "/Users/treddy/.julia/compiled/v1.10/GPUCompiler/jl_rbAS2p".
ERROR: LoadError: Missing Julia object for global '*Core.nothing#9555'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] collect_julia_value_relocations!(job::GPUCompiler.CompilerJob, mod::LLVM.Module, gv_to_value::Dict{String, Ptr{Nothing}})
    @ GPUCompiler ~/.julia/packages/GPUCompiler/JTTd6/src/relocation.jl:355
  [3] irgen(job::GPUCompiler.CompilerJob)
    @ GPUCompiler ~/.julia/packages/GPUCompiler/JTTd6/src/irgen.jl:5
  [4] macro expansion
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:175 [inlined]
  [5] emit_llvm(job::GPUCompiler.CompilerJob; resolve_relocations::Bool)
    @ GPUCompiler ~/.julia/packages/GPUCompiler/JTTd6/src/utils.jl:292
  [6] emit_llvm
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/utils.jl:290 [inlined]
  [7] #compile_unhooked#386
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:77 [inlined]
  [8] compile_unhooked
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:61 [inlined]
  [9] compile(target::Symbol, job::GPUCompiler.CompilerJob)
    @ GPUCompiler ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:58
 [10] #468
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/precompile.jl:39 [inlined]
 [11] #383
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:33 [inlined]
 [12] context!(f::GPUCompiler.var"#383#385"{LLVM.Context, GPUCompiler.var"#468#469"{GPUCompiler.CompilerJob{GPUCompiler.NativeCompilerTarget, GPUCompiler.var"##249".DummyCompilerParams}}}, ctx::LLVM.Context)
    @ LLVM ~/.julia/packages/LLVM/r9ZEA/src/state.jl:84
 [13] #382
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:32 [inlined]
 [14] with_disposal(f::GPUCompiler.var"#382#384"{GPUCompiler.var"#468#469"{GPUCompiler.CompilerJob{GPUCompiler.NativeCompilerTarget, GPUCompiler.var"##249".DummyCompilerParams}}}, x::LLVM.ThreadSafeContext)
    @ LLVM ~/.julia/packages/LLVM/r9ZEA/src/base.jl:389
 [15] LLVM.ThreadSafeContext(f::Function; kwargs::@Kwargs{})
    @ LLVM ~/.julia/packages/LLVM/r9ZEA/src/executionengine/ts_module.jl:45
 [16] ThreadSafeContext
    @ ~/.julia/packages/LLVM/r9ZEA/src/executionengine/ts_module.jl:45 [inlined]
 [17] #JuliaContext#381
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:26 [inlined]
 [18] JuliaContext(f::Function)
    @ GPUCompiler ~/.julia/packages/GPUCompiler/JTTd6/src/driver.jl:25
 [19] macro expansion
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/precompile.jl:38 [inlined]
 [20] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
 [21] macro expansion
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/precompile.jl:29 [inlined]
 [22] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
 [23] top-level scope
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/precompile.jl:139
 [24] include(mod::Module, _path::String)
    @ Base ./Base.jl:495
 [25] include(x::String)
    @ GPUCompiler ~/.julia/packages/GPUCompiler/JTTd6/src/GPUCompiler.jl:1
 [26] top-level scope
    @ ~/.julia/packages/GPUCompiler/JTTd6/src/GPUCompiler.jl:103
 [27] include
    @ ./Base.jl:495 [inlined]
 [28] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2292
 [29] top-level scope
    @ stdin:4
in expression starting at /Users/treddy/.julia/packages/GPUCompiler/JTTd6/src/precompile.jl:7
in expression starting at /Users/treddy/.julia/packages/GPUCompiler/JTTd6/src/GPUCompiler.jl:1
in expression starting at stdin:

Lingua principale
Julia
Stelle
190
Fork
72
Merge medio
20h 35m
PR unite (30g)
59

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di JuliaGPU/GPUCompiler.jl

Tutte le issue di JuliaGPU/GPUCompiler.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.