Skip to content

Conversation

@avik-pal
Copy link
Collaborator

fixes #1892

@avik-pal
Copy link
Collaborator Author

somehow this change breaks 1.11 interpreter

@avik-pal
Copy link
Collaborator Author

@wsmoses any idea why the stackoverflow happens here?

https://github.com/EnzymeAD/Reactant.jl/actions/runs/19586536457/job/56096622229?pr=1896#step:20:25830

ERROR: LoadError: StackOverflowError:
Stacktrace:
    [1] abstract_call_known(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, f::Any, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)
      @ Enzyme.Compiler.Interpreter ~/.julia/packages/Enzyme/sSbWV/src/compiler/interpreter.jl:1047
    [2] abstract_call(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState, max_methods::Int64)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:2282
    [3] abstract_call(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, arginfo::Core.Compiler.ArgInfo, si::Core.Compiler.StmtInfo, sv::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:2275
    [4] abstract_call(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, arginfo::Core.Compiler.ArgInfo, sv::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:2423
    [5] abstract_eval_call(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:2438
    [6] abstract_eval_statement_expr(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, e::Expr, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:2454
    [7] abstract_eval_statement(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, e::Any, vtypes::Vector{Core.Compiler.VarState}, sv::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:2752
    [8] abstract_eval_basic_statement(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, stmt::Any, pc_vartable::Vector{Core.Compiler.VarState}, frame::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:3068
    [9] typeinf_local(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, frame::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:3331
   [10] typeinf_nocycle(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, frame::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/abstractinterpretation.jl:3413
   [11] _typeinf(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, frame::Core.Compiler.InferenceState)
      @ Core.Compiler ./compiler/typeinfer.jl:244
   [12] typeinf(interp::Enzyme.Compiler.Interpreter.EnzymeInterpreter{typeof(Reactant.set_reactant_abi)}, frame::Core.Compiler.InferenceState)

@wsmoses
Copy link
Member

wsmoses commented Nov 22, 2025

so inference is recurring, so somewhere there's an accidental interpreter infinite recursion. I'd try to add a good deal of inference barriers and see whats up?

or alternatively you can add prints inside the itnerpreter to see what's being caught on

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.

Improve compile times for sum(Slices) (/mapreduce)

3 participants