@@ -7,6 +7,7 @@ using ..Reactant:
7
7
AnyTracedRMatrix,
8
8
AnyTracedRVector,
9
9
AnyTracedRVecOrMat,
10
+ WrappedTracedRArray,
10
11
unwrapped_eltype,
11
12
Ops,
12
13
MLIR
@@ -24,18 +25,36 @@ function TracedUtils.materialize_traced_array(
24
25
return permutedims (A, (2 , 1 ))
25
26
end
26
27
28
+ function TracedUtils. materialize_traced_array (
29
+ x:: Transpose{TracedRNumber{T},<:WrappedTracedRArray{T,N}}
30
+ ) where {T,N}
31
+ return materialize_traced_array (transpose (materialize_traced_array (parent (x))))
32
+ end
33
+
27
34
function TracedUtils. materialize_traced_array (
28
35
x:: Adjoint{TracedRNumber{T},TracedRArray{T,N}}
29
36
) where {T,N}
30
37
return conj (materialize_traced_array (transpose (parent (x))))
31
38
end
32
39
40
+ function TracedUtils. materialize_traced_array (
41
+ x:: Adjoint{TracedRNumber{T},<:WrappedTracedRArray{T,N}}
42
+ ) where {T,N}
43
+ return materialize_traced_array (adjoint (materialize_traced_array (parent (x))))
44
+ end
45
+
33
46
function TracedUtils. materialize_traced_array (
34
47
x:: Diagonal{TracedRNumber{T},TracedRArray{T,1}}
35
48
) where {T}
36
49
return diagm (parent (x))
37
50
end
38
51
52
+ function TracedUtils. materialize_traced_array (
53
+ x:: Diagonal{TracedRNumber{T},WrappedTracedRArray{T,1}}
54
+ ) where {T}
55
+ return diagm (materialize_traced_array (parent (x)))
56
+ end
57
+
39
58
function TracedUtils. materialize_traced_array (
40
59
x:: Tridiagonal{TracedRNumber{T},TracedRArray{T,1}}
41
60
) where {T}
0 commit comments