-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[mlir][tosa] Align Variable ops to match with TOSA v1.0 spec #130680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-mlir-linalg @llvm/pr-subscribers-mlir-tosa Author: Jerry-Ge (Jerry-Ge) Changes
Full diff: https://github.com/llvm/llvm-project/pull/130680.diff 9 Files Affected:
diff --git a/mlir/include/mlir/Dialect/Tosa/IR/TosaUtilOps.td b/mlir/include/mlir/Dialect/Tosa/IR/TosaUtilOps.td
index 8a27e5ba39331..86b361ed8fbd6 100644
--- a/mlir/include/mlir/Dialect/Tosa/IR/TosaUtilOps.td
+++ b/mlir/include/mlir/Dialect/Tosa/IR/TosaUtilOps.td
@@ -86,12 +86,13 @@ def Tosa_VariableOp : Tosa_Op<"variable", []> {
let summary = "Defines a variable";
let description = [{
- Defines a new TOSA variable. This is a mutable value.
+ Defines a new TOSA variable.
+ This is a persistent mutable value across multiple TOSA graph invocations.
Modifications are expressed using read/write semantics.
}];
let arguments = (ins
- SymbolNameAttr:$name,
+ I32Attr:$uid,
TypeAttr:$type,
OptionalAttr<AnyAttr>:$initial_value
);
@@ -102,7 +103,7 @@ def Tosa_VariableOp : Tosa_Op<"variable", []> {
];
let assemblyFormat = [{
- $name
+ $uid
attr-dict
custom<TypeOrAttr>($type, $initial_value)
}];
@@ -115,11 +116,11 @@ def Tosa_VariableWriteOp : Tosa_Op<"variable.write", []> {
let summary = "write_buffer operator";
let description = [{
- Assigns a value to pseudo-buffer resource holding a mutable tensor.
+ Assigns a value to the pseudo-buffer resource holding a persistent mutable tensor.
}];
let arguments = (ins
- SymbolNameAttr:$name,
+ I32Attr:$uid,
AnyType:$value
);
@@ -129,7 +130,7 @@ def Tosa_VariableWriteOp : Tosa_Op<"variable.write", []> {
];
let assemblyFormat = [{
- $name attr-dict `,` $value `:` type($value)
+ $uid attr-dict `,` $value `:` type($value)
}];
}
@@ -140,11 +141,11 @@ def Tosa_VariableReadOp : Tosa_Op<"variable.read", []> {
let summary = "read_buffer operator";
let description = [{
- Reads the value from a pseudo-buffer resource holding a mutable tensor.
+ Reads the value from a pseudo-buffer resource holding a persistent mutable tensor.
}];
let arguments = (ins
- SymbolNameAttr:$name
+ I32Attr:$uid
);
let results = (outs
@@ -157,7 +158,7 @@ def Tosa_VariableReadOp : Tosa_Op<"variable.read", []> {
];
let assemblyFormat = [{
- $name attr-dict `:` type($value)
+ $uid attr-dict `:` type($value)
}];
}
diff --git a/mlir/lib/Conversion/TosaToMLProgram/TosaToMLProgram.cpp b/mlir/lib/Conversion/TosaToMLProgram/TosaToMLProgram.cpp
index d134d8cdf485e..0027cd97dd2cd 100644
--- a/mlir/lib/Conversion/TosaToMLProgram/TosaToMLProgram.cpp
+++ b/mlir/lib/Conversion/TosaToMLProgram/TosaToMLProgram.cpp
@@ -26,8 +26,12 @@ class VariableOpConverter : public OpRewritePattern<tosa::VariableOp> {
LogicalResult matchAndRewrite(tosa::VariableOp op,
PatternRewriter &rewriter) const final {
+
+ std::string uid = std::to_string(op.getUid());
+ llvm::StringRef uidStringRef(uid);
+
auto newVariable = rewriter.create<mlir::ml_program::GlobalOp>(
- op.getLoc(), op.getName(), op.getType(), /*is_mutable=*/true,
+ op.getLoc(), uidStringRef, op.getType(), /*is_mutable=*/true,
op.getInitialValueAttr(), /*sym_visibility=*/nullptr);
newVariable.setPrivate();
rewriter.replaceOp(op, newVariable);
@@ -42,8 +46,12 @@ class VariableWriteOpConverter
LogicalResult matchAndRewrite(tosa::VariableWriteOp op,
PatternRewriter &rewriter) const final {
+
+ std::string uid = std::to_string(op.getUid());
+ llvm::StringRef uidStringRef(uid);
+
auto globalSymbolRef =
- SymbolRefAttr::get(rewriter.getContext(), op.getName());
+ SymbolRefAttr::get(rewriter.getContext(), uidStringRef);
auto newVariableWrite = rewriter.create<ml_program::GlobalStoreOp>(
op.getLoc(), globalSymbolRef, op.getValue());
rewriter.replaceOp(op, newVariableWrite);
@@ -57,8 +65,11 @@ class VariableReadOpConverter : public OpRewritePattern<tosa::VariableReadOp> {
LogicalResult matchAndRewrite(tosa::VariableReadOp op,
PatternRewriter &rewriter) const final {
+ std::string uid = std::to_string(op.getUid());
+ llvm::StringRef uidStringRef(uid);
+
auto globalSymbolRef =
- SymbolRefAttr::get(rewriter.getContext(), op.getName());
+ SymbolRefAttr::get(rewriter.getContext(), uidStringRef);
auto newVariableRead = rewriter.create<ml_program::GlobalLoadOp>(
op.getLoc(), op.getType(), globalSymbolRef);
rewriter.replaceOp(op, newVariableRead);
diff --git a/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
index 6b1b651a90cfb..44651cf62da44 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
@@ -449,7 +449,7 @@ struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {
SmallVector<std::function<LogicalResult(Operation *)>> constCheckers;
TosaLevel tosaLevel;
- DenseMap<StringAttr, mlir::Type> variablesMap;
+ DenseMap<IntegerAttr, mlir::Type> variablesMap;
TosaProfileCompliance profileComp;
tosa::TargetEnv targetEnv;
};
@@ -677,9 +677,9 @@ inline bool CompatibleTypes(const mlir::Type &type,
bool TosaValidation::CheckVariable(Operation *op) {
if (isa<mlir::tosa::VariableOp>(op)) {
- auto nameAttr = cast<mlir::StringAttr>(op->getAttr("name"));
+ mlir::IntegerAttr uidAttr = cast<mlir::IntegerAttr>(op->getAttr("uid"));
- if (variablesMap.count(nameAttr)) {
+ if (variablesMap.count(uidAttr)) {
op->emitOpError() << "name has already been declared";
return false;
}
@@ -687,7 +687,7 @@ bool TosaValidation::CheckVariable(Operation *op) {
auto typeAttr = cast<mlir::TypeAttr>(op->getAttr("type"));
mlir::Type type = typeAttr.getValue();
- variablesMap[nameAttr] = type;
+ variablesMap[uidAttr] = type;
}
return true;
@@ -696,14 +696,13 @@ bool TosaValidation::CheckVariable(Operation *op) {
bool TosaValidation::CheckVariableReadOrWrite(Operation *op) {
if (isa<mlir::tosa::VariableReadOp>(op) ||
isa<mlir::tosa::VariableWriteOp>(op)) {
- auto nameAttr = cast<mlir::StringAttr>(op->getAttr("name"));
-
- if (!variablesMap.count(nameAttr)) {
+ mlir::IntegerAttr uidAttr = cast<mlir::IntegerAttr>(op->getAttr("uid"));
+ if (!variablesMap.count(uidAttr)) {
op->emitOpError() << "name has not been declared";
return false;
}
- auto varType = variablesMap[nameAttr];
+ auto varType = variablesMap[uidAttr];
for (auto v : op->getOperands()) {
auto type = v.getType();
diff --git a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-pipeline.mlir b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-pipeline.mlir
index ecd5c792e08b6..27a4dd48b8e2f 100644
--- a/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-pipeline.mlir
+++ b/mlir/test/Conversion/TosaToLinalg/tosa-to-linalg-pipeline.mlir
@@ -5,9 +5,9 @@
// check that -tosa-validate of stateful ops kick in
func.func @test_variable_write_shape(%arg0: tensor<1x4x8xi32>) -> () {
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.write' op operand type does not equal variable type}}
- tosa.variable.write @stored_var, %arg0 : tensor<1x4x8xi32>
+ tosa.variable.write 1, %arg0 : tensor<1x4x8xi32>
return
}
diff --git a/mlir/test/Conversion/TosaToMLProgram/tosa-to-mlprogram.mlir b/mlir/test/Conversion/TosaToMLProgram/tosa-to-mlprogram.mlir
index 69b6875987daf..f878d1ba806fe 100644
--- a/mlir/test/Conversion/TosaToMLProgram/tosa-to-mlprogram.mlir
+++ b/mlir/test/Conversion/TosaToMLProgram/tosa-to-mlprogram.mlir
@@ -1,13 +1,13 @@
// RUN: mlir-opt --tosa-to-mlprogram %s -o -| FileCheck %s
module {
- // CHECK: ml_program.global private mutable @var_x(dense<7.000000e+00> : tensor<1xf32>) : tensor<1xf32>
- tosa.variable @var_x = dense<7.000000e+00> : tensor<1xf32>
+ // CHECK: ml_program.global private mutable @"1"(dense<7.000000e+00> : tensor<1xf32>) : tensor<1xf32>
+ tosa.variable 1 = dense<7.000000e+00> : tensor<1xf32>
func.func @test_stateful_ops(%arg0: tensor<1xf32>) -> (tensor<1xf32>) {
- // CHECK: ml_program.global_store @var_x = %arg0 : tensor<1xf32>
- tosa.variable.write @var_x, %arg0 : tensor<1xf32>
- // CHECK: %[[LOAD:.+]] = ml_program.global_load @var_x : tensor<1xf32>
- %0 = tosa.variable.read @var_x : tensor<1xf32>
+ // CHECK: ml_program.global_store @"1" = %arg0 : tensor<1xf32>
+ tosa.variable.write 1, %arg0 : tensor<1xf32>
+ // CHECK: %[[LOAD:.+]] = ml_program.global_load @"1" : tensor<1xf32>
+ %0 = tosa.variable.read 1 : tensor<1xf32>
return %0 : tensor<1xf32>
}
}
\ No newline at end of file
diff --git a/mlir/test/Dialect/Tosa/invalid.mlir b/mlir/test/Dialect/Tosa/invalid.mlir
index f617d3a6e6026..b31f33d3542d5 100644
--- a/mlir/test/Dialect/Tosa/invalid.mlir
+++ b/mlir/test/Dialect/Tosa/invalid.mlir
@@ -617,45 +617,45 @@ func.func @test_avg_pool2d_zero_dim_input(%arg0: tensor<1x0x?x9xf32>, %arg1: ten
// -----
func.func @test_variable_duplicates(%arg0: tensor<2x4x8xi32>) -> () {
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable' op name has already been declared}}
- tosa.variable @stored_var : tensor<1x4x8xi32>
+ tosa.variable 1 : tensor<1x4x8xi32>
return
}
// -----
func.func @test_variable_read_type(%arg0: tensor<2x4x8xi32>) -> () {
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.read' op result type does not equal variable type}}
- %0 = tosa.variable.read @stored_var : tensor<2x4x8xi16>
+ %0 = tosa.variable.read 1 : tensor<2x4x8xi16>
return
}
// -----
func.func @test_variable_read_shape(%arg0: tensor<2x4x8xi32>) -> () {
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.read' op result type does not equal variable type}}
- %0 = tosa.variable.read @stored_var : tensor<1x4x8xi32>
+ %0 = tosa.variable.read 1 : tensor<1x4x8xi32>
return
}
// -----
func.func @test_variable_write_type(%arg0: tensor<2x4x8xi16>) -> () {
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.write' op operand type does not equal variable type}}
- tosa.variable.write @stored_var, %arg0 : tensor<2x4x8xi16>
+ tosa.variable.write 1, %arg0 : tensor<2x4x8xi16>
return
}
// -----
func.func @test_variable_write_shape(%arg0: tensor<1x4x8xi32>) -> () {
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.write' op operand type does not equal variable type}}
- tosa.variable.write @stored_var, %arg0 : tensor<1x4x8xi32>
+ tosa.variable.write 1, %arg0 : tensor<1x4x8xi32>
return
}
diff --git a/mlir/test/Dialect/Tosa/invalid_extension.mlir b/mlir/test/Dialect/Tosa/invalid_extension.mlir
index 544787c7a0699..80bda756804a8 100644
--- a/mlir/test/Dialect/Tosa/invalid_extension.mlir
+++ b/mlir/test/Dialect/Tosa/invalid_extension.mlir
@@ -14,18 +14,18 @@ func.func @test_fft2d(%arg0: tensor<1x4x8xf32>, %arg1: tensor<1x4x8xf32>) -> (te
// -----
func.func @test_variable_read_type(%arg0: tensor<2x4x8xi32>) -> () {
// expected-error@+1 {{'tosa.variable' op illegal: requires [variable] but not enabled in target}}
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.read' op illegal: requires [variable]}}
- %0 = tosa.variable.read @stored_var : tensor<2x4x8xi16>
+ %0 = tosa.variable.read 1 : tensor<2x4x8xi16>
return
}
// -----
func.func @test_variable_write_type(%arg0: tensor<2x4x8xi16>) -> () {
// expected-error@+1 {{'tosa.variable' op illegal: requires [variable] but not enabled in target}}
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
// expected-error@+1 {{'tosa.variable.write' op illegal: requires [variable]}}
- tosa.variable.write @stored_var, %arg0 : tensor<2x4x8xi16>
+ tosa.variable.write 1, %arg0 : tensor<2x4x8xi16>
return
}
diff --git a/mlir/test/Dialect/Tosa/level_check.mlir b/mlir/test/Dialect/Tosa/level_check.mlir
index b840dbe9e0a78..fe917141ac3f3 100644
--- a/mlir/test/Dialect/Tosa/level_check.mlir
+++ b/mlir/test/Dialect/Tosa/level_check.mlir
@@ -1151,11 +1151,11 @@ func.func @test_scatter_tensor_size_invalid(%arg0: tensor<13x210000000x3xf32>, %
// -----
func.func @test_variable_read_write_tensor_size_invalid() -> () {
- tosa.variable @stored_var = dense<3.14> : tensor<536870912xf32>
+ tosa.variable 1 = dense<3.14> : tensor<536870912xf32>
// expected-error@+1 {{'tosa.variable.read' op failed level check: result tensor size (in bytes) <= (1 << MAX_LOG2_SIZE - 1)}}
- %0 = tosa.variable.read @stored_var : tensor<536870912xf32>
+ %0 = tosa.variable.read 1 : tensor<536870912xf32>
// expected-error@+1 {{'tosa.variable.write' op failed level check: operand tensor size (in bytes) <= (1 << MAX_LOG2_SIZE - 1)}}
- tosa.variable.write @stored_var, %0 : tensor<536870912xf32>
+ tosa.variable.write 1, %0 : tensor<536870912xf32>
return
}
@@ -1219,11 +1219,11 @@ func.func @test_cond_if_rank_invalid(%arg0: tensor<1x1x1x1x1x1x1x1xf32>, %arg1:
func.func @test_variable_read_write_rank_invalid() -> () {
// expected-error@+1 {{'tosa.variable' op failed level check: attribute rank(shape) <= MAX_RANK}}
- tosa.variable @stored_var = dense<3.14> : tensor<1x1x1x1x1x1x1x1xf32>
+ tosa.variable 1 = dense<3.14> : tensor<1x1x1x1x1x1x1x1xf32>
// expected-error@+1 {{'tosa.variable.read' op failed level check: result rank(shape) <= MAX_RANK}}
- %0 = tosa.variable.read @stored_var : tensor<1x1x1x1x1x1x1x1xf32>
+ %0 = tosa.variable.read 1 : tensor<1x1x1x1x1x1x1x1xf32>
// expected-error@+1 {{'tosa.variable.write' op failed level check: operand rank(shape) <= MAX_RANK}}
- tosa.variable.write @stored_var, %0 : tensor<1x1x1x1x1x1x1x1xf32>
+ tosa.variable.write 1, %0 : tensor<1x1x1x1x1x1x1x1xf32>
return
}
diff --git a/mlir/test/Dialect/Tosa/variables.mlir b/mlir/test/Dialect/Tosa/variables.mlir
index 9a26aa0bc8bf4..dac53afb14551 100644
--- a/mlir/test/Dialect/Tosa/variables.mlir
+++ b/mlir/test/Dialect/Tosa/variables.mlir
@@ -6,14 +6,14 @@
// CHECK-LABEL: @test_variable_scalar(
// CHECK-SAME: %[[ADD_VAL:.*]]: tensor<f32>) {
func.func @test_variable_scalar(%arg0: tensor<f32>) -> () {
- // CHECK: tosa.variable @stored_var = dense<3.140000e+00> : tensor<f32>
- tosa.variable @stored_var = dense<3.14> : tensor<f32>
- // CHECK: %[[STORED_VAL:.*]] = tosa.variable.read @stored_var : tensor<f32>
- %0 = tosa.variable.read @stored_var : tensor<f32>
- // CHECK: %[[RESULT_ADD:.*]] = tosa.add %[[ADD_VAL]], %[[STORED_VAL]] : (tensor<f32>, tensor<f32>) -> tensor<f32>
+ // CHECK: tosa.variable 1 = dense<3.140000e+00> : tensor<f32>
+ tosa.variable 1 = dense<3.14> : tensor<f32>
+ // CHECK: %[[VAR_1:.*]] = tosa.variable.read 1 : tensor<f32>
+ %0 = tosa.variable.read 1 : tensor<f32>
+ // CHECK: %[[RESULT_ADD:.*]] = tosa.add %[[ADD_VAL]], %[[VAR_1]] : (tensor<f32>, tensor<f32>) -> tensor<f32>
%1 = "tosa.add"(%arg0, %0) : (tensor<f32>, tensor<f32>) -> tensor<f32>
- // CHECK: tosa.variable.write @stored_var, %[[RESULT_ADD]] : tensor<f32>
- tosa.variable.write @stored_var, %1 : tensor<f32>
+ // CHECK: tosa.variable.write 1, %[[RESULT_ADD]] : tensor<f32>
+ tosa.variable.write 1, %1 : tensor<f32>
return
}
@@ -21,13 +21,13 @@ func.func @test_variable_scalar(%arg0: tensor<f32>) -> () {
// CHECK-LABEL: @test_variable_tensor(
// CHECK-SAME: %[[ADD_VAL:.*]]: tensor<2x4x8xi32>) {
func.func @test_variable_tensor(%arg0: tensor<2x4x8xi32>) -> () {
- // CHECK: tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
- tosa.variable @stored_var = dense<-1> : tensor<2x4x8xi32>
- // CHECK: %[[STORED_VAL:.*]] = tosa.variable.read @stored_var : tensor<2x4x8xi32>
- %0 = tosa.variable.read @stored_var : tensor<2x4x8xi32>
- // CHECK: %[[RESULT_ADD:.*]] = tosa.add %[[ADD_VAL]], %[[STORED_VAL]] : (tensor<2x4x8xi32>, tensor<2x4x8xi32>) -> tensor<2x4x8xi32>
+ // CHECK: tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
+ tosa.variable 1 = dense<-1> : tensor<2x4x8xi32>
+ // CHECK: %[[VAL_1:.*]] = tosa.variable.read 1 : tensor<2x4x8xi32>
+ %0 = tosa.variable.read 1 : tensor<2x4x8xi32>
+ // CHECK: %[[RESULT_ADD:.*]] = tosa.add %[[ADD_VAL]], %[[VAL_1]] : (tensor<2x4x8xi32>, tensor<2x4x8xi32>) -> tensor<2x4x8xi32>
%1 = "tosa.add"(%arg0, %0) : (tensor<2x4x8xi32>, tensor<2x4x8xi32>) -> tensor<2x4x8xi32>
- // CHECK: tosa.variable.write @stored_var, %[[RESULT_ADD]] : tensor<2x4x8xi32>
- tosa.variable.write @stored_var, %1 : tensor<2x4x8xi32>
+ // CHECK: tosa.variable.write 1, %[[RESULT_ADD]] : tensor<2x4x8xi32>
+ tosa.variable.write 1, %1 : tensor<2x4x8xi32>
return
-}
+}
\ No newline at end of file
|
Reminder to update @Jerry-Ge when you have some time |
thanks for the reminder! Updated the PR to bring back |
* updated AnyType:$value to Tosa_Tensor:$input1 and Tosa_Tensor:$output1 for VariableWrite and VriableRead Operators * updated description discrepancies * note: in the TOSA spec, we had var_shape attr, but it's already included in the TypeAttr:$type in MLIR Signed-off-by: Jerry Ge <[email protected]> Change-Id: I4cd0348cd4e306dbc2e0e53a89a9404d91fb44d4
cc @tatwaichong for validation review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…0680) - updated AnyType:$value to Tosa_Tensor:$input1 and Tosa_Tensor:$output1 for VariableWrite and VriableRead Operators - updated description discrepancies - note: in the TOSA spec, we had var_shape attr, but it's already included in the TypeAttr:$type in MLIR Signed-off-by: Jerry Ge <[email protected]>
…0680) - updated AnyType:$value to Tosa_Tensor:$input1 and Tosa_Tensor:$output1 for VariableWrite and VriableRead Operators - updated description discrepancies - note: in the TOSA spec, we had var_shape attr, but it's already included in the TypeAttr:$type in MLIR Signed-off-by: Jerry Ge <[email protected]>
…0680) - updated AnyType:$value to Tosa_Tensor:$input1 and Tosa_Tensor:$output1 for VariableWrite and VriableRead Operators - updated description discrepancies - note: in the TOSA spec, we had var_shape attr, but it's already included in the TypeAttr:$type in MLIR Signed-off-by: Jerry Ge <[email protected]>
…0680) - updated AnyType:$value to Tosa_Tensor:$input1 and Tosa_Tensor:$output1 for VariableWrite and VriableRead Operators - updated description discrepancies - note: in the TOSA spec, we had var_shape attr, but it's already included in the TypeAttr:$type in MLIR TF_REFSPEC: refs/changes/61/1023261/3 (cherry picked from commit 8e9ff8e) Signed-off-by: Jerry Ge <[email protected]> Change-Id: I4cd0348cd4e306dbc2e0e53a89a9404d91fb44d4
in the TypeAttr:$type in MLIR