Skip to content
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

function_attributes(::LLVM.ConstantExpr) is not defined #2113

Closed
avik-pal opened this issue Nov 21, 2024 · 1 comment
Closed

function_attributes(::LLVM.ConstantExpr) is not defined #2113

avik-pal opened this issue Nov 21, 2024 · 1 comment

Comments

@avik-pal
Copy link
Contributor

MethodError: no method matching function_attributes(::LLVM.ConstantExpr)
  The function `function_attributes` exists, but no method is defined for this combination of argument types.
  
  Closest candidates are:
    function_attributes(::LLVM.Function)
     @ LLVM ~/.julia/packages/LLVM/wMjUU/src/core/function.jl:127
  
  Stacktrace:
    [1] check_ir!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, errors::Vector{Tuple{String, Vector{Base.StackTraces.StackFrame}, Any}}, imported::Set{String}, f::LLVM.Function, deletedfns::Vector{LLVM.Function})
      @ Enzyme.Compiler ~/.julia/packages/Enzyme/RTS5U/src/compiler/validation.jl:580
    [2] check_ir!(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, errors::Vector{Tuple{String, Vector{Base.StackTraces.StackFrame}, Any}}, mod::LLVM.Module)
      @ Enzyme.Compiler ~/.julia/packages/Enzyme/RTS5U/src/compiler/validation.jl:400
    [3] check_ir
      @ ~/.julia/packages/Enzyme/RTS5U/src/compiler/validation.jl:181 [inlined]
    [4] codegen(output::Symbol, job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, toplevel::Bool, strip::Bool, validate::Bool, only_entry::Bool, parent_job::Nothing)
      @ Enzyme.Compiler ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:6225
    [5] codegen
      @ ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:6146 [inlined]
    [6] _thunk(job::GPUCompiler.CompilerJob{Enzyme.Compiler.EnzymeTarget, Enzyme.Compiler.EnzymeCompilerParams}, postopt::Bool)
      @ Enzyme.Compiler ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:8468
    [7] _thunk
      @ ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:8468 [inlined]
    [8] cached_compilation
      @ ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:8509 [inlined]
    [9] thunkbase(ctx::LLVM.Context, mi::Core.MethodInstance, ::Val{0x0000000000006960}, ::Type{EnzymeCore.Const{typeof(Main.var"##EnzymeTestSetup#8[435](https://github.com/LuxDL/Lux.jl/actions/runs/11945900969/job/33299369020?pr=1042#step:6:436)".generic_loss_function)}}, ::Type{EnzymeCore.Active}, tt::Type{Tuple{EnzymeCore.Const{Lux.Bilinear{typeof(identity), Int64, Int64, Int64, Nothing, Nothing, Static.True}}, EnzymeCore.Duplicated{Matrix{Float32}}, EnzymeCore.Duplicated{ComponentArrays.ComponentVector{Float32, Vector{Float32}, Tuple{ComponentArrays.Axis{(weight = ViewAxis(1:12, ShapedAxis((3, 2, 2))), bias = 13:15)}}}}, EnzymeCore.Const{@NamedTuple{}}}}, ::Val{Enzyme.API.DEM_ReverseModeCombined}, ::Val{1}, ::Val{(false, false, false, false, false)}, ::Val{false}, ::Val{false}, ::Type{EnzymeCore.FFIABI}, ::Val{true}, ::Val{true})
      @ Enzyme.Compiler ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:8641
   [10] #s2105#19135
      @ ~/.julia/packages/Enzyme/RTS5U/src/compiler.jl:8778 [inlined]
   [11] var"#s2105#19135"(FA::Any, A::Any, TT::Any, Mode::Any, ModifiedBetween::Any, width::Any, ReturnPrimal::Any, ShadowInit::Any, World::Any, ABI::Any, ErrIfFuncWritten::Any, RuntimeActivity::Any, ::Any, ::Any, ::Any, ::Any, tt::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
      @ Enzyme.Compiler ./none:0
   [12] (::Core.GeneratedFunctionStub)(::UInt64, ::LineNumberNode, ::Any, ::Vararg{Any})
      @ Core ./boot.jl:707
   [13] autodiff
      @ ~/.julia/packages/Enzyme/RTS5U/src/Enzyme.jl:473 [inlined]
   [14] autodiff
      @ ~/.julia/packages/Enzyme/RTS5U/src/Enzyme.jl:512 [inlined]
@wsmoses
Copy link
Member

wsmoses commented Nov 21, 2024

Does #2114 resolve this for you?

@wsmoses wsmoses closed this as completed Nov 22, 2024
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

No branches or pull requests

2 participants