Skip to content

Commit 9cf12e1

Browse files
committed
[ONNX] Mapping reduction string from onnx add to torch sum
1 parent b1413a6 commit 9cf12e1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/Conversion/TorchOnnxToTorch/DefaultDomainQtoZ.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,12 @@ void mlir::torch::onnx_c::populateDefaultDomainQtoZ(
635635

636636
// TODO: Implement max and min cases
637637
if (reduction == "mul") {
638-
reduction = "multiply";
638+
reduction = "prod";
639639
} else if (reduction == "max" || reduction == "min") {
640640
return rewriter.notifyMatchFailure(
641641
binder.op, "max/min reduction unsupported for scatter elements");
642+
} else if (reduction == "add") {
643+
reduction = "sum";
642644
}
643645

644646
Value cstStrReduction =

0 commit comments

Comments
 (0)