[Mlir-commits] [mlir] [mlir][linalg][gpu] Clean up printing. NFC. (PR #136330)
Jakub Kuderski
llvmlistbot at llvm.org
Fri Apr 18 10:46:02 PDT 2025
================
@@ -3660,17 +3661,13 @@ ParseResult MatmulOp::parse(OpAsmParser &parser, OperationState &result) {
}
void MatmulOp::print(OpAsmPrinter &p) {
- SmallVector<Attribute, 3> indexingMaps = llvm::map_to_vector(
+ SmallVector<Attribute, 3> indexingMaps = llvm::map_to_vector<3>(
MatmulOp::getDefaultIndexingMaps(getContext()),
[](AffineMap map) -> Attribute { return AffineMapAttr::get(map); });
- if (!llvm::equal(getIndexingMaps(), indexingMaps)) {
- p << " indexing_maps = [";
- llvm::interleaveComma(getIndexingMaps(), p,
- [&](Attribute attr) { p.printAttribute(attr); });
- p << "]";
- }
+ if (!llvm::equal(getIndexingMaps(), indexingMaps))
+ p << " indexing_maps = " << llvm::interleaved_array(getIndexingMaps());
----------------
kuhar wrote:
The prefix and suffix gets printed unconditionally, so the code is equivalent
https://github.com/llvm/llvm-project/pull/136330
More information about the Mlir-commits
mailing list