-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
propagate_julia_addrsp!
is not defined
#531
Comments
The |
Can you be more specific how you're running into this? That function is expected to not be defined anymore; Julia 1.11 only has newpm, and the newpm version of things in GPUCompiler doesn't call that function. |
Running following script runs into the issue. See also tshort/StaticCompiler.jl#145 using RecursiveFactorization, StrideArraysCore, StaticCompiler, Static, LinearAlgebra
function _linsolve!(A::Ptr{T}, b::Ptr{T}, ::Val{N}) where {N, T}
piv = Ref{NTuple{N, Int}}()
D = static(N)
GC.@preserve piv begin
F = RecursiveFactorization.lu!(PtrArray(A, (D, D)),
PtrArray(Base.unsafe_convert(Ptr{Int}, piv), (D,)))
ldiv!(F, PtrArray(b, (D,)))
end
return b
end
linsolve!(n::Val{N}) where N = (A, b) -> _linsolve!(A, b, n)
N = 10
path = compile_shlib(linsolve!(Val(N)), (Ptr{Float64}, Ptr{Float64}), "./", filename="linsolve$N") |
That's a bug with StaticCompiler.jl then, which defines its own pipeline: https://github.com/tshort/StaticCompiler.jl/blob/19792647310852ab18d00b25569517444f549078/src/optimize.jl#L10C36-L10C36 For some context: Base Julia has removed these passes as part of the Legacy PM removal. Users of those passes should migrate to the New PM, which LLVM.jl provides, and GPUCompiler has migrated to. StaticCompiler hasn't. |
StaticCompiler.jl only hits that pipeline if you use the |
Without a reproducer or even a backtrace, it's hard to tell what's happening here. It's definitely possible that GPUCompiler somehow erroneously triggers the Legacy PM functionality, feel free to open an issue about that with more details. |
Here's the stack trace. julia> path = compile_shlib(linsolve!(Val(N)), (Ptr{Float64}, Ptr{Float64}), "./", filename="linsolve$N")
ERROR: UndefVarError: `propagate_julia_addrsp!` not defined in `GPUCompiler`
Suggestion: check for spelling errors or missing imports. No global of this name exists in this module.
Stacktrace:
[1] addOptimizationPasses!(pm::LLVM.ModulePassManager, opt_level::Int64)
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/optim.jl:49
[2] addOptimizationPasses!
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/optim.jl:24 [inlined]
[3] macro expansion
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/optim.jl:183 [inlined]
[4] macro expansion
@ GPUCompiler ~/.julia/packages/LLVM/vIbji/src/base.jl:98 [inlined]
[5] optimize!(job::GPUCompiler.CompilerJob, mod::LLVM.Module)
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/optim.jl:181
[6] macro expansion
@ ~/.julia/packages/TimerOutputs/RsWnF/src/TimerOutput.jl:251 [inlined]
[7] macro expansion
@ ~/.julia/packages/GPUCompiler/YO8Uj/src/driver.jl:299 [inlined]
[8] macro expansion
@ ~/.julia/packages/TimerOutputs/RsWnF/src/TimerOutput.jl:237 [inlined]
[9] macro expansion
@ ~/.julia/packages/GPUCompiler/YO8Uj/src/driver.jl:295 [inlined]
[10] emit_llvm(job::GPUCompiler.CompilerJob; libraries::Bool, toplevel::Bool, optimize::Bool, cleanup::Bool, only_entry::Bool, validate::Bool)
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/utils.jl:89
[11] emit_llvm
@ ~/.julia/packages/GPUCompiler/YO8Uj/src/utils.jl:83 [inlined]
[12] codegen(output::Symbol, job::GPUCompiler.CompilerJob; libraries::Bool, toplevel::Bool, optimize::Bool, cleanup::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/driver.jl:129
[13] codegen
@ ~/.julia/packages/GPUCompiler/YO8Uj/src/driver.jl:110 [inlined]
[14] #45
@ ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:590 [inlined]
[15] JuliaContext(f::StaticCompiler.var"#45#46"{GPUCompiler.CompilerJob{StaticCompiler.ExternalNativeCompilerTarget, StaticCompiler.StaticCompilerParams}})
@ GPUCompiler ~/.julia/packages/GPUCompiler/YO8Uj/src/driver.jl:47
[16] native_llvm_module(f::Function, tt::Tuple{DataType, DataType}, name::String; demangle::Bool, kwargs::@Kwargs{})
@ StaticCompiler ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:589
[17] native_llvm_module(funcs::Tuple{Tuple{var"#1#2"{Val{10}}, Tuple{DataType, DataType}}}; demangle::Bool, kwargs::@Kwargs{})
@ StaticCompiler ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:598
[18] native_llvm_module
@ ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:596 [inlined]
[19] generate_obj(funcs::Tuple{Tuple{var"#1#2"{Val{10}}, Tuple{DataType, DataType}}}, external::Bool, path::String, filenamebase::String; demangle::Bool, strip_llvm::Bool, strip_asm::Bool, opt_level::Int64, kwargs::@Kwargs{})
@ StaticCompiler ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:706
[20] generate_obj
@ ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:697 [inlined]
[21] generate_shlib(funcs::Tuple{Tuple{var"#1#2"{Val{10}}, Tuple{DataType, DataType}}}, external::Bool, path::String, filename::String; demangle::Bool, cflags::Cmd, kwargs::@Kwargs{})
@ StaticCompiler ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:559
[22] generate_shlib
@ ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:551 [inlined]
[23] compile_shlib(funcs::Tuple{Tuple{var"#1#2"{Val{10}}, Tuple{DataType, DataType}}}, path::String; filename::String, demangle::Bool, cflags::Cmd, kwargs::@Kwargs{})
@ StaticCompiler ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:352
[24] compile_shlib(f::Function, types::Tuple{DataType, DataType}, path::String, name::String; filename::String, kwargs::@Kwargs{})
@ StaticCompiler ~/.julia/packages/StaticCompiler/LMT2M/src/StaticCompiler.jl:332
[25] top-level scope
@ REPL[5]:1
julia> VERSION
v"1.11.0-DEV.868" |
Decoding the |
GPUCompiler.jl/src/optim.jl
Line 464 in e5cd575
The function
propagate_julia_addrsp!
is not defined.The text was updated successfully, but these errors were encountered: