[Mlir-commits] [mlir] [mlir][tosa] Add F32 to F16 type narrowing pass (PR #218900)

Davide Grohmann llvmlistbot at llvm.org
Mon Sep 7 04:46:32 PDT 2026


================
@@ -689,9 +761,15 @@ LogicalResult runTosaNarrowing(Operation *op, bool aggressiveRewrite,
 
   ConversionTarget target(*context);
   target.addDynamicallyLegalDialect<tosa::TosaDialect>(
-      [&typeConverter](Operation *op) {
-        return typeConverter.isLegal(op->getResultTypes()) &&
-               typeConverter.isLegal(op->getOperandTypes());
+      [&typeConverter, convertAccumulatorType](Operation *op) {
+        if (!typeConverter.isLegal(op->getResultTypes()) ||
----------------
davidegrohmann wrote:

Not to be resolved in this patch.

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


More information about the Mlir-commits mailing list