[Mlir-commits] [mlir] [mlir][tosa] Support more float types in resource transpose folding (PR #213226)

Thibaut Goetghebuer-Planchon llvmlistbot at llvm.org
Tue Aug 4 02:45:39 PDT 2026


================
@@ -165,6 +165,86 @@ func.func @transpose_fold_dense_resource() -> tensor<2x2xf32> {
   }
 #-}
 
+// -----
+
+// CHECK-LABEL: @transpose_fold_dense_resource_f8e5m2
+func.func @transpose_fold_dense_resource_f8e5m2() -> tensor<2x2xf8E5M2> {
+  %0 = "tosa.const"() <{values = dense_resource<resource> : tensor<2x2xf8E5M2>}> : () -> tensor<2x2xf8E5M2>
+
+  //               CHECK: %[[CST:.+]] = "tosa.const"() <{
+  // CHECK-SAME{LITERAL}: values = dense<[[1.000000e+00, 3.000000e+00], [2.000000e+00, 4.000000e+00]]> : tensor<2x2xf8E5M2>
----------------
Tessil wrote:

Yes, for now I just extended the supported types but the current solution is far from ideal. More discussions would be needed on that.

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


More information about the Mlir-commits mailing list