[Mlir-commits] [mlir] [mlir][tosa] Add FP8 support (PR #127730)

Luke Hutton llvmlistbot at llvm.org
Thu Mar 6 09:54:34 PST 2025


================
@@ -776,3 +776,286 @@ func.func @test_const_shape() -> !tosa.shape<4> {
   %cst = tosa.const_shape {value = dense<1> : tensor<4xindex>} : () -> !tosa.shape<4>
   return %cst : !tosa.shape<4>
 }
+
+// F8 support tests
+
+// -----
+// CHECK-LABEL: argmax_f8E5M2
+func.func @test_argmax_f8E5M2(%arg0: tensor<12x8x16xf8E5M2>) -> tensor<12x16xi32> {
+  %0 = tosa.argmax %arg0 { axis = 1 : i32 } : (tensor<12x8x16xf8E5M2>) -> tensor<12x16xi32>
+  return %0 : tensor<12x16xi32>
+}
+
+// -----
+// func.func @test_avg_pool2d_f8E5M2(%arg0: tensor<1x7x7x9xf8E5M2>) -> tensor<1x7x7x9xf8E5M2> {
----------------
lhutton1 wrote:

nit: is this commented out for a particular reason?

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


More information about the Mlir-commits mailing list