[Mlir-commits] [mlir] [mlir][tosa] Align validation profiles to TOSA v1.0 spec (PR #132768)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Mar 24 09:50:18 PDT 2025
https://github.com/Jerry-Ge updated https://github.com/llvm/llvm-project/pull/132768
>From bd5bf2e9420285d85d0d148f9ca8e96406710610 Mon Sep 17 00:00:00 2001
From: Jerry Ge <jerry.ge at arm.com>
Date: Mon, 24 Mar 2025 09:06:07 -0700
Subject: [PATCH] [mlir][tosa] Align validation profiles and extensions to TOSA
v1.0 spec
* Add missing int16 extension for concat operator
* Remove int16 extension for cast operator
* Add pro_int and pro_fp profiles for const_shape operator
Signed-off-by: Jerry Ge <jerry.ge at arm.com>
Change-Id: Idff47f7fc9ecd799113b6409279fbd5a0f38e9f4
---
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td | 2 +-
mlir/test/Dialect/Tosa/availability.mlir | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
index 14e15173de7bc..64e92733bfbb0 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
@@ -1882,7 +1882,7 @@ def Tosa_ConcatOp : Tosa_InferTensorTypeOp<"concat"> {
list<Availability> availability = [
Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
- Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
+ Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT16]>,
];
let hasCanonicalizer = 1;
diff --git a/mlir/test/Dialect/Tosa/availability.mlir b/mlir/test/Dialect/Tosa/availability.mlir
index ff910a40cf219..62ea12a7a6948 100644
--- a/mlir/test/Dialect/Tosa/availability.mlir
+++ b/mlir/test/Dialect/Tosa/availability.mlir
@@ -507,7 +507,7 @@ func.func @test_reduce_sum(%arg0: tensor<13x21x3xf32>) -> tensor<1x21x3xf32> {
// CHECK-LABEL: concat
func.func @test_concat(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x21x3xf32>) -> tensor<26x21x3xf32> {
// CHECK: profiles: [ [pro_int, pro_fp] ]
- // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16] ]
+ // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int16] ]
%0 = tosa.concat %arg0, %arg1 {axis = 0 : i32} : (tensor<13x21x3xf32>, tensor<13x21x3xf32>) -> tensor<26x21x3xf32>
return %0 : tensor<26x21x3xf32>
}
More information about the Mlir-commits
mailing list