[mlir][Linalg] Add verification checks to disallow illegal reshape ops.
The existing verification of reshape ops in linalg (linalg.reshape and linalg.tensor_reshape) allows specification of illegal ops, where - A dynamic dimension is expanded into multiple dynamic dimensions. This is ill-specified. - A static dimension is expanded into dynamic dimension or viceversa, - The product of extents of the static dimensions in the expanded type doesnt match the static dimension of the collapsed type. Making all of these illegal. This also implies that some pessimization in canonicalization due to incomplete semantics of the operation can be dropped. Differential Revision: https://reviews.llvm.org/D93724
Loading
Please register or sign in to comment