EnzymeAD / EnzymeAD/Reactant.jl

UndefVarError: `Ops` not defined in `Reactant`

Open
#1,943 2 comments 0 reactions 0 assignees View on GitHub
julia1.12
Dominant language
Julia
Stars
370
Forks
74
Avg merge
18h 47m
Merged PRs (30d)
30

Description

On latest released version of Reactant, julia v1.12

Since this is an undefvar error, I figured the stack trace is enough?
```julia
ERROR: UndefVarError: `Ops` not defined in `Reactant`
Suggestion: define the const at top-level before running function that uses it (stricter Julia v1.12+ rule).
Note: the binding state changed since the error occurred (was: 11, now: 0).
Stacktrace:
[1] should_rewrite_call(ft::Any)
@ Reactant ~/.julia/packages/Reactant/woboD/src/utils.jl:245
[2] should_rewrite_invoke
@ ~/.julia/packages/Reactant/woboD/src/utils.jl:280 [inlined]
[3] call_with_reactant_generator(world::UInt64, source::Union{LineNumberNode, Method}, self::Any, redub_arguments::Any)
@ Reactant ~/.julia/packages/Reactant/woboD/src/utils.jl:735
[4] make_mlir_fn(f::typeof(create), args::Tuple{…}, kwargs::@NamedTuple{…}, name::String, concretein::Bool; toscalar::Bool, return_dialect::Symbol, args_in_result::Symbol, construct_function_without_args::Bool, do_transpose::Bool, input_shardings::Nothing, output_shardings::Nothing, runtime::Val{…}, verify_arg_names::Nothing, argprefix::Symbol, resprefix::Symbol, resargprefix::Symbol, num_replicas::Int64, optimize_then_pad::Bool)
@ Reactant.TracedUtils ~/.julia/packages/Reactant/woboD/src/TracedUtils.jl:347
[5] make_mlir_fn
@ ~/.julia/packages/Reactant/woboD/src/TracedUtils.jl:275 [inlined]
[6] compile_mlir!(mod::Reactant.MLIR.IR.Module, f::typeof(create), args::Tuple{…}, compile_options::CompileOptions, callcache::Dict{…}, sdycache::Dict{…}, sdygroupidcache::Tuple{…}; fn_kwargs::@NamedTuple{…}, backend::String, runtime::Val{…}, legalize_stablehlo_to_mhlo::Bool, client::Reactant.XLA.PJRT.Client, kwargs::@Kwargs{})
@ Reactant.Compiler ~/.julia/packages/Reactant/woboD/src/Compiler.jl:1627
[7] compile_xla(f::Function, args::Tuple{…}; before_xla_optimizations::Bool, client::Nothing, serializable::Bool, kwargs::@Kwargs{…})
@ Reactant.Compiler ~/.julia/packages/Reactant/woboD/src/Compiler.jl:3550
[8] compile_xla
@ ~/.julia/packages/Reactant/woboD/src/Compiler.jl:3522 [inlined]
[9] compile(f::Function, args::Tuple{…}; kwargs::@Kwargs{…})
@ Reactant.Compiler ~/.julia/packages/Reactant/woboD/src/Compiler.jl:3626
[10] macro expansion
@ ~/.julia/packages/Reactant/woboD/src/Compiler.jl:2695 [inlined]
[11] create_r(A::SMatrix{…}, B::SMatrix{…}, C::SMatrix{…}, Q::SMatrix{…}, R::SMatrix{…}, Rr::SMatrix{…}, Ts::Float64, umin::SVector{…}, umax::SVector{…}; Np::Int64)
@ Main ~/.julia/dev/LinearMPC/example/bench_creation.jl:56
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.