Skip to content

Commit 55af06e

Browse files
committed
[mlir][arith] Delete unnecessary error logs
Function `getNeutralElement` already indicates "cannot find neutral element" by returning nullptr through the return value, and no additional error log needs to be output.
1 parent c5aeca7 commit 55af06e

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

mlir/lib/Dialect/Arith/IR/ArithOps.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2544,7 +2544,6 @@ std::optional<TypedAttr> mlir::arith::getNeutralElement(Operation *op) {
25442544
.Case([](arith::MulIOp op) { return AtomicRMWKind::muli; })
25452545
.Default([](Operation *op) { return std::nullopt; });
25462546
if (!maybeKind) {
2547-
op->emitError() << "Unknown neutral element for: " << *op;
25482547
return std::nullopt;
25492548
}
25502549

mlir/test/Dialect/Linalg/transform-tile-reduction.mlir

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ module {
355355
%0 = linalg.generic {indexing_maps = [#map, #map1], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<?x?xf32>) outs(%arg1 : tensor<?xf32>) {
356356
^bb0(%in: f32, %out: f32):
357357
%1 = llvm.fmul %in, %in : f32
358-
// expected-error @below {{Unknown neutral element for:}}
359358
%2 = llvm.fadd %1, %out : f32
360359
linalg.yield %2 : f32
361360
} -> tensor<?xf32>

0 commit comments

Comments
 (0)