From 0c2b12c072bb6fecc66c8cdb189799e624717009 Mon Sep 17 00:00:00 2001 From: Jaesung Chung Date: Wed, 20 Nov 2019 22:39:11 -0800 Subject: [PATCH] Add auto-generated LookupTableFindV2, LookupTableImportV2, and LookupTableSizeV2 ops. PiperOrigin-RevId: 281679937 Change-Id: I28d3bd53cc3392cb83768ed3838484b0f2860e1d --- .../mlir/tensorflow/ir/tf_generated_ops.td | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td b/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td index 7cd076b4260..736b28c6f9f 100644 --- a/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td +++ b/tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td @@ -2441,6 +2441,68 @@ def TF_LogicalOrOp : TF_Op<"LogicalOr", [Broadcastable, Commutative, NoSideEffec ); } +def TF_LookupTableFindV2Op : TF_Op<"LookupTableFindV2", []> { + let summary = "Looks up keys in a table, outputs the corresponding values."; + + let description = [{ +The tensor `keys` must of the same type as the keys of the table. +The output `values` is of the type of the table values. + +The scalar `default_value` is the value output for keys not present in the +table. It must also be of the same type as the table values. + }]; + + let arguments = (ins + TF_ResourceTensor:$table_handle, + TF_Tensor:$keys, + TF_Tensor:$default_value + ); + + let results = (outs + TF_Tensor:$values + ); + + TF_DerivedOperandTypeAttr Tin = TF_DerivedOperandTypeAttr<1>; + TF_DerivedOperandTypeAttr Tout = TF_DerivedOperandTypeAttr<2>; +} + +def TF_LookupTableImportV2Op : TF_Op<"LookupTableImportV2", []> { + let summary = [{ +Replaces the contents of the table with the specified keys and values. + }]; + + let description = [{ +The tensor `keys` must be of the same type as the keys of the table. +The tensor `values` must be of the type of the table values. + }]; + + let arguments = (ins + TF_ResourceTensor:$table_handle, + TF_Tensor:$keys, + TF_Tensor:$values + ); + + let results = (outs); + + TF_DerivedOperandTypeAttr Tin = TF_DerivedOperandTypeAttr<1>; + TF_DerivedOperandTypeAttr Tout = TF_DerivedOperandTypeAttr<2>; +} + +def TF_LookupTableSizeV2Op : TF_Op<"LookupTableSizeV2", []> { + let summary = "Computes the number of elements in the given table."; + + let description = [{ + }]; + + let arguments = (ins + TF_ResourceTensor:$table_handle + ); + + let results = (outs + I64Tensor:$size + ); +} + def TF_MatMulOp : TF_Op<"MatMul", [NoSideEffect]> { let summary = [{ Multiply the matrix "a" by the matrix "b".