1919
2020TracedRArray {T,N} (x:: TracedRArray{T,N} ) where {T,N} = x
2121
22- function Base. setproperty! (x:: TracedRArray , f:: Symbol , v)
23- if f === :mlir_data && ! isnothing (v)
24- @assert size (MLIR. IR. type (v)) == size (x)
25- end
26- return setfield! (x, f, v)
27- end
28-
2922mutable struct TracedRNumber{T} <: RNumber{T}
3023 paths:: Tuple
3124 mlir_data:: Union{Nothing,MLIR.IR.Value}
@@ -40,13 +33,6 @@ mutable struct TracedRNumber{T} <: RNumber{T}
4033 end
4134end
4235
43- function Base. setproperty! (x:: TracedRNumber , f:: Symbol , v)
44- if f === :mlir_data && ! isnothing (v)
45- @assert size (MLIR. IR. type (v)) == ()
46- end
47- return setfield! (x, f, v)
48- end
49-
5036Base. eltype (:: Type{TracedRNumber{T}} ) where {T} = T
5137
5238const WrappedTracedRArray{T,N} = WrappedArray{T,N,TracedRArray,TracedRArray{T,N}}
@@ -318,7 +304,7 @@ for (jlop, hloop) in (
318304 @eval function $ (jlop)(
319305 @nospecialize (lhs:: TracedRNumber{T} ), @nospecialize (rhs:: TracedRNumber{T} )
320306 ) where {T}
321- return TracedRArray {T} (
307+ return TracedRNumber {T} (
322308 (),
323309 MLIR. IR. result (
324310 MLIR. Dialects. stablehlo.$ (hloop)(lhs. mlir_data, rhs. mlir_data), 1
@@ -430,7 +416,6 @@ function elem_apply(f, args::Vararg{Any,Nargs}) where {Nargs}
430416 residx = 1
431417
432418 for a in linear_results
433- @show a
434419 if has_residx (a)
435420 path = get_residx (a)
436421 set! (result, path[2 : end ], MLIR. IR. result (res, residx))
0 commit comments