mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user