[Mlir-commits] [llvm] [mlir] [mlir][tosa] Remove availability interfaces from profile conformance (PR #207809)

Luke Hutton llvmlistbot at llvm.org
Wed Jul 29 01:55:06 PDT 2026


https://github.com/lhutton1 updated https://github.com/llvm/llvm-project/pull/207809

>From f2c19f6b6d0290dc45b3a03ca2555fca4ff8c0ee Mon Sep 17 00:00:00 2001
From: Luke Hutton <luke.hutton at arm.com>
Date: Thu, 2 Jul 2026 16:41:57 +0100
Subject: [PATCH] [mlir][tosa] Remove availability interfaces from profile
 conformance

This commit removes the "QueryProfileInterface" and
"QueryExtensionInterface" as they are superflous in most cases, with
TosaComplianceData.h.inc already providing much of the data we need.
Removing these also helps prevent mistakes as observed in:
https://github.com/llvm/llvm-project/pull/206687

This commit removes these interfaces and updates the profile
conformance to extract supported profile/extension information from
TosaComplianceData.h.inc instead.

One factor that isn't duplicated is operations that rely on extensions,
but do not declare any data type support. This is a small set of
operations, such as tosa.custom, tosa.cond_if, tosa.while_loop and
tosa.const_shape, and we can add them to the TosaComplianceData.h.inc
file as needed.

Change-Id: I5b63aa9f00757f31302a255291511d27dd153986
---
 .../mlir/Dialect/Tosa/IR/CMakeLists.txt       |   6 -
 .../Dialect/Tosa/IR/TosaComplianceData.h.inc  |  18 +
 .../mlir/Dialect/Tosa/IR/TosaOpBase.td        | 142 +---
 mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h   |   6 -
 mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td  | 459 -----------
 .../Dialect/Tosa/IR/TosaProfileCompliance.h   |   5 +-
 .../mlir/Dialect/Tosa/IR/TosaShapeOps.td      |  14 -
 mlir/lib/Dialect/Tosa/CMakeLists.txt          |   1 -
 mlir/lib/Dialect/Tosa/IR/TosaOps.cpp          |   2 -
 .../Tosa/Transforms/TosaProfileCompliance.cpp |  75 +-
 mlir/test/Dialect/Tosa/availability.mlir      | 749 ------------------
 mlir/test/Dialect/Tosa/invalid_extension.mlir |  42 +-
 .../Dialect/Tosa/profile_all_unsupported.mlir |  22 +-
 .../Tosa/profile_pro_fp_unsupported.mlir      |  31 -
 mlir/test/lib/Dialect/Tosa/CMakeLists.txt     |   1 -
 .../lib/Dialect/Tosa/TestAvailability.cpp     |  80 --
 mlir/tools/mlir-opt/mlir-opt.cpp              |   2 -
 mlir/tools/mlir-tblgen/CMakeLists.txt         |   1 -
 mlir/tools/mlir-tblgen/TosaUtilsGen.cpp       | 215 -----
 .../llvm-project-overlay/mlir/BUILD.bazel     |  13 -
 20 files changed, 95 insertions(+), 1789 deletions(-)
 delete mode 100644 mlir/test/Dialect/Tosa/availability.mlir
 delete mode 100644 mlir/test/lib/Dialect/Tosa/TestAvailability.cpp
 delete mode 100644 mlir/tools/mlir-tblgen/TosaUtilsGen.cpp

diff --git a/mlir/include/mlir/Dialect/Tosa/IR/CMakeLists.txt b/mlir/include/mlir/Dialect/Tosa/IR/CMakeLists.txt
index 5d78f76d8810a..c9300bfe42d9b 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Tosa/IR/CMakeLists.txt
@@ -17,9 +17,3 @@ set(LLVM_TARGET_DEFINITIONS TosaOpBase.td)
 mlir_tablegen(TosaEnums.h.inc -gen-enum-decls)
 mlir_tablegen(TosaEnums.cpp.inc -gen-enum-defs)
 add_mlir_dialect_tablegen_target(MLIRTosaEnumsIncGen)
-
-set(LLVM_TARGET_DEFINITIONS TosaOps.td)
-mlir_tablegen(TosaAvailability.h.inc -gen-avail-interface-decls)
-mlir_tablegen(TosaAvailability.cpp.inc -gen-avail-interface-defs)
-mlir_tablegen(TosaOpAvailabilityImpl.inc -gen-tosa-avail-impls)
-add_mlir_dialect_tablegen_target(MLIRTosaAvailabilityIncGen)
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc b/mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc
index d08cd7453bea0..6a6f87dabf3af 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc
@@ -559,6 +559,8 @@ profileComplianceMap = {
       {{Profile::pro_fp},
        {{{fp16T}, SpecificationVersion::V_1_0},
         {{fp32T}, SpecificationVersion::V_1_0}}}}},
+    {"tosa.custom", {{{Profile::pro_int, Profile::pro_fp}, {}, anyOf}}},
+    {"tosa.const_shape", {{{Profile::pro_int, Profile::pro_fp}, {}, anyOf}}},
 };
 
 extensionComplianceMap = {
@@ -2927,6 +2929,22 @@ extensionComplianceMap = {
        {{{i8T}, SpecificationVersion::V_1_0},
         {{fp16T}, SpecificationVersion::V_1_0},
         {{fp32T}, SpecificationVersion::V_1_0}}}}},
+    {"tosa.add_shape", {{{Extension::shape}, {}}}},
+    {"tosa.assert_equal_shape", {{{Extension::shape}, {}}}},
+    {"tosa.concat_shape", {{{Extension::shape}, {}}}},
+    {"tosa.div_ceil_shape", {{{Extension::shape}, {}}}},
+    {"tosa.div_floor_shape", {{{Extension::shape}, {}}}},
+    {"tosa.exp2_shape", {{{Extension::shape}, {}}}},
+    {"tosa.log2_ceil_shape", {{{Extension::shape}, {}}}},
+    {"tosa.log2_floor_shape", {{{Extension::shape}, {}}}},
+    {"tosa.max_shape", {{{Extension::shape}, {}}}},
+    {"tosa.min_shape", {{{Extension::shape}, {}}}},
+    {"tosa.mod_shape", {{{Extension::shape}, {}}}},
+    {"tosa.mul_shape", {{{Extension::shape}, {}}}},
+    {"tosa.slice_shape", {{{Extension::shape}, {}}}},
+    {"tosa.sub_shape", {{{Extension::shape}, {}}}},
+    {"tosa.while_loop", {{{Extension::controlflow}, {}}}},
+    {"tosa.cond_if", {{{Extension::controlflow}, {}}}},
     {"tosa.dim",
      {{{Extension::shape},
        {{{boolT}, SpecificationVersion::V_1_1_DRAFT},
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
index d527bde997a7d..63acbb09b7a04 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
@@ -339,111 +339,6 @@ def Tosa_ExtensionAttr
 def Tosa_ExtensionArrayAttr
     : TypedArrayAttrBase<Tosa_ExtensionAttr, "TOSA extension array attribute">;
 
-// The base class for defining op availability dimensions.
-class Availability {
-  // The following are fields for controlling the generated C++ OpInterface.
-
-  // The namespace for the generated C++ OpInterface subclass.
-  string cppNamespace = "::mlir::tosa";
-
-  // The name for the generated C++ OpInterface subclass.
-  string interfaceName = ?;
-
-  // The description for the generated C++ OpInterface subclass.
-  string interfaceDescription = "";
-
-  // The query function's return type in the generated C++ OpInterface subclass.
-  string queryFnRetType = ?;
-
-  // The query function's name in the generated C++ OpInterface subclass.
-  string queryFnName = ?;
-
-  // The logic for merging two availability requirements.
-  code mergeAction = ?;
-
-  // The initializer for the final availability requirement.
-  string initializer = ?;
-
-  // An availability instance's type.
-  string instanceType = ?;
-
-  // The following are fields for a concrete availability instance.
-
-  // The code for preparing a concrete instance. This should be C++ statements
-  // and will be generated before the `mergeAction` logic.
-  code instancePreparation = "";
-
-  // The availability requirement carried by a concrete instance.
-  string instance = ?;
-}
-
-
-class Profile<list<I32EnumAttrCase> profiles> : Availability {
-  let interfaceName = "QueryProfileInterface";
-  let interfaceDescription = [{
-    Querying interface for the supported set of Tosa profile.
-
-    This interface provides a `getProfiles()` method to query
-    the supported set of Tosa profile. The returned value is a
-    list of `mlir::Tosa::Profile` enum number.
-  }];
-
-  let queryFnRetType = "::llvm::SmallVector<::llvm::ArrayRef<"
-                          "::mlir::tosa::Profile>, 1>";
-  let queryFnName = "getProfiles";
-
-  let mergeAction = !if(
-      !empty(profiles), "", "$overall.emplace_back($instance)");
-
-  let initializer = "{}";
-
-  let instanceType = "::llvm::ArrayRef<::mlir::tosa::Profile>";
-
-  // Pack all profiles as a static array and get its reference.
-  let instancePreparation = !if(!empty(profiles), "",
-    "static const ::mlir::tosa::Profile profs[] = {" #
-    !interleave(!foreach(prof, profiles,
-                         "::mlir::tosa::Profile::" # prof.symbol), ", ") #
-    "}; " #
-    "ArrayRef<::mlir::tosa::Profile> " #
-      "ref(profs, std::size(profs));");
-
-  let instance = "ref";
-}
-
-class Extension<list<I32EnumAttrCase> extensions> : Availability {
-  let interfaceName = "QueryExtensionInterface";
-  let interfaceDescription = [{
-    Querying interface for the supported set of TOSA extension.
-
-    This interface provides a `getExtensions()` method to query
-    the supported set of Tosa extension. The returned value is a
-    list of `mlir::Tosa::Extension` enum number.
-  }];
-
-  let queryFnRetType = "::llvm::SmallVector<::llvm::ArrayRef<"
-                          "::mlir::tosa::Extension>, 1>";
-  let queryFnName = "getExtensions";
-
-  let mergeAction = !if(
-      !empty(extensions), "", "$overall.emplace_back($instance)");
-
-  let initializer = "{}";
-
-  let instanceType = "::llvm::ArrayRef<::mlir::tosa::Extension>";
-
-  // Pack all extensions as a static array and get its reference.
-  let instancePreparation = !if(!empty(extensions), "",
-    "static const ::mlir::tosa::Extension exts[] = {" #
-    !interleave(!foreach(ext, extensions,
-                         "::mlir::tosa::Extension::" # ext.symbol), ", ") #
-    "}; " #
-    "ArrayRef<::mlir::tosa::Extension> " #
-      "ref(exts, std::size(exts));");
-
-  let instance = "ref";
-}
-
 //===----------------------------------------------------------------------===//
 // TOSA Levels
 //===----------------------------------------------------------------------===//
@@ -546,30 +441,6 @@ def Tosa_BlockShapeAttr
   }];
 }
 
-//===----------------------------------------------------------------------===//
-// TOSA Interfaces.
-//===----------------------------------------------------------------------===//
-
-def QueryProfileInterface : OpInterface<"QueryProfileInterface"> {
-  let cppNamespace = "::mlir::tosa";
-  let methods = [InterfaceMethod<
-    "get supported profiles",
-    "::llvm::SmallVector<::llvm::ArrayRef<::mlir::tosa::Profile>, 1>",
-    "getProfiles">];
-}
-
-def QueryExtensionInterface : OpInterface<"QueryExtensionInterface"> {
-  let cppNamespace = "::mlir::tosa";
-  let methods = [InterfaceMethod<
-    "get supported extensions",
-    "::llvm::SmallVector<::llvm::ArrayRef<::mlir::tosa::Extension>, 1>",
-    "getExtensions">];
-}
-
-//===----------------------------------------------------------------------===//
-// TOSA Operator Trait.
-//===----------------------------------------------------------------------===//
-
 // Permits broadcasting. Elementwise trait is too strict.
 def TosaElementwiseOperator : NativeOpTrait<"TosaElementwiseOperator"> {
   let cppNamespace = "mlir::OpTrait::tosa";
@@ -589,18 +460,7 @@ def TosaResolvableShapeOperands : NativeOpTrait<"TosaResolvableShapeOperands"> {
 
 class Tosa_Op<string mnemonic, list<Trait> traits = []> :
     Op<Tosa_Dialect, mnemonic, !listconcat(traits, [TosaOpInterface,
-    DeclareOpInterfaceMethods<QueryProfileInterface>,
-    DeclareOpInterfaceMethods<QueryExtensionInterface>,
-    TosaResolvableShapeOperands])> {
-
-  // Default availability specification.
-  list<Availability> availability = [
-    Profile<[]>,
-    Extension<[]>];
-
-  // When not set, manual implementation of these methods is required.
-  bit autogenAvailability = 1;
-}
+    TosaResolvableShapeOperands])> {}
 
 class Tosa_ElementwiseOp<string mnemonic, list<Trait> traits = []> :
     Tosa_Op<mnemonic, !listconcat(traits, [
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
index b1404d9c700ae..240988f8beb21 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
@@ -33,12 +33,6 @@
 #include "mlir/Dialect/Tosa/IR/TosaOpsDialect.h.inc"
 #include "mlir/Transforms/DialectConversion.h"
 
-//===----------------------------------------------------------------------===//
-// TOSA operation validation includes.
-//===----------------------------------------------------------------------===//
-
-#include "mlir/Dialect/Tosa/IR/TosaAvailability.h.inc"
-
 namespace mlir {
 class PatternRewriter;
 
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
index c2f8e7eeb45a3..2d5ab85f6bfc9 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
@@ -54,11 +54,6 @@ def Tosa_ArgMaxOp : Tosa_InferShapedTypeOp<"argmax", [NoMemoryEffect]> {
     Tosa_Tensor: $output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
@@ -101,11 +96,6 @@ def Tosa_AvgPool2dOp : Tosa_InferShapedTypeOp<"avg_pool2d", [NoMemoryEffect]> {
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
-  ];
-
   let builders = [Tosa_AvgPool2dOpQuantInfoBuilder];
 
   let extraClassDeclaration = [{
@@ -146,12 +136,6 @@ def Tosa_AvgPool2dAdaptiveOp
 
   let results = (outs Tosa_Tensor4D:$output);
 
-  list<Availability> availability =
-      [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-       Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2,
-                  Tosa_EXT_BF16]>,
-  ];
-
   let builders = [Tosa_AvgPool2dAdaptiveOpQuantInfoBuilder];
 
   let extraClassDeclaration = [{
@@ -201,15 +185,6 @@ def Tosa_Conv2DOp : Tosa_ConvOp<"conv2d"> {
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT4, Tosa_EXT_INT16, Tosa_EXT_FP8E4M3,
-               Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_MX_COMMON,
-               Tosa_EXT_MX_FP4E2M1, Tosa_EXT_MX_FP6E2M3,
-               Tosa_EXT_MX_FP6E3M2, Tosa_EXT_MX_FP8E4M3,
-               Tosa_EXT_MX_FP8E5M2, Tosa_EXT_MX_INT8]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getInputZeroPoint();
     FailureOr<int64_t> getWeightZeroPoint();
@@ -258,11 +233,6 @@ def Tosa_Conv2DBlockScaledOp : Tosa_InferShapedTypeOp<"conv2d_block_scaled", [No
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_MXFP_CONV]>,
-  ];
-
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
 }
@@ -299,11 +269,6 @@ def Tosa_Conv3DOp : Tosa_ConvOp<"conv3d"> {
     Tosa_Tensor5D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT4, Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getInputZeroPoint();
     FailureOr<int64_t> getWeightZeroPoint();
@@ -348,11 +313,6 @@ def Tosa_DepthwiseConv2DOp : Tosa_ConvOp<"depthwise_conv2d"> {
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT4, Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getInputZeroPoint();
     FailureOr<int64_t> getWeightZeroPoint();
@@ -403,11 +363,6 @@ def Tosa_FFT2dOp : Tosa_InferShapedTypeOp<"fft2d", [
     Tosa_Tensor3D:$output_imag
   );
 
-  list<Availability> availability = [
-    Profile<[]>,
-    Extension<[Tosa_EXT_FFT]>,
-  ];
-
   let assemblyFormat = [{
     $input_real `,` $input_imag attr-dict `:` `(` type($input_real) `,`
     type($input_imag) `)` `->` `(` type($output_real) `,` type($output_imag) `)`
@@ -443,11 +398,6 @@ def Tosa_MatMulOp : Tosa_InferShapedTypeOp<"matmul", [NoMemoryEffect]> {
     Tosa_Tensor3D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getAZeroPoint();
     FailureOr<int64_t> getBZeroPoint();
@@ -480,14 +430,6 @@ def Tosa_MatMulTOp : Tosa_InferShapedTypeOp<"matmul_t", [NoMemoryEffect]> {
 
   let results = (outs Tosa_Tensor3D:$output);
 
-  list<Availability> availability =
-      [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-       Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2,
-                  Tosa_EXT_BF16, Tosa_EXT_MX_COMMON, Tosa_EXT_MX_FP4E2M1,
-                  Tosa_EXT_MX_FP6E2M3, Tosa_EXT_MX_FP6E3M2, Tosa_EXT_MX_FP8E4M3,
-                  Tosa_EXT_MX_FP8E5M2, Tosa_EXT_MX_INT8]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getAZeroPoint();
     FailureOr<int64_t> getBZeroPoint();
@@ -536,11 +478,6 @@ def Tosa_MatmulTBlockScaledOp : Tosa_InferShapedTypeOp<"matmul_t_block_scaled",
 
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
-
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_MXFP]>
-  ];
 }
 
 //===----------------------------------------------------------------------===//
@@ -569,11 +506,6 @@ def Tosa_MaxPool2dOp : Tosa_InferShapedTypeOp<"max_pool2d", [Pure]> {
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
-  ];
-
   let hasCanonicalizer = 1;
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
@@ -604,12 +536,6 @@ def Tosa_MaxPool2dAdaptiveOp
 
   let results = (outs Tosa_Tensor4D:$output);
 
-  list<Availability> availability =
-      [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-       Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2,
-                  Tosa_EXT_BF16]>,
-  ];
-
   let hasVerifier = 1;
   let hasCanonicalizer = 1;
   let hasCustomAssemblyFormat = 1;
@@ -651,11 +577,6 @@ def Tosa_RFFT2dOp : Tosa_InferShapedTypeOp<"rfft2d", [
     Tosa_Tensor3D:$output_imag
   );
 
-  list<Availability> availability = [
-    Profile<[]>,
-    Extension<[Tosa_EXT_FFT]>,
-  ];
-
   let assemblyFormat = [{
     $input_real attr-dict `:` `(` type($input_real) `)` `->` `(` type($output_real) `,` type($output_imag) `)`
   }];
@@ -698,11 +619,6 @@ def Tosa_TransposeConv2DOp : Tosa_ConvOp<"transpose_conv2d"> {
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT4, Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getInputZeroPoint();
     FailureOr<int64_t> getWeightZeroPoint();
@@ -743,11 +659,6 @@ def Tosa_ClampOp : Tosa_ElementwiseUnaryOp<"clamp", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT16, Tosa_EXT_BF16]>,
-  ];
-
   let hasCanonicalizer = 1;
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
@@ -774,11 +685,6 @@ def Tosa_ErfOp : Tosa_ElementwiseUnaryOp<"erf", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -806,11 +712,6 @@ def Tosa_SigmoidOp : Tosa_ElementwiseUnaryOp<"sigmoid", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -837,11 +738,6 @@ def Tosa_TanhOp : Tosa_ElementwiseUnaryOp<"tanh", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -884,11 +780,6 @@ def Tosa_AddOp : Tosa_ElementwiseOp<"add", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
 
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
@@ -920,11 +811,6 @@ def Tosa_ArithmeticRightShiftOp : Tosa_ElementwiseOp<"arithmetic_right_shift",
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -951,11 +837,6 @@ def Tosa_BitwiseAndOp : Tosa_ElementwiseOp<"bitwise_and", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -982,11 +863,6 @@ def Tosa_BitwiseOrOp : Tosa_ElementwiseOp<"bitwise_or", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1013,11 +889,6 @@ def Tosa_BitwiseXorOp : Tosa_ElementwiseOp<"bitwise_xor", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1046,11 +917,6 @@ def Tosa_IntDivOp : Tosa_ElementwiseOp<"intdiv", [SameOperandsAndResultElementTy
     Tosa_Int32Or64Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
 
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
@@ -1079,11 +945,6 @@ def Tosa_LogicalAndOp : Tosa_ElementwiseOp<"logical_and", [
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1112,11 +973,6 @@ def Tosa_LogicalLeftShiftOp : Tosa_ElementwiseOp<"logical_left_shift",
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1145,11 +1001,6 @@ def Tosa_LogicalRightShiftOp : Tosa_ElementwiseOp<"logical_right_shift",
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1176,11 +1027,6 @@ def Tosa_LogicalOrOp : Tosa_ElementwiseOp<"logical_or", [
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1207,11 +1053,6 @@ def Tosa_LogicalXorOp : Tosa_ElementwiseOp<"logical_xor", [
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1238,11 +1079,6 @@ def Tosa_MaximumOp : Tosa_ElementwiseOp<"maximum", [
   let results = (outs
     Tosa_Tensor:$output
   );
-
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
   let hasCustomAssemblyFormat = 1;
 }
 
@@ -1270,11 +1106,6 @@ def Tosa_MinimumOp : Tosa_ElementwiseOp<"minimum", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasCustomAssemblyFormat = 1;
 }
 
@@ -1307,11 +1138,6 @@ def Tosa_MulOp : Tosa_Op<"mul", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -1343,11 +1169,6 @@ def Tosa_PowOp : Tosa_ElementwiseOp<"pow", [SameOperandsAndResultElementType]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1374,11 +1195,6 @@ def Tosa_SubOp : Tosa_ElementwiseOp<"sub", [SameOperandsAndResultElementType]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
 
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
@@ -1419,11 +1235,6 @@ def Tosa_TableOp : Tosa_InferShapedTypeOp<"table", [NoMemoryEffect]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT16]>,
-  ];
-
   let assemblyFormat = [{
     $input1 `,` $table attr-dict `:` `(` type($input1) `,` type($table) `)` `->` type($output)
   }];
@@ -1465,11 +1276,6 @@ def Tosa_AbsOp : Tosa_ElementwiseUnaryOp<"abs", [NoMemoryEffect]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
 
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
@@ -1493,11 +1299,6 @@ def Tosa_BitwiseNotOp : Tosa_ElementwiseUnaryOp<"bitwise_not", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1519,11 +1320,6 @@ def Tosa_CeilOp : Tosa_ElementwiseUnaryOp<"ceil", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1545,11 +1341,6 @@ def Tosa_ClzOp : Tosa_ElementwiseUnaryOp<"clz", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1571,11 +1362,6 @@ def Tosa_CosOp : Tosa_ElementwiseUnaryOp<"cos", [Pure]> {
     Tosa_FloatTensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1597,11 +1383,6 @@ def Tosa_ExpOp : Tosa_ElementwiseUnaryOp<"exp", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1623,11 +1404,6 @@ def Tosa_FloorOp : Tosa_ElementwiseUnaryOp<"floor", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1649,11 +1425,6 @@ def Tosa_LogOp : Tosa_ElementwiseUnaryOp<"log", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1675,11 +1446,6 @@ def Tosa_LogicalNotOp : Tosa_ElementwiseUnaryOp<"logical_not", [Pure]> {
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1708,11 +1474,6 @@ def Tosa_NegateOp : Tosa_InferShapedTypeOp<"negate", [
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let builders = [Tosa_NegateOpQuantInfoBuilder];
 
   let extraClassDeclaration = [{
@@ -1748,11 +1509,6 @@ def Tosa_ReciprocalOp : Tosa_ElementwiseUnaryOp<"reciprocal", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let extraClassDeclaration = [{
     /// Return the reciprocal result on the operand.
     static inline APFloat calcOneElement(const APFloat &operand) {
@@ -1786,11 +1542,6 @@ def Tosa_RsqrtOp : Tosa_ElementwiseUnaryOp<"rsqrt", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1812,11 +1563,6 @@ def Tosa_SinOp : Tosa_ElementwiseUnaryOp<"sin", [Pure]> {
     Tosa_FloatTensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -1844,11 +1590,6 @@ def Tosa_SelectOp : Tosa_ElementwiseOp<"select", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasCanonicalizeMethod = 1;
   let hasFolder = 1;
   let hasVerifier = 1;
@@ -1895,11 +1636,6 @@ def Tosa_EqualOp : Tosa_ElementwiseOp<"equal", [
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let extraClassDeclaration = [{
     /// Returns when two result types are compatible for this op; method used by
     /// InferTypeOpInterface.
@@ -1931,11 +1667,6 @@ def Tosa_GreaterOp : Tosa_ElementwiseOp<"greater", [SameOperandsElementType,
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
 
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
@@ -1961,11 +1692,6 @@ def Tosa_GreaterEqualOp : Tosa_ElementwiseOp<"greater_equal",
     Tosa_I1Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
 
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
@@ -1994,11 +1720,6 @@ def Tosa_ReduceAllOp : Tosa_InferTensorTypeOp<"reduce_all", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2035,11 +1756,6 @@ def Tosa_ReduceAnyOp : Tosa_InferTensorTypeOp<"reduce_any", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2077,11 +1793,6 @@ def Tosa_ReduceMaxOp : Tosa_InferTensorTypeOp<"reduce_max", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2119,11 +1830,6 @@ def Tosa_ReduceMinOp : Tosa_InferTensorTypeOp<"reduce_min", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2163,11 +1869,6 @@ def Tosa_ReduceProductOp : Tosa_InferTensorTypeOp<"reduce_product", [NoMemoryEff
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2207,11 +1908,6 @@ def Tosa_ReduceSumOp : Tosa_InferTensorTypeOp<"reduce_sum", [NoMemoryEffect]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2253,15 +1949,6 @@ def Tosa_ConcatOp : Tosa_InferTensorTypeOp<"concat", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16,
-               Tosa_EXT_INT16, Tosa_EXT_INT64,
-               Tosa_EXT_MX_COMMON, Tosa_EXT_MX_FP4E2M1,
-               Tosa_EXT_MX_FP6E2M3, Tosa_EXT_MX_FP6E3M2, Tosa_EXT_MX_FP8E4M3,
-               Tosa_EXT_MX_FP8E5M2, Tosa_EXT_MX_INT8]>,
-  ];
-
   let hasCanonicalizer = 1;
   let hasVerifier = 1;
 
@@ -2312,11 +1999,6 @@ def Tosa_PadOp : Tosa_InferShapedTypeOp<"pad", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let builders = [Tosa_PadOpQuantInfoBuilder];
 
   let hasFolder = 1;
@@ -2350,15 +2032,6 @@ def Tosa_ReshapeOp : Tosa_InferTensorTypeOp<"reshape", [Pure]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16,
-               Tosa_EXT_INT64, Tosa_EXT_MX_COMMON, Tosa_EXT_MX_FP4E2M1,
-               Tosa_EXT_MX_FP6E2M3, Tosa_EXT_MX_FP6E3M2,
-               Tosa_EXT_MX_FP8E4M3, Tosa_EXT_MX_FP8E5M2,
-               Tosa_EXT_MX_INT8]>,
-  ];
-
   let extraClassDeclaration = [{
     /// Returns true when two result types are compatible for this op;
     /// Method used by InferTypeOpInterface.
@@ -2395,12 +2068,6 @@ def Tosa_ReshapeBlockScaledOp
 
   let results = (outs Variadic<Tosa_Tensor>:$output);
 
-  list<Availability> availability = [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-                                     // NOTE: Validation of extensions is
-                                     // disabled for this op
-                                     Extension<[]>,
-  ];
-
   let extraClassDeclaration = [{
     /// Returns true when two result types are compatible for this op;
     /// Method used by InferTypeOpInterface.
@@ -2438,11 +2105,6 @@ def Tosa_ReverseOp: Tosa_Op<"reverse", [
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 
@@ -2471,11 +2133,6 @@ def Tosa_SliceOp : Tosa_InferShapedTypeOp<"slice", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasCanonicalizer = 1;
   let hasFolder = 1;
   let hasVerifier = 1;
@@ -2502,11 +2159,6 @@ def Tosa_TileOp : Tosa_InferShapedTypeOp<"tile", [Pure]> {
     Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let extraClassDeclaration = [{
     LogicalResult getConstantMultiples(llvm::SmallVector<int64_t> &multiples);
   }];
@@ -2544,11 +2196,6 @@ def Tosa_TransposeOp : Tosa_InferShapedTypeOp<"transpose",
     outs Tosa_TensorAtLeast1D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasCanonicalizer = 1;
   let hasFolder = 1;
   let hasVerifier = 1;
@@ -2586,11 +2233,6 @@ def Tosa_GatherOp : Tosa_InferShapedTypeOp<"gather", [NoMemoryEffect]> {
     Tosa_Tensor3D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasVerifier = 1;
 
   let assemblyFormat =
@@ -2620,20 +2262,6 @@ def Tosa_RowGatherOp : Tosa_InferShapedTypeOp<"row_gather", [NoMemoryEffect]> {
 
   let results = (outs Tosa_Tensor3D:$output);
 
-  list<Availability> availability = [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-                                     Extension<[Tosa_EXT_FP8E4M3,
-                                                Tosa_EXT_FP8E5M2, Tosa_EXT_BF16,
-                                                Tosa_EXT_INT16,
-                                                Tosa_EXT_INT64,
-                                                Tosa_EXT_MX_COMMON,
-                                                Tosa_EXT_MX_FP4E2M1,
-                                                Tosa_EXT_MX_FP6E2M3,
-                                                Tosa_EXT_MX_FP6E3M2,
-                                                Tosa_EXT_MX_FP8E4M3,
-                                                Tosa_EXT_MX_FP8E5M2,
-                                                Tosa_EXT_MX_INT8]>,
-  ];
-
   let hasCanonicalizer = 1;
   let hasVerifier = 1;
 
@@ -2673,12 +2301,6 @@ def Tosa_RowGatherBlockScaledOp
 
   let results = (outs Variadic<Tosa_Tensor3D>:$output);
 
-  list<Availability> availability = [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-                                     Extension<[Tosa_EXT_FP8E4M3,
-                                                Tosa_EXT_FP8E5M2, Tosa_EXT_BF16,
-                                                Tosa_EXT_MXFP, Tosa_EXT_INT64]>,
-  ];
-
   let hasVerifier = 1;
 
   let assemblyFormat =
@@ -2715,11 +2337,6 @@ def Tosa_ScatterOp : Tosa_InferShapedTypeOp<"scatter", [NoMemoryEffect]> {
     Tosa_Tensor3D:$values_out
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let hasVerifier = 1;
 
   let assemblyFormat =
@@ -2775,15 +2392,6 @@ def Tosa_ResizeOp : Tosa_InferShapedTypeOp<"resize", [Pure]> {
     Tosa_Tensor4D:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2,
-               Tosa_EXT_BF16, Tosa_EXT_MX_COMMON, Tosa_EXT_MX_FP4E2M1,
-               Tosa_EXT_MX_FP6E2M3, Tosa_EXT_MX_FP6E3M2,
-               Tosa_EXT_MX_FP8E4M3, Tosa_EXT_MX_FP8E5M2,
-               Tosa_EXT_MX_INT8]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
@@ -2814,14 +2422,6 @@ def Tosa_CastOp: Tosa_Op<"cast", [Pure, SameOperandsAndResultShape,
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability =
-      [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-       Extension<[Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16,
-                  Tosa_EXT_INT64, Tosa_EXT_MX_COMMON, Tosa_EXT_MX_FP4E2M1,
-                  Tosa_EXT_MX_FP6E2M3, Tosa_EXT_MX_FP6E3M2, Tosa_EXT_MX_FP8E4M3,
-                  Tosa_EXT_MX_FP8E5M2, Tosa_EXT_MX_INT8]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 
   let hasFolder = 1;
@@ -2855,11 +2455,6 @@ def Tosa_CastFromBlockScaledOp: Tosa_InferShapedTypeOp<"cast_from_block_scaled",
     Tosa_TensorAtLeast1D: $output_data
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_MXFP]>,
-  ];
-
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
 }
@@ -2891,11 +2486,6 @@ def Tosa_CastToBlockScaledOp : Tosa_InferShapedTypeOp<"cast_to_block_scaled", [P
     Tosa_MXFPScaleTensorAtLeast1D:$output_scale
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_BF16, Tosa_EXT_MXFP]>
-  ];
-
   let hasCanonicalizer = 1;
   let hasVerifier = 1;
   let hasCustomAssemblyFormat = 1;
@@ -2962,11 +2552,6 @@ def Tosa_RescaleOp : Tosa_InferShapedTypeOp<"rescale", [NoMemoryEffect]> {
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT]>,
-    Extension<[Tosa_EXT_INT16]>,
-  ];
-
   let extraClassDeclaration = [{
     FailureOr<int64_t> getInputZeroPoint();
     FailureOr<int64_t> getOutputZeroPoint();
@@ -3010,15 +2595,6 @@ def Tosa_ConstOp : Tosa_Op<"const", [ConstantLike, Pure,
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability =
-      [Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-       Extension<[Tosa_EXT_INT4, Tosa_EXT_INT16, Tosa_EXT_FP8E4M3,
-                  Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_MXFP,
-                  Tosa_EXT_INT64, Tosa_EXT_MX_COMMON, Tosa_EXT_MX_FP4E2M1,
-                  Tosa_EXT_MX_FP6E2M3, Tosa_EXT_MX_FP6E3M2, Tosa_EXT_MX_FP8E4M3,
-                  Tosa_EXT_MX_FP8E5M2, Tosa_EXT_MX_INT8]>,
-  ];
-
   let hasFolder = 1;
   let hasVerifier = 1;
 }
@@ -3042,11 +2618,6 @@ def Tosa_IdentityOp: Tosa_Op<"identity", [Pure,
     Tosa_Tensor:$output
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_INT4, Tosa_EXT_INT16, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_INT64]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -3101,11 +2672,6 @@ def Tosa_CustomOp : Tosa_Op<"custom"> {
     Variadic<Tosa_Tensor>:$output_list
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let assemblyFormat = "operands attr-dict `:` functional-type(operands, results)";
 }
 
@@ -3136,11 +2702,6 @@ def Tosa_IfOp : Tosa_Op<"cond_if",
     Variadic<Tosa_Tensor>:$output_list
   );
 
-  list<Availability> availability = [
-    Profile<[]>,
-    Extension<[Tosa_EXT_CONTROLFLOW]>,
-  ];
-
   let regions = (region
     SizedRegion<1>:$then_graph,
     SizedRegion<1>:$else_graph
@@ -3175,11 +2736,6 @@ def Tosa_WhileOp : Tosa_Op<"while_loop", [
     Variadic<Tosa_Tensor>:$output_list
   );
 
-  list<Availability> availability = [
-    Profile<[]>,
-    Extension<[Tosa_EXT_CONTROLFLOW]>,
-  ];
-
   let regions = (region
     SizedRegion<1>:$cond_graph,
     SizedRegion<1>:$body_graph
@@ -3210,11 +2766,6 @@ def Tosa_VariableOp : Tosa_Op<"variable", [Symbol]> {
     OptionalAttr<AnyAttr>:$initial_value
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_VARIABLE]>,
-  ];
-
   let hasCustomAssemblyFormat = 1;
 
   let assemblyFormat = [{
@@ -3247,11 +2798,6 @@ def Tosa_VariableWriteOp : Tosa_Op<"variable_write", []> {
     Tosa_Tensor:$input1
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_VARIABLE]>,
-  ];
-
   let assemblyFormat = [{
     $name attr-dict `,` $input1 `:` type($input1)
   }];
@@ -3277,11 +2823,6 @@ def Tosa_VariableReadOp : Tosa_Op<"variable_read", []> {
     Tosa_Tensor:$output1
   );
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_VARIABLE]>,
-  ];
-
   let assemblyFormat = [{
     $name attr-dict `:` type($output1)
   }];
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h b/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
index 34ccc675c8243..faff61c58a612 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
@@ -141,9 +141,8 @@ class TosaProfileCompliance {
   LogicalResult checkInvalid(Operation *op);
 
   template <typename T>
-  LogicalResult checkProfileOrExtension(
-      Operation *op, const tosa::TargetEnv &targetEnv,
-      const SmallVector<ArrayRef<T>> &specDefinedProfileSet);
+  LogicalResult checkProfileOrExtension(Operation *op,
+                                        const tosa::TargetEnv &targetEnv);
 
   bool isSameTypeInfo(TypeInfo a, TypeInfo b) {
     return a.typeID == b.typeID && a.bitWidth == b.bitWidth &&
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaShapeOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaShapeOps.td
index be4d31a4372c8..1bbfdc5776f2e 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaShapeOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaShapeOps.td
@@ -30,10 +30,6 @@ def TosaShapeOperator : NativeOpTrait<"TosaShapeOperator"> {
 
 class Tosa_ShapeOp<string mnemonic, list<Trait> traits = []>
     : Tosa_Op<mnemonic, !listconcat(traits, [TosaShapeOperator])> {
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_SHAPE]>,
-  ];
 
   let assemblyFormat =
       "operands attr-dict `:` functional-type(operands, results)";
@@ -114,11 +110,6 @@ def Tosa_ConstShapeOp : Tosa_ShapeOp<"const_shape", [ConstantLike, Pure]> {
 
   let results = (outs Tosa_Shape:$output);
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[]>,
-  ];
-
   let hasVerifier = 1;
   let hasFolder = 1;
 }
@@ -140,11 +131,6 @@ def Tosa_DimOp : Tosa_ShapeOp<"dim", [Pure]> {
 
   let results = (outs Tosa_Shape:$output);
 
-  list<Availability> availability = [
-    Profile<[Tosa_PRO_INT, Tosa_PRO_FP]>,
-    Extension<[Tosa_EXT_SHAPE, Tosa_EXT_FP8E4M3, Tosa_EXT_FP8E5M2, Tosa_EXT_BF16, Tosa_EXT_MXFP, Tosa_EXT_INT64]>,
-  ];
-
   let hasVerifier = 1;
 
   let hasFolder = 1;
diff --git a/mlir/lib/Dialect/Tosa/CMakeLists.txt b/mlir/lib/Dialect/Tosa/CMakeLists.txt
index a95906aa8352e..6404ca8fc5a56 100644
--- a/mlir/lib/Dialect/Tosa/CMakeLists.txt
+++ b/mlir/lib/Dialect/Tosa/CMakeLists.txt
@@ -14,7 +14,6 @@ add_mlir_dialect_library(MLIRTosaDialect
   MLIRTosaOpsIncGen
   MLIRTosaInterfacesIncGen
   MLIRTosaEnumsIncGen
-  MLIRTosaAvailabilityIncGen
   MLIRShardingInterfaceIncGen
 
   LINK_LIBS PUBLIC
diff --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index 8b4cea9e711ac..d8420909b2844 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -44,10 +44,8 @@ using namespace mlir::tosa;
 // Tosa dialect interface includes.
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/Tosa/IR/TosaAvailability.cpp.inc"
 #include "mlir/Dialect/Tosa/IR/TosaEnums.cpp.inc"
 #include "mlir/Dialect/Tosa/IR/TosaInterfaces.cpp.inc"
-#include "mlir/Dialect/Tosa/IR/TosaOpAvailabilityImpl.inc"
 
 namespace {
 #include "mlir/Dialect/Tosa/IR/TosaDialectBytecode.cpp.inc"
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
index 7ea64385c2415..f0c484b02f414 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
@@ -462,34 +462,10 @@ TosaProfileCompliance::getOperatorMatchedEntries(Operation *op) {
 
 template <typename T>
 LogicalResult TosaProfileCompliance::checkProfileOrExtension(
-    Operation *op, const tosa::TargetEnv &targetEnv,
-    const SmallVector<ArrayRef<T>> &specRequiredModeSet) {
-
-  // None of profile requirement is set in the specification.
-  if (specRequiredModeSet.size() == 0)
-    return success();
-
+    Operation *op, const tosa::TargetEnv &targetEnv) {
   const auto maybeOpEntries = getOperatorMatchedEntries<T>(op);
-  if (failed(maybeOpEntries)) {
-    // Operators such as control-flow and shape ops do not have an operand type
-    // restriction. When the profile compliance information of operation is not
-    // found, confirm if the target have enabled the profile required from the
-    // specification.
-    int modeCount = 0;
-    for (const auto &cands : specRequiredModeSet) {
-      if (targetEnv.allowsAnyOf(cands))
-        return success();
-      modeCount += cands.size();
-    }
-
-    op->emitOpError() << "illegal: requires"
-                      << (modeCount > 1 ? " any of " : " ") << "["
-                      << llvm::join(stringifyProfile<T>(specRequiredModeSet),
-                                    ", ")
-                      << "] but not enabled in target\n";
-
-    return failure();
-  }
+  if (failed(maybeOpEntries))
+    return success();
 
   const auto opEntries = maybeOpEntries.value();
   if (opEntries.size() == 0) {
@@ -510,22 +486,18 @@ LogicalResult TosaProfileCompliance::checkProfileOrExtension(
   const TosaSpecificationVersion targetVersion{targetEnv.getSpecVersion()};
   const auto isVersionCompatible =
       [&targetVersion](const OpComplianceInfo<T> &info) -> bool {
+    // Assume compatible if there are no versioned type constraints
+    if (info.operandTypeInfoSet.empty())
+      return true;
     const TosaSpecificationVersion complianceVersion{
         info.operandTypeInfoSet.front().second};
     return targetVersion.isBackwardsCompatibleWith(complianceVersion);
   };
 
   for (const auto &info : opEntries) {
-    // Ensure the profile compliance is compatible with the profile knowledge of
-    // the op definition.
-    assert(llvm::all_of(info.mode,
-                        [&specRequiredModeSet](const T &mode) {
-                          return llvm::is_contained(specRequiredModeSet.front(),
-                                                    mode);
-                        }) &&
-           "the profile/extension requirement of the operator should be "
-           "included in the profile compliance information");
-
+    // Type constraints exist, check if they are compatible with the current
+    // target definition, including: profile, extension and specification
+    // version
     if (isModeAllowed(info) && isVersionCompatible(info))
       return success();
   }
@@ -566,21 +538,13 @@ LogicalResult TosaProfileCompliance::checkProfileOrExtension(
 LogicalResult
 TosaProfileCompliance::checkProfile(Operation *op,
                                     const tosa::TargetEnv &targetEnv) {
-  if (auto interface = dyn_cast<tosa::QueryProfileInterface>(op))
-    return checkProfileOrExtension<Profile>(op, targetEnv,
-                                            interface.getProfiles());
-
-  return success();
+  return checkProfileOrExtension<Profile>(op, targetEnv);
 }
 
 LogicalResult
 TosaProfileCompliance::checkExtension(Operation *op,
                                       const tosa::TargetEnv &targetEnv) {
-  if (auto interface = dyn_cast<tosa::QueryExtensionInterface>(op))
-    return checkProfileOrExtension<Extension>(op, targetEnv,
-                                              interface.getExtensions());
-
-  return success();
+  return checkProfileOrExtension<Extension>(op, targetEnv);
 }
 
 LogicalResult TosaProfileCompliance::checkInvalid(Operation *op) {
@@ -653,13 +617,26 @@ SmallVector<OpComplianceInfo<T>> TosaProfileCompliance::findMatchedEntries(
   assert(compInfo.size() != 0 &&
          "profile-based compliance information is empty");
 
-  // Populate the type of profile/extension relevant operands.
+  // If there are no type constraints for the given operation, return the
+  // matched entries directly so required profile/extension information can
+  // be checked
+  SmallVector<OpComplianceInfo<T>> matchedInfos;
+  if (llvm::all_of(compInfo, [&matchedInfos](const OpComplianceInfo<T> &info) {
+        if (info.operandTypeInfoSet.empty()) {
+          matchedInfos.push_back(info);
+          return true;
+        }
+        return false;
+      }))
+    return matchedInfos;
+
+  // Get the type information of the operator we're trying to match
   ProfileInfoDepot depot(op);
   SmallVector<TypeInfo> present = depot.getInfo();
   if (present.size() == 0)
     return {};
 
-  SmallVector<OpComplianceInfo<T>> matchedInfos;
+  // Compare 'present' against known type signatures in the compliance metadata
   for (size_t i = 0; i < compInfo.size(); i++) {
     SmallVector<VersionedTypeInfo> sets = compInfo[i].operandTypeInfoSet;
     for (const auto &set : sets) {
diff --git a/mlir/test/Dialect/Tosa/availability.mlir b/mlir/test/Dialect/Tosa/availability.mlir
deleted file mode 100644
index bee180e3cbb6f..0000000000000
--- a/mlir/test/Dialect/Tosa/availability.mlir
+++ /dev/null
@@ -1,749 +0,0 @@
-//--------------------------------------------------------------------------------------------------
-// Test whether the supported profile and extension are attached to the operation properly.
-// The data type of arguments of operation are irrelevant in this test.
-//--------------------------------------------------------------------------------------------------
-
-// RUN: mlir-opt -test-tosa-op-availability %s | FileCheck %s
-
-// -----
-// CHECK-LABEL: argmax
-func.func @test_argmax(%arg0: tensor<14x19xf32>) -> tensor<14xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.argmax %arg0 {axis = 1 : i32} : (tensor<14x19xf32>) -> tensor<14xi32>
-  return %0 : tensor<14xi32>
-}
-
-// -----
-// CHECK-LABEL: avg_pool2d
-func.func @test_avg_pool2d(%arg0: tensor<1x7x7x9xf32>) -> tensor<1x7x7x9xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %output_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %0 = tosa.avg_pool2d %arg0, %input_zp, %output_zp {acc_type = f32, kernel = array<i64: 2, 2>, pad = array<i64: 0, 1, 0, 1>, stride = array<i64: 1, 1>} : (tensor<1x7x7x9xf32>, tensor<1xf32>, tensor<1xf32>) -> tensor<1x7x7x9xf32>
-  return %0 : tensor<1x7x7x9xf32>
-}
-
-// -----
-// CHECK-LABEL: avg_pool2d_adaptive
-func.func @test_avg_pool2d_adaptive(%arg0: tensor<1x7x7x9xf32>) -> tensor<1x7x7x9xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %output_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %kernel = tosa.const_shape {values = dense<[2, 2]> : tensor<2xindex>} : () -> !tosa.shape<2>
-  %stride = tosa.const_shape {values = dense<[1, 1]> : tensor<2xindex>} : () -> !tosa.shape<2>
-  %pad = tosa.const_shape {values = dense<[0, 1, 0, 1]> : tensor<4xindex>} : () -> !tosa.shape<4>
-  %0 = tosa.avg_pool2d_adaptive %arg0, %input_zp, %output_zp, %kernel, %stride, %pad {acc_type = f32} : (tensor<1x7x7x9xf32>, tensor<1xf32>, tensor<1xf32>, !tosa.shape<2>, !tosa.shape<2>, !tosa.shape<4>) -> tensor<1x7x7x9xf32>
-  return %0 : tensor<1x7x7x9xf32>
-}
-
-// -----
-// CHECK-LABEL: conv2d
-func.func @test_conv2d(%arg0: tensor<1x4x4x4xf32>, %arg1: tensor<8x1x1x4xf32>, %arg2: tensor<8xf32>) -> tensor<1x4x4x8xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %weight_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %0 = tosa.conv2d %arg0, %arg1, %arg2, %input_zp, %weight_zp {acc_type = f32, dilation = array<i64: 1, 1>, pad = array<i64: 0, 0, 0, 0>, stride = array<i64: 1, 1>, local_bound = true} : (tensor<1x4x4x4xf32>, tensor<8x1x1x4xf32>, tensor<8xf32>, tensor<1xf32>, tensor<1xf32>) -> tensor<1x4x4x8xf32>
-  return %0 : tensor<1x4x4x8xf32>
-}
-
-// -----
-// CHECK-LABEL: conv3d
-func.func @test_conv3d(%arg0: tensor<1x4x8x21x17xf32>, %arg1: tensor<34x1x1x1x17xf32>, %arg2: tensor<34xf32>) -> tensor<1x4x8x21x34xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %weight_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %0 = tosa.conv3d %arg0, %arg1, %arg2, %input_zp, %weight_zp {acc_type = f32, dilation = array<i64: 1, 1, 1>, pad = array<i64: 0, 0, 0, 0, 0, 0>, stride = array<i64: 1, 1, 1>} : (tensor<1x4x8x21x17xf32>, tensor<34x1x1x1x17xf32>, tensor<34xf32>, tensor<1xf32>, tensor<1xf32>) -> tensor<1x4x8x21x34xf32>
-  return %0 : tensor<1x4x8x21x34xf32>
-}
-
-// -----
-// CHECK-LABEL: depthwise_conv2d
-func.func @test_depthwise_conv2d(%arg0: tensor<1x4x4x4xf32>, %arg1: tensor<1x1x4x2xf32>, %arg2: tensor<8xf32>) -> tensor<1x4x4x8xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %weight_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %0 = tosa.depthwise_conv2d %arg0, %arg1, %arg2, %input_zp, %weight_zp {acc_type = f32, dilation = array<i64: 1, 1>, pad = array<i64: 0, 0, 0, 0>, stride = array<i64: 1, 1>} : (tensor<1x4x4x4xf32>, tensor<1x1x4x2xf32>, tensor<8xf32>, tensor<1xf32>, tensor<1xf32>) -> tensor<1x4x4x8xf32>
-  return %0 : tensor<1x4x4x8xf32>
-}
-
-// -----
-// CHECK-LABEL: fft2d
-func.func @test_fft2d(%arg0: tensor<1x4x8xf32>, %arg1: tensor<1x4x8xf32>) -> (tensor<1x4x8xf32>, tensor<1x4x8xf32>) {
-  // CHECK: profiles: [ ]
-  // CHECK: extensions: [ [fft] ]
-  %0, %1 = tosa.fft2d %arg0, %arg1 {inverse = false} : (tensor<1x4x8xf32>, tensor<1x4x8xf32>) -> (tensor<1x4x8xf32>, tensor<1x4x8xf32>)
-  return %0, %1 : tensor<1x4x8xf32>, tensor<1x4x8xf32>
-}
-
-// -----
-// CHECK-LABEL: matmul
-func.func @test_matmul(%arg0: tensor<1x14x19xf32>, %arg1: tensor<1x19x28xf32>, %a_zp: tensor<1xf32>, %b_zp: tensor<1xf32>) -> tensor<1x14x28xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16] ]
-  %0 = tosa.matmul %arg0, %arg1, %a_zp, %b_zp : (tensor<1x14x19xf32>, tensor<1x19x28xf32>, tensor<1xf32>, tensor<1xf32>)  -> tensor<1x14x28xf32>
-  return %0 : tensor<1x14x28xf32>
-}
-
-// -----
-// CHECK-LABEL: max_pool2d_f32
-func.func @test_max_pool2d_f32(%arg0: tensor<1x32x32x8xf32>) -> tensor<1x32x32x8xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16] ]
-  %0 = tosa.max_pool2d %arg0 {kernel = array<i64: 1, 1>, pad = array<i64: 0, 0, 0, 0>, stride = array<i64: 1, 1>} : (tensor<1x32x32x8xf32>) -> tensor<1x32x32x8xf32>
-  return %0 : tensor<1x32x32x8xf32>
-}
-
-// -----
-// CHECK-LABEL: rfft2d
-func.func @test_rfft2d(%arg0: tensor<13x8x16xf32>) -> (tensor<13x8x9xf32>, tensor<13x8x9xf32>) {
-  // CHECK: profiles: [ ]
-  // CHECK: extensions: [ [fft] ]
-  %0, %1 = tosa.rfft2d %arg0 : (tensor<13x8x16xf32>) -> (tensor<13x8x9xf32>, tensor<13x8x9xf32>)
-  return %0, %1 : tensor<13x8x9xf32>, tensor<13x8x9xf32>
-}
-
-// -----
-// CHECK-LABEL: transpose_conv2d
-func.func @test_transpose_conv2d(%arg0: tensor<1x32x32x8xf32>, %arg1: tensor<16x1x1x8xf32>, %arg2: tensor<16xf32>) -> tensor<1x32x32x16xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %weight_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %0 = tosa.transpose_conv2d %arg0, %arg1, %arg2, %input_zp, %weight_zp {acc_type = f32, out_pad = array<i64: 0, 0, 0, 0>, out_shape = array<i64: 1, 32, 32, 16>, stride = array<i64: 1, 1>} : (tensor<1x32x32x8xf32>, tensor<16x1x1x8xf32>, tensor<16xf32>, tensor<1xf32>, tensor<1xf32>) -> tensor<1x32x32x16xf32>
-  return %0 : tensor<1x32x32x16xf32>
-}
-
-// -----
-// CHECK-LABEL: clamp
-func.func @test_clamp(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, bf16] ]
-  %0 = tosa.clamp %arg0 {min_val = -3.40282347E+38 : f32, max_val = 3.40282347E+38 : f32} : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: sigmoid
-func.func @test_sigmoid(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.sigmoid %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: tanh
-func.func @test_tanh(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.tanh %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-// -----
-// CHECK-LABEL: erf
-func.func @test_erf(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.erf %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: add
-func.func @test_add(%arg0: tensor<13x21x1xf32>, %arg1: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.add %arg0, %arg1 : (tensor<13x21x1xf32>, tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: arithmetic_right_shift
-func.func @test_arithmetic_right_shift(%arg0: tensor<13x21x1xf32>, %arg1: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.arithmetic_right_shift %arg0, %arg1 {round = false} : (tensor<13x21x1xf32>, tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: bitwise_and
-func.func @test_bitwise_and(%arg0: tensor<13x21x3xi32>, %arg1: tensor<13x21x1xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.bitwise_and %arg0, %arg1 : (tensor<13x21x3xi32>, tensor<13x21x1xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: bitwise_or
-func.func @test_bitwise_or(%arg0: tensor<13x21x3xi32>, %arg1: tensor<13x1x3xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.bitwise_or %arg0, %arg1 : (tensor<13x21x3xi32>, tensor<13x1x3xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: bitwise_xor
-func.func @test_bitwise_xor(%arg0: tensor<13x21x1xi32>, %arg1: tensor<13x21x3xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.bitwise_xor %arg0, %arg1 : (tensor<13x21x1xi32>, tensor<13x21x3xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: intdiv
-func.func @test_intdiv(%arg0: tensor<13x21x1xi32>, %arg1: tensor<13x21x3xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.intdiv %arg0, %arg1 : (tensor<13x21x1xi32>, tensor<13x21x3xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: logical_and
-func.func @test_logical_and(%arg0: tensor<13x21x3xi1>, %arg1: tensor<13x21x1xi1>) -> tensor<13x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.logical_and %arg0, %arg1 : (tensor<13x21x3xi1>, tensor<13x21x1xi1>) -> tensor<13x21x3xi1>
-  return %0 : tensor<13x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: logical_left_shift
-func.func @test_logical_left_shift(%arg0: tensor<13x21x3xi32>, %arg1: tensor<13x21x1xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.logical_left_shift %arg0, %arg1 : (tensor<13x21x3xi32>, tensor<13x21x1xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: logical_right_shift
-func.func @test_logical_right_shift(%arg0: tensor<13x21x3xi32>, %arg1: tensor<13x21x1xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.logical_right_shift %arg0, %arg1 : (tensor<13x21x3xi32>, tensor<13x21x1xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: logical_or
-func.func @test_logical_or(%arg0: tensor<13x1x3xi1>, %arg1: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.logical_or %arg0, %arg1 : (tensor<13x1x3xi1>, tensor<13x21x3xi1>) -> tensor<13x21x3xi1>
-  return %0 : tensor<13x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: logical_xor
-func.func @test_logical_xor(%arg0: tensor<13x1x3xi1>, %arg1: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.logical_xor %arg0, %arg1 : (tensor<13x1x3xi1>, tensor<13x21x3xi1>) -> tensor<13x21x3xi1>
-  return %0 : tensor<13x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: maximum
-func.func @test_max(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x21x1xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.maximum %arg0, %arg1 : (tensor<13x21x3xf32>, tensor<13x21x1xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: minimum
-func.func @test_min(%arg0: tensor<13x21x3xf32>, %arg1: tensor<1x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.minimum %arg0, %arg1 : (tensor<13x21x3xf32>, tensor<1x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: mul
-func.func @test_mul(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x1x3xf32>) -> tensor<13x21x3xf32> {
-  %shift = "tosa.const"() <{values = dense<0> : tensor<1xi8>}> : () -> tensor<1xi8>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.mul %arg0, %arg1, %shift : (tensor<13x21x3xf32>, tensor<13x1x3xf32>, tensor<1xi8>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: pow
-func.func @test_pow(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x21x1xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.pow %arg0, %arg1 : (tensor<13x21x3xf32>, tensor<13x21x1xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: sub
-func.func @test_sub(%arg0: tensor<1x21x3xf32>, %arg1: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.sub %arg0, %arg1 : (tensor<1x21x3xf32>, tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: table
-func.func @test_table(%arg0: tensor<64xi32>, %arg1: tensor<513x!quant.uniform<i16:f32, 1.0:0>>) -> tensor<64x!quant.uniform<i16:f32, 1.0:0>> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int16] ]
-  %0 = tosa.table %arg0, %arg1 : (tensor<64xi32>, tensor<513x!quant.uniform<i16:f32, 1.000000e+00>>) -> tensor<64x!quant.uniform<i16:f32, 1.000000e+00>>
-  return %0 : tensor<64x!quant.uniform<i16:f32, 1.0:0>>
-}
-
-// -----
-// CHECK-LABEL: abs
-func.func @test_abs(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.abs %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: bitwise_not
-func.func @test_bitwise_not(%arg0: tensor<13x21x1xi32>) -> tensor<13x21x1xi32> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.bitwise_not %arg0 : (tensor<13x21x1xi32>) -> tensor<13x21x1xi32>
-  return %0 : tensor<13x21x1xi32>
-}
-
-// -----
-// CHECK-LABEL: ceil
-func.func @test_ceil(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.ceil %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: clz
-func.func @test_clz(%arg0: tensor<13x21x3xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int] ]
-  // CHECK: extensions: [ [int64] ]
-  %0 = tosa.clz %arg0 : (tensor<13x21x3xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: cos
-func.func @test_cos(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.cos %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: exp
-func.func @test_exp(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.exp %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: floor
-func.func @test_floor(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.floor %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: log
-func.func @test_log(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.log %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: logical_not
-func.func @test_logical_not(%arg0: tensor<1x21x3xi1>) -> tensor<1x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.logical_not %arg0 : (tensor<1x21x3xi1>) -> tensor<1x21x3xi1>
-  return %0 : tensor<1x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: negate
-func.func @test_negate(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %input_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %output_zp = "tosa.const"() <{values = dense<0.0> : tensor<1xf32>}> : () -> tensor<1xf32>
-  %0 = tosa.negate %arg0, %input_zp, %output_zp : (tensor<13x21x3xf32>, tensor<1xf32>, tensor<1xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: reciprocal
-func.func @test_reciprocal(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.reciprocal %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: rsqrt
-func.func @test_rsqrt(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.rsqrt %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: sin
-func.func @test_sin(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.sin %arg0 : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: select
-func.func @test_select(%arg0: tensor<1x1x1xi1>, %arg1: tensor<13x21x3xf32>, %arg2: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.select %arg0, %arg1, %arg2 : (tensor<1x1x1xi1>, tensor<13x21x3xf32>, tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: equal
-func.func @test_equal(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x1x3xf32>) -> tensor<13x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.equal %arg0, %arg1 : (tensor<13x21x3xf32>, tensor<13x1x3xf32>) -> tensor<13x21x3xi1>
-  return %0 : tensor<13x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: greater
-func.func @test_greater(%arg0: tensor<13x21x1xf32>, %arg1: tensor<13x21x3xf32>) -> tensor<13x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.greater %arg0, %arg1 : (tensor<13x21x1xf32>, tensor<13x21x3xf32>) -> tensor<13x21x3xi1>
-  return %0 : tensor<13x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: greater_equal
-func.func @test_greater_equal(%arg0: tensor<13x1x3xf32>, %arg1: tensor<13x21x3xf32>) -> tensor<13x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.greater_equal %arg0, %arg1 : (tensor<13x1x3xf32>, tensor<13x21x3xf32>) -> tensor<13x21x3xi1>
-  return %0 : tensor<13x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: reduce_all
-func.func @test_reduce_all(%arg0: tensor<13x21x3xi1>) -> tensor<1x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.reduce_all %arg0 {axis = 0 : i32} : (tensor<13x21x3xi1>) -> tensor<1x21x3xi1>
-  return %0 : tensor<1x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: reduce_any
-func.func @test_reduce_any(%arg0: tensor<13x21x3xi1>) -> tensor<1x21x3xi1> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.reduce_any %arg0 {axis = 0 : i32} : (tensor<13x21x3xi1>) -> tensor<1x21x3xi1>
-  return %0 : tensor<1x21x3xi1>
-}
-
-// -----
-// CHECK-LABEL: reduce_max
-func.func @test_reduce_max(%arg0: tensor<13x21x3xf32>) -> tensor<1x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.reduce_max %arg0 {axis = 0 : i32} : (tensor<13x21x3xf32>) -> tensor<1x21x3xf32>
-  return %0 : tensor<1x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: reduce_min
-func.func @test_reduce_min(%arg0: tensor<13x21x3xf32>) -> tensor<1x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.reduce_min %arg0 {axis = 0 : i32} : (tensor<13x21x3xf32>) -> tensor<1x21x3xf32>
-  return %0 : tensor<1x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: reduce_product
-func.func @test_reduce_product(%arg0: tensor<13x21x3xf32>) -> tensor<1x21x3xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16] ]
-  %0 = tosa.reduce_product %arg0 {axis = 0 : i32} : (tensor<13x21x3xf32>) -> tensor<1x21x3xf32>
-  return %0 : tensor<1x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: reduce_sum
-func.func @test_reduce_sum(%arg0: tensor<13x21x3xf32>) -> tensor<1x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [bf16, int64] ]
-  %0 = tosa.reduce_sum %arg0 {axis = 0 : i32} : (tensor<13x21x3xf32>) -> tensor<1x21x3xf32>
-  return %0 : 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, int16, int64, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-  %0 = tosa.concat %arg0, %arg1 {axis = 0 : i32} : (tensor<13x21x3xf32>, tensor<13x21x3xf32>) -> tensor<26x21x3xf32>
-  return %0 : tensor<26x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: pad
-func.func @test_pad(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  %padding = tosa.const_shape {values = dense<0> : tensor<6xindex>} : () -> !tosa.shape<6>
-  %pad_const = "tosa.const"() {values = dense<3.14> : tensor<1xf32>} : () -> tensor<1xf32>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.pad %arg0, %padding, %pad_const : (tensor<13x21x3xf32>, !tosa.shape<6>, tensor<1xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: reshape
-func.func @test_reshape(%arg0: tensor<13x21x3xf32>) -> tensor<1x819xf32> {
-  %1 = tosa.const_shape {values = dense<[1, 819]> : tensor<2xindex>} : () -> !tosa.shape<2>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-  %0 = tosa.reshape %arg0, %1 : (tensor<13x21x3xf32>, !tosa.shape<2>) -> tensor<1x819xf32>
-  return %0 : tensor<1x819xf32>
-}
-
-// -----
-// CHECK-LABEL: reverse
-func.func @test_reverse(%arg0: tensor<13x21x3xf32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.reverse %arg0 {axis = 0 : i32} : (tensor<13x21x3xf32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: slice
-func.func @test_slice(%arg0: tensor<13x21x3xf32>) -> tensor<4x11x1xf32> {
-  %size = tosa.const_shape {values = dense<[4, 11, 1]> : tensor<3xindex>} : () -> !tosa.shape<3>
-  %start = tosa.const_shape {values = dense<[6, 8, 0]> : tensor<3xindex>} : () -> !tosa.shape<3>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %2 = tosa.slice %arg0, %start, %size : (tensor<13x21x3xf32>, !tosa.shape<3>, !tosa.shape<3>) -> tensor<4x11x1xf32>
-  return %2 : tensor<4x11x1xf32>
-}
-
-// -----
-// CHECK-LABEL: tile
-func.func @test_tile(%arg0: tensor<13x21x3xf32>) -> tensor<39x21x6xf32> {
-  %cst = tosa.const_shape { values = dense<[3, 1, 2]> : tensor<3xindex> } : () -> !tosa.shape<3>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.tile %arg0, %cst: (tensor<13x21x3xf32>, !tosa.shape<3>) -> tensor<39x21x6xf32>
-  return %0 : tensor<39x21x6xf32>
-}
-
-// -----
-// CHECK-LABEL: transpose
-func.func @test_transpose(%arg0: tensor<13x21x3xf32>) -> tensor<3x13x21xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %1 = tosa.transpose %arg0 {perms = array<i32: 2, 0, 1>}: (tensor<13x21x3xf32>) -> tensor<3x13x21xf32>
-  return %1 : tensor<3x13x21xf32>
-}
-
-// -----
-// CHECK-LABEL: gather
-func.func @test_gather(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x26xi32>) -> tensor<13x26x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.gather %arg0, %arg1 : (tensor<13x21x3xf32>, tensor<13x26xi32>) -> tensor<13x26x3xf32>
-  return %0 : tensor<13x26x3xf32>
-}
-
-// -----
-// CHECK-LABEL: test_row_gather
-func.func @test_row_gather(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x26xi32>) -> tensor<13x52x3xf32> {
-  %row_count = "tosa.const"() {values = dense<2> : tensor<1xi32>} : () -> tensor<1xi32>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int16, int64, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-  %0 = tosa.row_gather %arg0, %arg1, %row_count : (tensor<13x21x3xf32>, tensor<13x26xi32>, tensor<1xi32>) -> tensor<13x52x3xf32>
-  return %0 : tensor<13x52x3xf32>
-}
-
-// -----
-// CHECK-LABEL: row_gather_block_scaled
-func.func @test_row_gather_block_scaled(%arg0: tensor<13x21x32xf4E2M1FN>, %arg1: tensor<13x21x1xf8E8M0FNU>, %arg2: tensor<13x26xi32>) -> (tensor<13x52x32xf4E2M1FN>, tensor<13x52x1xf8E8M0FNU>) {
-  %row_count = "tosa.const"() {values = dense<2> : tensor<1xi32>} : () -> tensor<1xi32>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, mxfp, int64] ]
-  %0:2 = tosa.row_gather_block_scaled %arg0, %arg1, %arg2, %row_count {block_size = #tosa.block_size<BLOCK_SIZE_32>} : (tensor<13x21x32xf4E2M1FN>, tensor<13x21x1xf8E8M0FNU>, tensor<13x26xi32>, tensor<1xi32>) -> (tensor<13x52x32xf4E2M1FN>, tensor<13x52x1xf8E8M0FNU>)
-  return %0#0, %0#1 : tensor<13x52x32xf4E2M1FN>, tensor<13x52x1xf8E8M0FNU>
-}
-
-// -----
-// CHECK-LABEL: scatter
-func.func @test_scatter(%arg0: tensor<13x28x3xf32>, %arg1: tensor<13x26xi32>, %arg2: tensor<13x26x3xf32>) -> tensor<13x28x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.scatter %arg0, %arg1, %arg2 : (tensor<13x28x3xf32>, tensor<13x26xi32>, tensor<13x26x3xf32>) -> tensor<13x28x3xf32>
-  return %0 : tensor<13x28x3xf32>
-}
-
-// -----
-// CHECK-LABEL: resize
-func.func @test_resize(%arg0: tensor<1x32x32x8xf32>) -> tensor<1x64x64x8xf32> {
-  %scale = tosa.const_shape { values = dense<[4, 2, 4, 2]> : tensor<4xindex> } : () -> !tosa.shape<4>
-  %offset = tosa.const_shape { values = dense<[-1, -1]> : tensor<2xindex> } : () -> !tosa.shape<2>
-  %border = tosa.const_shape { values = dense<[1, 1]> : tensor<2xindex> } : () -> !tosa.shape<2>
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-  %1 = tosa.resize %arg0, %scale, %offset, %border {mode = BILINEAR} : (tensor<1x32x32x8xf32>, !tosa.shape<4>, !tosa.shape<2>, !tosa.shape<2>) -> tensor<1x64x64x8xf32>
-  return %1 : tensor<1x64x64x8xf32>
-}
-
-// -----
-// CHECK-LABEL: test_cast
-func.func @test_cast(%arg0: tensor<13x21x3xi32>) -> tensor<13x21x3xf32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16, int64, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-  %0 = tosa.cast %arg0 : (tensor<13x21x3xi32>) -> tensor<13x21x3xf32>
-  return %0 : tensor<13x21x3xf32>
-}
-
-// -----
-// CHECK-LABEL: test_rescale
-func.func @test_rescale(%arg0: tensor<13x21x3x!quant.uniform<u8:f32, 0.015655439347028732:127>>, %multiplier : tensor<1xi32>, %shift : tensor<1xi8>) -> tensor<13x21x3x!quant.uniform<i8:f32, 0.015655439347028732:-1>> {
-  %input_zp = "tosa.const"() {values = dense<127> : tensor<1xi8>} : () -> tensor<1xi8>
-  %output_zp = "tosa.const"() {values = dense<-1> : tensor<1xi8>} : () -> tensor<1xi8>
-  // CHECK: tosa.rescale profiles: [ [pro_int] ]
-  // CHECK: tosa.rescale extensions: [ [int16] ]
-  %0 = tosa.rescale %arg0, %multiplier, %shift, %input_zp, %output_zp {rounding_mode = SINGLE_ROUND, scale32 = true, per_channel = false, input_unsigned = false, output_unsigned = false} : (tensor<13x21x3x!quant.uniform<u8:f32, 0.015655439347028732:127>>, tensor<1xi32>, tensor<1xi8>, tensor<1xi8>, tensor<1xi8>) -> tensor<13x21x3x!quant.uniform<i8:f32, 0.015655439347028732:-1>>
-  return %0 : tensor<13x21x3x!quant.uniform<i8:f32, 0.015655439347028732:-1>>
-}
-
-// -----
-// CHECK-LABEL: test_const
-func.func @test_const(%arg0 : index) -> tensor<4xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16, mxfp, int64, mx_common, mx_fp4e2m1, mx_fp6e2m3, mx_fp6e3m2, mx_fp8e4m3, mx_fp8e5m2, mx_int8] ]
-    %0 = "tosa.const"() {values = dense<[3, 0, 1, 2]> : tensor<4xi32>} : () -> tensor<4xi32>
-    return %0 : tensor<4xi32>
-}
-
-// -----
-// CHECK-LABEL: identity
-func.func @test_identity(%arg0: tensor<13x21x3xi32>) -> tensor<13x21x3xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16, int64] ]
-  %0 = tosa.identity %arg0 : (tensor<13x21x3xi32>) -> tensor<13x21x3xi32>
-  return %0 : tensor<13x21x3xi32>
-}
-
-// -----
-// CHECK-LABEL: cond_if
-func.func @test_cond_if(%arg0: tensor<f32>, %arg1: tensor<f32>, %arg2: tensor<i1>) -> tensor<f32> {
-  // CHECK: tosa.cond_if profiles: [ ]
-  // CHECK: tosa.cond_if extensions: [ [controlflow] ]
-  %0 = tosa.cond_if %arg2 : tensor<i1> -> tensor<f32> {
-    %1 = tosa.add %arg0, %arg1 : (tensor<f32>, tensor<f32>) -> tensor<f32>
-    tosa.yield %1 : tensor<f32>
-  } else {
-    %1 = tosa.sub %arg0, %arg1 : (tensor<f32>, tensor<f32>) -> tensor<f32>
-    tosa.yield %1 : tensor<f32>
-  }
-  return %0 : tensor<f32>
-}
-
-// -----
-// CHECK-LABEL: while_loop
-func.func @test_while_loop(%arg0: tensor<10xi32>, %arg1: tensor<i32>) {
-  %0 = "tosa.const"() {values = dense<0> : tensor<i32>} : () -> tensor<i32>
-  // CHECK: profiles: [ ]
-  // CHECK: extensions: [ [controlflow] ]
-  %1:3 = tosa.while_loop (%arg2 = %0, %arg3 = %0, %arg4 = %arg0) : (tensor<i32>, tensor<i32>, tensor<10xi32>) -> (tensor<i32>, tensor<i32>, tensor<10xi32>) {
-    %2 = tosa.greater_equal %arg3, %arg1 : (tensor<i32>, tensor<i32>) -> tensor<i1>
-    %3 = tosa.logical_not %2 : (tensor<i1>) -> tensor<i1>
-    tosa.yield %3 : tensor<i1>
-  } do {
-  ^bb0(%arg2: tensor<i32>, %arg3: tensor<i32>, %arg4: tensor<10xi32>):
-    %2 = "tosa.const"() {values = dense<1> : tensor<i32>} : () -> tensor<i32>
-    %3 = tosa.add %arg3, %2 : (tensor<i32>, tensor<i32>) -> tensor<i32>
-    %7 = tosa.const_shape {values = dense<[1]> : tensor<1xindex>} : () -> !tosa.shape<1>
-    %4 = tosa.reshape %2, %7 : (tensor<i32>, !tosa.shape<1>) -> tensor<1xi32>
-    %5 = tosa.add %arg4, %4 : (tensor<10xi32>, tensor<1xi32>) -> tensor<10xi32>
-    %6 = tosa.add %arg2, %2 : (tensor<i32>, tensor<i32>) -> tensor<i32>
-    tosa.yield %6, %3, %5 : tensor<i32>, tensor<i32>, tensor<10xi32>
-  }
-  return
-}
-
-// -----
-// CHECK-LABEL: custom
-func.func @test_custom(%arg0: tensor<10xi32>) -> tensor<10xi32> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %0 = tosa.custom %arg0 {operator_name="custom_test", domain_name="tosa.mlir_test", implementation_attrs="" } : (tensor<10xi32>) -> (tensor<10xi32>)
-  return %0 : tensor<10xi32>
-}
-
-// -----
-// CHECK-LABEL: const_shape
-func.func @test_const_shape() -> !tosa.shape<4> {
-  // CHECK: profiles: [ [pro_int, pro_fp] ]
-  // CHECK: extensions: [ ]
-  %cst = tosa.const_shape {values = dense<1> : tensor<4xindex>} : () -> !tosa.shape<4>
-  return %cst : !tosa.shape<4>
-}
-
-// -----
-// CHECK-LABEL: test_cast_from_block_scaled
-func.func @test_cast_from_block_scaled(%arg0: tensor<4x32xf4E2M1FN>, %arg1: tensor<4x1xf8E8M0FNU>) -> tensor<4x32xf32> {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16, mxfp] ]
-  %0 = tosa.cast_from_block_scaled %arg0, %arg1 {block_size = #tosa.block_size<BLOCK_SIZE_32> : i32} : (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>) -> tensor<4x32xf32>
-  return %0 : tensor<4x32xf32>
-}
-
-// -----
-// CHECK-LABEL: test_cast_to_block_scaled
-func.func @test_cast_to_block_scaled(%arg0: tensor<4x32xf32>) -> (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>) {
-  // CHECK: profiles: [ [pro_fp] ]
-  // CHECK: extensions: [ [bf16, mxfp] ]
-  %0:2 = tosa.cast_to_block_scaled %arg0 {block_size = BLOCK_SIZE_32, stochastic_round = false} : (tensor<4x32xf32>) -> (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>)
-  return %0#0, %0#1 : tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>
-}
diff --git a/mlir/test/Dialect/Tosa/invalid_extension.mlir b/mlir/test/Dialect/Tosa/invalid_extension.mlir
index b7b0e19ba04ce..991d105ceadd1 100644
--- a/mlir/test/Dialect/Tosa/invalid_extension.mlir
+++ b/mlir/test/Dialect/Tosa/invalid_extension.mlir
@@ -449,7 +449,7 @@ func.func @test_cast_bf16_i32(%arg0: tensor<13x21x3xbf16>) -> tensor<13x21x3xi32
 
 // -----
 func.func @test_cond_if(%arg0: tensor<f32>, %arg1: tensor<f32>, %arg2: tensor<i1>) -> tensor<f32> {
-  // expected-error at +1 {{'tosa.cond_if' op illegal: requires [controlflow] but not enabled in target}}
+  // expected-error at +1 {{'tosa.cond_if' op illegal: requires any of [controlflow] profiles/extensions to be specified in the target environment}}
   %0 = tosa.cond_if %arg2 : tensor<i1> -> tensor<f32> {
     %1 = tosa.add %arg0, %arg1 : (tensor<f32>, tensor<f32>) -> tensor<f32>
     tosa.yield %1 : tensor<f32>
@@ -463,7 +463,7 @@ func.func @test_cond_if(%arg0: tensor<f32>, %arg1: tensor<f32>, %arg2: tensor<i1
 // -----
 func.func @test_while_loop(%arg0: tensor<10xi32>, %arg1: tensor<i32>) {
   %0 = "tosa.const"() {values = dense<0> : tensor<i32>} : () -> tensor<i32>
-  // expected-error at +1 {{'tosa.while_loop' op illegal: requires [controlflow] but not enabled in target}}
+  // expected-error at +1 {{'tosa.while_loop' op illegal: requires any of [controlflow] profiles/extensions to be specified in the target environment}}
   %1:3 = tosa.while_loop (%arg2 = %0, %arg3 = %0, %arg4 = %arg0) : (tensor<i32>, tensor<i32>, tensor<10xi32>) -> (tensor<i32>, tensor<i32>, tensor<10xi32>) {
     %2 = tosa.greater_equal %arg3, %arg1 : (tensor<i32>, tensor<i32>) -> tensor<i1>
     %3 = tosa.logical_not %2 : (tensor<i1>) -> tensor<i1>
@@ -680,7 +680,7 @@ func.func @test_avg_pool2d_adaptive_missing_bf16_extension(%arg0: tensor<1x7x7x9
 func.func @test_mul_shape() {
   %a = tosa.const_shape {values = dense<[1, 2, 3, 4]> : tensor<4xindex>} : () -> !tosa.shape<4>
   %b = tosa.const_shape {values = dense<[5, 6, 7, 8]> : tensor<4xindex>} : () -> !tosa.shape<4>
-  // expected-error at +1 {{'tosa.mul_shape' op illegal: requires [shape] but not enabled in target}}
+  // expected-error at +1 {{'tosa.mul_shape' op illegal: requires any of [shape] profiles/extensions to be specified in the target environment}}
   %c = tosa.mul_shape %a, %b : (!tosa.shape<4>, !tosa.shape<4>) -> !tosa.shape<4>
   return
 }
@@ -690,7 +690,7 @@ func.func @test_mul_shape() {
 func.func @test_max_shape() {
   %a = tosa.const_shape {values = dense<[1, 2, 3, 4]> : tensor<4xindex>} : () -> !tosa.shape<4>
   %b = tosa.const_shape {values = dense<[5, 6, 7, 8]> : tensor<4xindex>} : () -> !tosa.shape<4>
-  // expected-error at +1 {{'tosa.max_shape' op illegal: requires [shape] but not enabled in target}}
+  // expected-error at +1 {{'tosa.max_shape' op illegal: requires any of [shape] profiles/extensions to be specified in the target environment}}
   %c = tosa.max_shape %a, %b : (!tosa.shape<4>, !tosa.shape<4>) -> !tosa.shape<4>
   return
 }
@@ -700,7 +700,39 @@ func.func @test_max_shape() {
 func.func @test_min_shape() {
   %a = tosa.const_shape {values = dense<[1, 2, 3, 4]> : tensor<4xindex>} : () -> !tosa.shape<4>
   %b = tosa.const_shape {values = dense<[5, 6, 7, 8]> : tensor<4xindex>} : () -> !tosa.shape<4>
-  // expected-error at +1 {{'tosa.min_shape' op illegal: requires [shape] but not enabled in target}}
+  // expected-error at +1 {{'tosa.min_shape' op illegal: requires any of [shape] profiles/extensions to be specified in the target environment}}
   %c = tosa.min_shape %a, %b : (!tosa.shape<4>, !tosa.shape<4>) -> !tosa.shape<4>
   return
 }
+
+// -----
+
+func.func @test_conv2d_block_scaled(%arg0: tensor<*xf4E2M1FN>, %arg1: tensor<*xf8E8M0FNU>, %arg2: tensor<*xf4E2M1FN>, %arg3: tensor<*xf8E8M0FNU>, %arg4: tensor<*xf32>) -> tensor<*xf32> {
+  %0 = tosa.const_shape {values = dense<[0, 0, 0, 0]> : tensor<4xindex>} : () -> !tosa.shape<4>
+  %1 = tosa.const_shape {values = dense<[1, 1]> : tensor<2xindex>} : () -> !tosa.shape<2>
+  %2 = tosa.const_shape {values = dense<[1, 1]> : tensor<2xindex>} : () -> !tosa.shape<2>
+  // expected-error at +1 {{'tosa.conv2d_block_scaled' op illegal: requires any of [mxfp_conv] profiles/extensions to be specified in the target environment}}
+  %3 = tosa.conv2d_block_scaled %arg0, %arg1, %arg2, %arg3, %arg4, %0, %1, %2 {block_size = BLOCK_SIZE_32} : (tensor<*xf4E2M1FN>, tensor<*xf8E8M0FNU>, tensor<*xf4E2M1FN>, tensor<*xf8E8M0FNU>, tensor<*xf32>, !tosa.shape<4>, !tosa.shape<2>, !tosa.shape<2>) -> tensor<*xf32>
+  return %3 : tensor<*xf32>
+}
+
+// -----
+func.func @test_matmul_t_block_scaled(%arg0: tensor<4x8x32xf6E3M2FN>, %arg1: tensor<4x8x1xf8E8M0FNU>, %arg2: tensor<4x16x32xf6E3M2FN>, %arg3: tensor<4x16x1xf8E8M0FNU>) -> tensor<4x8x16xf32> {
+  // expected-error at +1 {{'tosa.matmul_t_block_scaled' op illegal: requires any of [mxfp] profiles/extensions to be specified in the target environment}}
+  %0 = tosa.matmul_t_block_scaled %arg0, %arg1, %arg2, %arg3 {block_size = #tosa.block_size<BLOCK_SIZE_32>} : (tensor<4x8x32xf6E3M2FN>, tensor<4x8x1xf8E8M0FNU>, tensor<4x16x32xf6E3M2FN>, tensor<4x16x1xf8E8M0FNU>) -> tensor<4x8x16xf32>
+  return %0 : tensor<4x8x16xf32>
+}
+
+// -----
+func.func @test_cast_from_block_scaled(%arg0: tensor<4x32xf4E2M1FN>, %arg1: tensor<4x1xf8E8M0FNU>) -> tensor<4x32xf32> {
+  // expected-error at +1 {{'tosa.cast_from_block_scaled' op illegal: requires any of [mxfp] profiles/extensions to be specified in the target environment}}
+  %0 = tosa.cast_from_block_scaled %arg0, %arg1 {block_size = #tosa.block_size<BLOCK_SIZE_32> : i32} : (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>) -> tensor<4x32xf32>
+  return %0 : tensor<4x32xf32>
+}
+
+// -----
+func.func @test_cast_to_block_scaled(%arg0: tensor<4x32xf32>) -> (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>) {
+  // expected-error at +1 {{'tosa.cast_to_block_scaled' op illegal: requires any of [mxfp] profiles/extensions to be specified in the target environment}}
+  %0:2 = tosa.cast_to_block_scaled %arg0 {block_size = #tosa.block_size<BLOCK_SIZE_32>} : (tensor<4x32xf32>) -> (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>)
+  return %0#0, %0#1 : tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>
+}
diff --git a/mlir/test/Dialect/Tosa/profile_all_unsupported.mlir b/mlir/test/Dialect/Tosa/profile_all_unsupported.mlir
index caa547a0830e7..1c2899151cf4e 100644
--- a/mlir/test/Dialect/Tosa/profile_all_unsupported.mlir
+++ b/mlir/test/Dialect/Tosa/profile_all_unsupported.mlir
@@ -194,7 +194,7 @@ func.func @test_concat(%arg0: tensor<13x21x3xi1>, %arg1: tensor<13x21x3xi1>) ->
 
 // -----
 func.func @test_pad(%arg0: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %padding = tosa.const_shape {values = dense<0> : tensor<6xindex>} : () -> !tosa.shape<6>
   // expected-error at +1 {{'tosa.const' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %pad_const = "tosa.const"() {values = dense<1> : tensor<1xi1>} : () -> tensor<1xi1>
@@ -205,7 +205,7 @@ func.func @test_pad(%arg0: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
 
 // -----
 func.func @test_reshape(%arg0: tensor<13x21x3xi1>) -> tensor<1x819xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %1 = tosa.const_shape {values = dense<[1, 819]> : tensor<2xindex>} : () -> !tosa.shape<2>
   // expected-error at +1 {{'tosa.reshape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %0 = tosa.reshape %arg0, %1 : (tensor<13x21x3xi1>, !tosa.shape<2>) -> tensor<1x819xi1>
@@ -221,9 +221,9 @@ func.func @test_reverse(%arg0: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
 
 // -----
 func.func @test_slice(%arg0: tensor<13x21x3xi1>) -> tensor<4x11x1xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %size = tosa.const_shape {values = dense<[4, 11, 1]> : tensor<3xindex>} : () -> !tosa.shape<3>
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %start = tosa.const_shape {values = dense<[6, 8, 0]> : tensor<3xindex>} : () -> !tosa.shape<3>
   // expected-error at +1 {{'tosa.slice' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %2 = tosa.slice %arg0, %start, %size : (tensor<13x21x3xi1>, !tosa.shape<3>, !tosa.shape<3>) -> tensor<4x11x1xi1>
@@ -232,7 +232,7 @@ func.func @test_slice(%arg0: tensor<13x21x3xi1>) -> tensor<4x11x1xi1> {
 
 // -----
 func.func @test_tile(%arg0: tensor<13x21x3xi1>) -> tensor<39x21x6xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %cst = tosa.const_shape { values = dense<[3, 1, 2]> : tensor<3xindex> } : () -> !tosa.shape<3>
   // expected-error at +1 {{'tosa.tile' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %0 = tosa.tile %arg0, %cst: (tensor<13x21x3xi1>, !tosa.shape<3>) -> tensor<39x21x6xi1>
@@ -262,7 +262,7 @@ func.func @test_concat(%arg0: tensor<13x21x3xi1>, %arg1: tensor<13x21x3xi1>) ->
 
 // -----
 func.func @test_pad(%arg0: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %padding = tosa.const_shape {values = dense<0> : tensor<6xindex>} : () -> !tosa.shape<6>
   // expected-error at +1 {{'tosa.const' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %pad_const = "tosa.const"() {values = dense<1> : tensor<1xi1>} : () -> tensor<1xi1>
@@ -273,7 +273,7 @@ func.func @test_pad(%arg0: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
 
 // -----
 func.func @test_reshape(%arg0: tensor<13x21x3xi1>) -> tensor<1x819xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %1 = tosa.const_shape {values = dense<[1, 819]> : tensor<2xindex>} : () -> !tosa.shape<2>
   // expected-error at +1 {{'tosa.reshape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %0 = tosa.reshape %arg0, %1 : (tensor<13x21x3xi1>, !tosa.shape<2>) -> tensor<1x819xi1>
@@ -289,9 +289,9 @@ func.func @test_reverse(%arg0: tensor<13x21x3xi1>) -> tensor<13x21x3xi1> {
 
 // -----
 func.func @test_slice(%arg0: tensor<13x21x3xi1>) -> tensor<4x11x1xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %size = tosa.const_shape {values = dense<[4, 11, 1]> : tensor<3xindex>} : () -> !tosa.shape<3>
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %start = tosa.const_shape {values = dense<[6, 8, 0]> : tensor<3xindex>} : () -> !tosa.shape<3>
   // expected-error at +1 {{'tosa.slice' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %0 = tosa.slice %arg0, %start, %size : (tensor<13x21x3xi1>, !tosa.shape<3>, !tosa.shape<3>) -> tensor<4x11x1xi1>
@@ -300,7 +300,7 @@ func.func @test_slice(%arg0: tensor<13x21x3xi1>) -> tensor<4x11x1xi1> {
 
 // -----
 func.func @test_tile(%arg0: tensor<13x21x3xi1>) -> tensor<39x21x6xi1> {
-  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.const_shape' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %cst = tosa.const_shape { values = dense<[3, 1, 2]> : tensor<3xindex> } : () -> !tosa.shape<3>
   // expected-error at +1 {{'tosa.tile' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %0 = tosa.tile %arg0, %cst: (tensor<13x21x3xi1>, !tosa.shape<3>) -> tensor<39x21x6xi1>
@@ -322,7 +322,7 @@ func.func @test_cast_i32_f32(%arg0: tensor<13x21x3xi32>) -> tensor<13x21x3xf32>
 
 // -----
 func.func @test_custom(%arg0: tensor<10xi32>) -> tensor<10xi32> {
-  // expected-error at +1 {{'tosa.custom' op illegal: requires any of [pro_int, pro_fp] but not enabled in target}}
+  // expected-error at +1 {{'tosa.custom' op illegal: requires any of [pro_int, pro_fp] profiles/extensions to be specified in the target environment}}
   %0 = tosa.custom %arg0 {operator_name="custom_test", domain_name="tosa.mlir_test", implementation_attrs="" } : (tensor<10xi32>) -> (tensor<10xi32>)
   return %0 : tensor<10xi32>
 }
diff --git a/mlir/test/Dialect/Tosa/profile_pro_fp_unsupported.mlir b/mlir/test/Dialect/Tosa/profile_pro_fp_unsupported.mlir
index 052271776770e..3f0ffab5fcd7d 100644
--- a/mlir/test/Dialect/Tosa/profile_pro_fp_unsupported.mlir
+++ b/mlir/test/Dialect/Tosa/profile_pro_fp_unsupported.mlir
@@ -336,34 +336,3 @@ func.func @test_resize(%arg0: tensor<1x32x32x8xf32>) -> tensor<1x64x64x8xf32> {
   %1 = tosa.resize %arg0, %scale, %offset, %border { mode = BILINEAR } : (tensor<1x32x32x8xf32>, !tosa.shape<4>, !tosa.shape<2>, !tosa.shape<2>) -> tensor<1x64x64x8xf32>
   return %1 : tensor<1x64x64x8xf32>
 }
-
-// -----
-func.func @test_matmul_t_block_scaled(%arg0: tensor<4x8x32xf6E3M2FN>, %arg1: tensor<4x8x1xf8E8M0FNU>, %arg2: tensor<4x16x32xf6E3M2FN>, %arg3: tensor<4x16x1xf8E8M0FNU>) -> tensor<4x8x16xf32> {
-  // expected-error at +1 {{'tosa.matmul_t_block_scaled' op illegal: requires [pro_fp] but not enabled in target}}
-  %0 = tosa.matmul_t_block_scaled %arg0, %arg1, %arg2, %arg3 {block_size = #tosa.block_size<BLOCK_SIZE_32>} : (tensor<4x8x32xf6E3M2FN>, tensor<4x8x1xf8E8M0FNU>, tensor<4x16x32xf6E3M2FN>, tensor<4x16x1xf8E8M0FNU>) -> tensor<4x8x16xf32>
-  return %0 : tensor<4x8x16xf32>
-}
-
-// -----
-func.func @test_cast_from_block_scaled(%arg0: tensor<4x32xf4E2M1FN>, %arg1: tensor<4x1xf8E8M0FNU>) -> tensor<4x32xf32> {
-  // expected-error at +1 {{'tosa.cast_from_block_scaled' op illegal: requires [pro_fp] but not enabled in target}}
-  %0 = tosa.cast_from_block_scaled %arg0, %arg1 {block_size = #tosa.block_size<BLOCK_SIZE_32> : i32} : (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>) -> tensor<4x32xf32>
-  return %0 : tensor<4x32xf32>
-}
-
-// -----
-func.func @test_cast_to_block_scaled(%arg0: tensor<4x32xf32>) -> (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>) {
-  // expected-error at +1 {{'tosa.cast_to_block_scaled' op illegal: requires [pro_fp] but not enabled in target}}
-  %0:2 = tosa.cast_to_block_scaled %arg0 {block_size = #tosa.block_size<BLOCK_SIZE_32>} : (tensor<4x32xf32>) -> (tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>)
-  return %0#0, %0#1 : tensor<4x32xf4E2M1FN>, tensor<4x1xf8E8M0FNU>
-}
-
-// -----
-func.func @test_conv2d_block_scaled(%arg0: tensor<*xf4E2M1FN>, %arg1: tensor<*xf8E8M0FNU>, %arg2: tensor<*xf4E2M1FN>, %arg3: tensor<*xf8E8M0FNU>, %arg4: tensor<*xf32>) -> tensor<*xf32> {
-  %0 = tosa.const_shape {values = dense<[0, 0, 0, 0]> : tensor<4xindex>} : () -> !tosa.shape<4>
-  %1 = tosa.const_shape {values = dense<[1, 1]> : tensor<2xindex>} : () -> !tosa.shape<2>
-  %2 = tosa.const_shape {values = dense<[1, 1]> : tensor<2xindex>} : () -> !tosa.shape<2>
-  // expected-error at +1 {{'tosa.conv2d_block_scaled' op illegal: requires [pro_fp] but not enabled in target}}
-  %3 = tosa.conv2d_block_scaled %arg0, %arg1, %arg2, %arg3, %arg4, %0, %1, %2 {block_size = BLOCK_SIZE_32} : (tensor<*xf4E2M1FN>, tensor<*xf8E8M0FNU>, tensor<*xf4E2M1FN>, tensor<*xf8E8M0FNU>, tensor<*xf32>, !tosa.shape<4>, !tosa.shape<2>, !tosa.shape<2>) -> tensor<*xf32>
-  return %3 : tensor<*xf32>
-}
diff --git a/mlir/test/lib/Dialect/Tosa/CMakeLists.txt b/mlir/test/lib/Dialect/Tosa/CMakeLists.txt
index 43f0d0d21c1c0..7d40881ee6ee4 100644
--- a/mlir/test/lib/Dialect/Tosa/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Tosa/CMakeLists.txt
@@ -1,6 +1,5 @@
 add_mlir_dialect_library(MLIRTosaTestPasses
   TosaTestPasses.cpp
-  TestAvailability.cpp
 
   EXCLUDE_FROM_LIBMLIR
 
diff --git a/mlir/test/lib/Dialect/Tosa/TestAvailability.cpp b/mlir/test/lib/Dialect/Tosa/TestAvailability.cpp
deleted file mode 100644
index ce18a936d32d2..0000000000000
--- a/mlir/test/lib/Dialect/Tosa/TestAvailability.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-//===- TestAvailability.cpp - Pass to test Tosa op availability ---------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "mlir/Dialect/Func/IR/FuncOps.h"
-#include "mlir/Dialect/Tosa/IR/TosaOps.h"
-#include "mlir/Pass/Pass.h"
-
-using namespace mlir;
-
-//===----------------------------------------------------------------------===//
-// Printing op availability pass
-//===----------------------------------------------------------------------===//
-
-namespace {
-/// A pass for testing Tosa op availability.
-struct PrintOpAvailability
-    : public PassWrapper<PrintOpAvailability, OperationPass<ModuleOp>> {
-  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(PrintOpAvailability)
-
-  void runOnOperation() override;
-  StringRef getArgument() const final { return "test-tosa-op-availability"; }
-  StringRef getDescription() const final { return "Test Tosa op availability"; }
-};
-} // namespace
-
-void PrintOpAvailability::runOnOperation() {
-  auto module = getOperation();
-  for (auto f : module.getOps<func::FuncOp>()) {
-    llvm::outs() << f.getName() << "\n";
-
-    Dialect *tosaDialect = getContext().getLoadedDialect("tosa");
-
-    f->walk([&](Operation *op) {
-      if (op->getDialect() != tosaDialect)
-        return WalkResult::advance();
-
-      auto opName = op->getName();
-      auto &os = llvm::outs();
-
-      if (auto profile = dyn_cast<tosa::QueryProfileInterface>(op)) {
-        os << opName << " profiles: [";
-        for (const auto &profs : profile.getProfiles()) {
-          os << " [";
-          llvm::interleaveComma(profs, os, [&](tosa::Profile prof) {
-            os << tosa::stringifyProfile(prof);
-          });
-          os << "]";
-        }
-        os << " ]\n";
-      }
-
-      if (auto extension = dyn_cast<tosa::QueryExtensionInterface>(op)) {
-        os << opName << " extensions: [";
-        for (const auto &exts : extension.getExtensions()) {
-          os << " [";
-          llvm::interleaveComma(exts, os, [&](tosa::Extension ext) {
-            os << tosa::stringifyExtension(ext);
-          });
-          os << "]";
-        }
-        os << " ]\n";
-      }
-
-      os.flush();
-
-      return WalkResult::advance();
-    });
-  }
-}
-
-namespace mlir {
-void registerPrintTosaAvailabilityPass() {
-  PassRegistration<PrintOpAvailability>();
-}
-} // namespace mlir
diff --git a/mlir/tools/mlir-opt/mlir-opt.cpp b/mlir/tools/mlir-opt/mlir-opt.cpp
index 13c0934f34656..47dffb1b2d28b 100644
--- a/mlir/tools/mlir-opt/mlir-opt.cpp
+++ b/mlir/tools/mlir-opt/mlir-opt.cpp
@@ -39,7 +39,6 @@ void registerLoopLikeInterfaceTestPasses();
 void registerPassManagerTestPass();
 void registerPrintSpirvAvailabilityPass();
 void registerRegionTestPasses();
-void registerPrintTosaAvailabilityPass();
 void registerShapeFunctionTestPasses();
 void registerSideEffectTestPasses();
 void registerSliceAnalysisTestPass();
@@ -185,7 +184,6 @@ void registerTestTransformsTransformDialectExtension(DialectRegistry &);
 static void registerTestPasses() {
   registerCloneTestPasses();
   registerConvertToTargetEnvPass();
-  registerPrintTosaAvailabilityPass();
   registerLazyLoadingTestPasses();
   registerLoopLikeInterfaceTestPasses();
   registerPassManagerTestPass();
diff --git a/mlir/tools/mlir-tblgen/CMakeLists.txt b/mlir/tools/mlir-tblgen/CMakeLists.txt
index d7087cba3c874..936c84ef58b2b 100644
--- a/mlir/tools/mlir-tblgen/CMakeLists.txt
+++ b/mlir/tools/mlir-tblgen/CMakeLists.txt
@@ -33,7 +33,6 @@ add_tablegen(mlir-tblgen MLIR
   PassGen.cpp
   RewriterGen.cpp
   SPIRVUtilsGen.cpp
-  TosaUtilsGen.cpp
   CppGenUtilities.cpp
   )
 
diff --git a/mlir/tools/mlir-tblgen/TosaUtilsGen.cpp b/mlir/tools/mlir-tblgen/TosaUtilsGen.cpp
deleted file mode 100644
index dc8cc58498230..0000000000000
--- a/mlir/tools/mlir-tblgen/TosaUtilsGen.cpp
+++ /dev/null
@@ -1,215 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// TosaUtilsGen generates common utility functions for Tosa validation.
-//
-//===----------------------------------------------------------------------===//
-
-#include "mlir/TableGen/Attribute.h"
-#include "mlir/TableGen/CodeGenHelpers.h"
-#include "mlir/TableGen/EnumInfo.h"
-#include "mlir/TableGen/Format.h"
-#include "mlir/TableGen/GenInfo.h"
-#include "mlir/TableGen/Operator.h"
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Sequence.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/StringSet.h"
-#include "llvm/Support/FormatVariadic.h"
-#include "llvm/Support/raw_ostream.h"
-#include "llvm/TableGen/Error.h"
-#include "llvm/TableGen/Record.h"
-#include "llvm/TableGen/TableGenBackend.h"
-
-#include <list>
-#include <optional>
-
-using llvm::formatv;
-using llvm::raw_ostream;
-using llvm::Record;
-using llvm::RecordKeeper;
-using llvm::StringMap;
-using llvm::StringRef;
-using mlir::tblgen::Operator;
-
-//===----------------------------------------------------------------------===//
-// Availability Wrapper Class
-//===----------------------------------------------------------------------===//
-
-namespace {
-// Wrapper class with helper methods for accessing availability defined in
-// TableGen.
-class Availability {
-public:
-  explicit Availability(const Record *def);
-
-  // Returns the name of the direct TableGen class for this availability
-  // instance.
-  StringRef getClass() const;
-
-  // Returns the name of the query function insided the generated C++ interface.
-  StringRef getQueryFnName() const;
-
-  // Returns the return type of the query function insided the generated C++
-  // interface.
-  StringRef getQueryFnRetType() const;
-
-  // Returns the code for merging availability requirements.
-  StringRef getMergeActionCode() const;
-
-  // Returns the initializer expression for initializing the final availability
-  // requirements.
-  StringRef getMergeInitializer() const;
-
-  // Returns the C++ statements for preparing availability instance.
-  StringRef getMergeInstancePreparation() const;
-
-  // Returns the concrete availability instance carried in this case.
-  StringRef getMergeInstance() const;
-
-  // Returns the underlying LLVM TableGen Record.
-  const llvm::Record *getDef() const { return def; }
-
-private:
-  // The TableGen definition of this availability.
-  const llvm::Record *def;
-};
-} // namespace
-
-Availability::Availability(const llvm::Record *def) : def(def) {
-  assert(def->isSubClassOf("Availability") &&
-         "must be subclass of TableGen 'Availability' class");
-}
-
-StringRef Availability::getClass() const {
-  if (def->getDirectSuperClasses().size() != 1) {
-    PrintFatalError(def->getLoc(),
-                    "expected to only have one direct superclass");
-  }
-  return def->getDirectSuperClasses().front().first->getName();
-}
-
-StringRef Availability::getQueryFnRetType() const {
-  return def->getValueAsString("queryFnRetType");
-}
-
-StringRef Availability::getQueryFnName() const {
-  return def->getValueAsString("queryFnName");
-}
-
-StringRef Availability::getMergeActionCode() const {
-  return def->getValueAsString("mergeAction");
-}
-
-StringRef Availability::getMergeInitializer() const {
-  return def->getValueAsString("initializer");
-}
-
-StringRef Availability::getMergeInstancePreparation() const {
-  return def->getValueAsString("instancePreparation");
-}
-
-StringRef Availability::getMergeInstance() const {
-  return def->getValueAsString("instance");
-}
-
-// Returns the availability spec of the given `def`.
-static std::vector<Availability> getAvailabilities(const Record &def) {
-  std::vector<Availability> availabilities;
-
-  if (def.getValue("availability")) {
-    std::vector<const Record *> availDefs =
-        def.getValueAsListOfDefs("availability");
-    availabilities.reserve(availDefs.size());
-    for (const Record *avail : availDefs)
-      availabilities.emplace_back(avail);
-  }
-
-  return availabilities;
-}
-
-//===----------------------------------------------------------------------===//
-// Tosa Availability Impl AutoGen
-//===----------------------------------------------------------------------===//
-
-static void emitAvailabilityImpl(const Operator &srcOp, raw_ostream &os) {
-  mlir::tblgen::FmtContext fctx;
-  fctx.addSubst("overall", "tblgen_overall");
-
-  std::vector<Availability> opAvailabilities =
-      getAvailabilities(srcOp.getDef());
-
-  // First collect all availability classes this op should implement.
-  // All availability instances keep information for the generated interface and
-  // the instance's specific requirement. Here we remember a random instance so
-  // we can get the information regarding the generated interface.
-  llvm::StringMap<Availability> availClasses;
-  for (const Availability &avail : opAvailabilities)
-    availClasses.try_emplace(avail.getClass(), avail);
-
-  // Then generate implementation for each availability class.
-  for (const auto &availClass : availClasses) {
-    StringRef availClassName = availClass.getKey();
-    Availability avail = availClass.getValue();
-
-    // Generate the implementation method signature.
-    os << formatv("{0} {1}::{2}() {{\n", avail.getQueryFnRetType(),
-                  srcOp.getCppClassName(), avail.getQueryFnName());
-
-    // Create the variable for the final requirement and initialize it.
-    os << formatv("  {0} tblgen_overall = {1};\n", avail.getQueryFnRetType(),
-                  avail.getMergeInitializer());
-
-    // Update with the op's specific availability spec.
-    for (const Availability &avail : opAvailabilities)
-      if (avail.getClass() == availClassName &&
-          (!avail.getMergeInstancePreparation().empty() ||
-           !avail.getMergeActionCode().empty())) {
-        os << "  {\n    "
-           // Prepare this instance.
-           << avail.getMergeInstancePreparation()
-           << "\n    "
-           // Merge this instance.
-           << std::string(
-                  tgfmt(avail.getMergeActionCode(),
-                        &fctx.addSubst("instance", avail.getMergeInstance())))
-           << ";\n  }\n";
-      }
-
-    os << "  return tblgen_overall;\n";
-    os << "}\n";
-  }
-}
-
-static bool emitAvailabilityImpl(const RecordKeeper &recordKeeper,
-                                 raw_ostream &os) {
-  llvm::emitSourceFileHeader("Tosa Op Availability Implementations", os,
-                             recordKeeper);
-
-  auto defs = recordKeeper.getAllDerivedDefinitions("Tosa_Op");
-  for (const auto *def : defs) {
-    Operator op(def);
-    if (def->getValueAsBit("autogenAvailability"))
-      emitAvailabilityImpl(op, os);
-  }
-  return false;
-}
-
-//===----------------------------------------------------------------------===//
-// Op Availability Implementation Hook Registration
-//===----------------------------------------------------------------------===//
-
-static mlir::GenRegistration
-    genOpAvailabilityImpl("gen-tosa-avail-impls",
-                          "Generate Tosa operation utility definitions",
-                          [](const RecordKeeper &records, raw_ostream &os) {
-                            return emitAvailabilityImpl(records, os);
-                          });
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 8a90b4ddf46d1..4c5727ffd2973 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -12192,18 +12192,6 @@ gentbl_cc_library(
     deps = [":TosaDialectTdFiles"],
 )
 
-gentbl_cc_library(
-    name = "TosaAvailabilityIncGen",
-    tbl_outs = {
-        "include/mlir/Dialect/Tosa/IR/TosaAvailability.h.inc": ["-gen-avail-interface-decls"],
-        "include/mlir/Dialect/Tosa/IR/TosaAvailability.cpp.inc": ["-gen-avail-interface-defs"],
-        "include/mlir/Dialect/Tosa/IR/TosaOpAvailabilityImpl.inc": ["-gen-tosa-avail-impls"],
-    },
-    tblgen = ":mlir-tblgen",
-    td_file = "include/mlir/Dialect/Tosa/IR/TosaOps.td",
-    deps = [":TosaDialectTdFiles"],
-)
-
 gentbl_cc_library(
     name = "TosaDialectBytecodeGen",
     strip_include_prefix = "include",
@@ -12287,7 +12275,6 @@ cc_library(
         ":SideEffectInterfaces",
         ":Support",
         ":TensorDialect",
-        ":TosaAvailabilityIncGen",
         ":TosaDialectBytecodeGen",
         ":TosaDialectIncGen",
         ":TosaEnumsIncGen",



More information about the Mlir-commits mailing list