Skip to content

make_mlir_fn broken on Julia 1.10 #482

@mofeing

Description

@mofeing

I think some recent commit has broken Reactant on Julia 1.10

julia> using Reactant

julia> A = rand(2,2)
2×2 Matrix{Float64}:
 0.0760192  0.710873
 0.766092   0.338489

julia> Are = Reactant.to_rarray(A)
2×2 ConcreteRArray{Float64, 2}:
 0.0760192  0.710873
 0.766092   0.338489

julia> @time @jit sum(Are)

is giving me

ERROR: TypeError: in NamedTuple, in names, expected Tuple, got Type{@NamedTuple{base::Int64, pad::Int64}}
Stacktrace:
  [1] NamedTuple
    @ ./boot.jl:622 [inlined]
  [2] make_mlir_fn(f::Function, args::Tuple{…}, kwargs::Tuple{}, name::String, concretein::Bool; toscalar::Bool, return_dialect::Symbol, no_args_in_result::Bool, construct_function_without_args::Bool, do_transpose::Bool)
    @ Reactant.TracedUtils ~/Downloads/Reactant.jl/src/TracedUtils.jl:120
  [3] make_mlir_fn
    @ ~/Downloads/Reactant.jl/src/TracedUtils.jl:86 [inlined]
  [4] compile_mlir!(mod::Reactant.MLIR.IR.Module, f::Function, args::Tuple{ConcreteRArray{Float64, 2}}; optimize::Bool, no_nan::Bool)
    @ Reactant.Compiler ~/Downloads/Reactant.jl/src/Compiler.jl:348
  [5] compile_mlir!
    @ ~/Downloads/Reactant.jl/src/Compiler.jl:339 [inlined]
  [6] compile_xla(f::Function, args::Tuple{ConcreteRArray{Float64, 2}}; client::Nothing, optimize::Bool, no_nan::Bool)
    @ Reactant.Compiler ~/Downloads/Reactant.jl/src/Compiler.jl:844
  [7] compile_xla
    @ ~/Downloads/Reactant.jl/src/Compiler.jl:835 [inlined]
  [8] compile(f::Function, args::Tuple{ConcreteRArray{Float64, 2}}; client::Nothing, optimize::Bool, sync::Bool, no_nan::Bool)
    @ Reactant.Compiler ~/Downloads/Reactant.jl/src/Compiler.jl:870
  [9] macro expansion
    @ ~/Downloads/Reactant.jl/src/Compiler.jl:580 [inlined]
 [10] macro expansion
    @ ./timing.jl:279 [inlined]
 [11] top-level scope
    @ ./REPL[5]:1
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions