Fold away reduction over 0 dimensions.
authorMLIR Team <no-reply@google.com>
Tue, 1 Oct 2019 01:43:58 +0000 (18:43 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 1 Oct 2019 01:44:46 +0000 (18:44 -0700)
PiperOrigin-RevId: 272113564

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

index 089a492..a820559 100644 (file)
@@ -1060,7 +1060,8 @@ void OpEmitter::genCanonicalizerDecls() {
 }
 
 void OpEmitter::genFolderDecls() {
-  bool hasSingleResult = op.getNumResults() == 1;
+  bool hasSingleResult =
+      op.getNumResults() == 1 && op.getNumVariadicResults() == 0;
 
   if (def.getValueAsBit("hasFolder")) {
     if (hasSingleResult) {