[Mlir-commits] [mlir] [mlir][tosa] Add several level checks (PR #128074)

Luke Hutton llvmlistbot at llvm.org
Thu Feb 27 01:52:01 PST 2025


================
@@ -695,6 +773,9 @@ LogicalResult TosaValidation::applyErrorIfCheck(Operation *op) {
 }
 
 bool TosaValidation::isValidElementType(Type type) {
+  if (auto quantType = llvm::dyn_cast<mlir::quant::QuantizedType>(type))
----------------
lhutton1 wrote:

Hmm, my understanding was that the validation pass can be used as the final check before converting to other formats such as flatbuffer which do not support quantized types. Did we rely on this behaviour before now? I think some quantized test cases were added in this PR, but since they're checking the level, can they be swapped out with more basic types?

> We already have some lit tests expecting operating quantized types, e.g. ops.mlir

In ops.mlir, I think quantized types are okay since we're not running the validation pass

https://github.com/llvm/llvm-project/pull/128074


More information about the Mlir-commits mailing list