We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Ops.reshape
1 parent 76785ee commit 6cdc337Copy full SHA for 6cdc337
1 file changed
src/Ops.jl
@@ -650,6 +650,8 @@ end
650
dims::Vector{Int};
651
location=mlir_stacktrace("reshape", @__FILE__, @__LINE__),
652
) where {T,N}
653
+ @assert length(x) == prod(dims)
654
+
655
# HLO reshape semantics collapse the opposite way
656
res1 = transpose(x, Int64[N:-1:1...])
657
restype = mlir_type(TracedRArray{T,length(dims)}, collect(Int64, Base.reverse(dims)))
0 commit comments