Skip to content

Commit 57d86f1

Browse files
authored
fix: noop check (#953)
1 parent 3cb288e commit 57d86f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/TracedUtils.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ function elem_apply(f, args::Vararg{Any,Nargs}) where {Nargs}
629629
end
630630

631631
function broadcast_to_size(arg::AbstractArray{<:TracedRNumber}, rsize)
632+
collect(size(arg)) == collect(rsize) && return arg
632633
if Reactant.ancestor(arg) isa TracedRArray
633634
return broadcast_to_size(materialize_traced_array(arg), rsize)
634635
end

0 commit comments

Comments
 (0)