[all-commits] [llvm/llvm-project] 571846: [mlir][vector] Relax constraints on shape_cast (#1...
James Newling via All-commits
all-commits at lists.llvm.org
Thu May 1 10:18:55 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5718460b22400e71e1832be489c9090f2c7d3ebb
https://github.com/llvm/llvm-project/commit/5718460b22400e71e1832be489c9090f2c7d3ebb
Author: James Newling <james.newling at gmail.com>
Date: 2025-05-01 (Thu, 01 May 2025)
Changed paths:
M mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
M mlir/test/Dialect/Vector/CPU/X86/vector-transpose-lowering.mlir
M mlir/test/Dialect/Vector/canonicalize.mlir
M mlir/test/Dialect/Vector/invalid.mlir
M mlir/test/Dialect/Vector/ops.mlir
Log Message:
-----------
[mlir][vector] Relax constraints on shape_cast (#136587)
`vector.shape_cast` was initially designed to be the union of
collapse_shape and expand_shape. There was an inconsistency in the
verifier that allowed any shape casts when the rank did not change, which
led to a strange middle ground where you could cast from shape (4,3) to
(3,4) but not from (4,3) to (2,3,2). That issue was fixed (verifier made stricter)
in https://github.com/llvm/llvm-project/pull/135855, but further feedback
there (and polling) suggests that vector.shape_cast should rather allow all
shape casts (so more like tensor.reshape than
tensor.collapse_shape/tensor.expand_shape). This PR makes this simplification
by relaxing the verifier.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list