[all-commits] [llvm/llvm-project] 330a7e: [mlir][Vector] Make elementwise-on-broadcast sinki...
Krzysztof Drewniak via All-commits
all-commits at lists.llvm.org
Tue Jul 29 09:41:10 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 330a7e1136f536bf7cd642e460734d0bd6e0d0bb
https://github.com/llvm/llvm-project/commit/330a7e1136f536bf7cd642e460734d0bd6e0d0bb
Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: 2025-07-29 (Tue, 29 Jul 2025)
Changed paths:
M mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
M mlir/test/Dialect/Linalg/vectorization/extract-with-patterns.mlir
M mlir/test/Dialect/Vector/vector-sink.mlir
Log Message:
-----------
[mlir][Vector] Make elementwise-on-broadcast sinking handle splat consts (#150867)
There is a pattern that rewrites
elementwise_op(broadcast(x1 : T to U), broadcast(x2 : T to U), ...) to
broadcast(elementwise_op(x1, x2, ...) : T to U).
This pattern did not, however, account for the case where a broadcast
constant is represented as a SplatElementsAttr, which can safely be
reshaped or scalarized but is not a `vector.broadcast` or `vector.splat`
operation.
This patch fixes this oversight, prenting premature broadcasting.
This did result in the need to update some linalg dialect tests, which
now feature a less-broadcast computation and/or more constant folding.
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