[Mlir-commits] [mlir] Relax checks on vector.shape_cast (PR #136587)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Apr 22 06:33:04 PDT 2025


================
@@ -2244,18 +2244,8 @@ def Vector_ShapeCastOp :
     Results<(outs AnyVectorOfAnyRank:$result)> {
   let summary = "shape_cast casts between vector shapes";
   let description = [{
-    The shape_cast operation casts between an n-D source vector shape and
-    a k-D result vector shape (the element type remains the same).
-
-    If reducing rank (n > k), result dimension sizes must be a product
-    of contiguous source dimension sizes.
-    If expanding rank (n < k), source dimensions must factor into a
-    contiguous sequence of destination dimension sizes.
-    Each source dim is expanded (or contiguous sequence of source dims combined)
-    in source dimension list order (i.e. 0 <= i < n), to produce a contiguous
-    sequence of result dims (or a single result dim), in result dimension list
-    order (i.e. 0 <= j < k). The product of all source dimension sizes and all
-    result dimension sizes must match.
+    The shape_cast operation casts from a source vector to a target vector,
+    retaining the element type and number of elements.
----------------
banach-space wrote:

In addition, the number of scalable dimensions needs to be preserved. We should be verifying that.

https://github.com/llvm/llvm-project/pull/136587


More information about the Mlir-commits mailing list