We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9965f3d commit fe88ebdCopy full SHA for fe88ebd
mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -600,6 +600,11 @@ LogicalResult tosa::AvgPool2dOp::verify() {
600
if (inputETy.isF32() && !accType.isF32())
601
return emitOpError("accumulator type for f32 tensor is not f32");
602
603
+ if ((llvm::isa<Float8E5M2Type>(inputETy) ||
604
+ llvm::isa<Float8E4M3FNType>(inputETy)) &&
605
+ !accType.isF16())
606
+ return emitOpError("accumulator type for f8 tensor is not f16");
607
+
608
if (inputETy != inputZpETy)
609
return emitOpError("expect both input and its zero point are the same "
610
"element type, got ")
0 commit comments