From 5e87840d59b770243c54d98b68e62b78e08fd508 Mon Sep 17 00:00:00 2001 From: Ferdinand Lemaire Date: Mon, 5 Feb 2024 16:27:38 +0000 Subject: [PATCH] allow bf16 for tosa.avgpool2d in verifier --- mlir/lib/Dialect/Tosa/IR/TosaOps.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp index fa73332ea8d66c..a0206d420c18a5 100644 --- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp +++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp @@ -193,6 +193,8 @@ LogicalResult tosa::AvgPool2dOp::verify() { if (inputETy.isF32() && resultETy.isF32()) return success(); + if (inputETy.isBF16() && resultETy.isBF16()) + return success(); if (inputETy.isInteger(8) && resultETy.isInteger(8)) return success(); if (inputETy.isInteger(16) && resultETy.isInteger(16))