[mlir][arith] Delete unnecessary error logs (#94970)

Function `getNeutralElement` already indicates "cannot find neutral
element" by returning nullptr through the return value, and no
additional error log needs to be output.
This commit is contained in:
donald chen
2024-06-11 19:41:01 +08:00
committed by GitHub
parent 264bcbe1c8
commit efbd64cbd9
2 changed files with 0 additions and 2 deletions

View File

@@ -2544,7 +2544,6 @@ std::optional<TypedAttr> mlir::arith::getNeutralElement(Operation *op) {
.Case([](arith::MulIOp op) { return AtomicRMWKind::muli; })
.Default([](Operation *op) { return std::nullopt; });
if (!maybeKind) {
op->emitError() << "Unknown neutral element for: " << *op;
return std::nullopt;
}

View File

@@ -355,7 +355,6 @@ module {
%0 = linalg.generic {indexing_maps = [#map, #map1], iterator_types = ["parallel", "reduction"]} ins(%arg0 : tensor<?x?xf32>) outs(%arg1 : tensor<?xf32>) {
^bb0(%in: f32, %out: f32):
%1 = llvm.fmul %in, %in : f32
// expected-error @below {{Unknown neutral element for:}}
%2 = llvm.fadd %1, %out : f32
linalg.yield %2 : f32
} -> tensor<?xf32>