From cf30d41ded3b5adae5c3bf3c7e05ce8bb7066a9c Mon Sep 17 00:00:00 2001 From: Mihai Maruseac Date: Tue, 2 Jun 2020 10:34:20 -0700 Subject: [PATCH] Add Registration for non-stateful scatter_nd_min and scatter_nd_max. Manual import of #26923. Closes #26923. Fixes #20402 PiperOrigin-RevId: 314358414 Change-Id: I02dc6f6fb89e10a4fa4161abe71dadab0e127592 --- .../api_def_ResourceScatterNdMax.pbtxt | 31 +++++++ .../api_def_ResourceScatterNdMin.pbtxt | 31 +++++++ .../base_api/api_def_ScatterNdMax.pbtxt | 40 +++++++++ .../base_api/api_def_ScatterNdMin.pbtxt | 40 +++++++++ .../base_api/api_def_TensorScatterMax.pbtxt | 27 ++++++ .../base_api/api_def_TensorScatterMin.pbtxt | 27 ++++++ .../api_def_ResourceScatterNdMax.pbtxt | 4 + .../api_def_ResourceScatterNdMin.pbtxt | 4 + .../python_api/api_def_TensorScatterMax.pbtxt | 6 ++ .../python_api/api_def_TensorScatterMin.pbtxt | 6 ++ tensorflow/core/kernels/scatter_nd_op.cc | 87 +++++++++++++++++++ tensorflow/core/kernels/scatter_nd_op.h | 2 +- .../core/kernels/scatter_nd_op_cpu_impl.h | 80 +++++++++++------ .../core/kernels/scatter_nd_op_gpu.cu.cc | 29 ++++++- tensorflow/core/ops/array_ops.cc | 18 ++++ tensorflow/core/ops/state_ops.cc | 38 ++++++++ .../kernel_tests/scatter_nd_ops_test.py | 27 ++++++ .../python/ops/resource_variable_ops.py | 80 +++++++++++++++++ tensorflow/python/ops/variables.py | 66 ++++++++++++++ .../tools/api/golden/v1/tensorflow.pbtxt | 8 ++ .../api/golden/v1/tensorflow.raw_ops.pbtxt | 24 +++++ .../tools/api/golden/v2/tensorflow.pbtxt | 8 ++ .../api/golden/v2/tensorflow.raw_ops.pbtxt | 24 +++++ tensorflow/tools/compatibility/renames_v2.py | 4 + 24 files changed, 684 insertions(+), 27 deletions(-) create mode 100644 tensorflow/core/api_def/base_api/api_def_ResourceScatterNdMax.pbtxt create mode 100644 tensorflow/core/api_def/base_api/api_def_ResourceScatterNdMin.pbtxt create mode 100644 tensorflow/core/api_def/base_api/api_def_ScatterNdMax.pbtxt create mode 100644 tensorflow/core/api_def/base_api/api_def_ScatterNdMin.pbtxt create mode 100644 tensorflow/core/api_def/base_api/api_def_TensorScatterMax.pbtxt create mode 100644 tensorflow/core/api_def/base_api/api_def_TensorScatterMin.pbtxt create mode 100644 tensorflow/core/api_def/python_api/api_def_ResourceScatterNdMax.pbtxt create mode 100644 tensorflow/core/api_def/python_api/api_def_ResourceScatterNdMin.pbtxt create mode 100644 tensorflow/core/api_def/python_api/api_def_TensorScatterMax.pbtxt create mode 100644 tensorflow/core/api_def/python_api/api_def_TensorScatterMin.pbtxt diff --git a/tensorflow/core/api_def/base_api/api_def_ResourceScatterNdMax.pbtxt b/tensorflow/core/api_def/base_api/api_def_ResourceScatterNdMax.pbtxt new file mode 100644 index 00000000000..06919fce26e --- /dev/null +++ b/tensorflow/core/api_def/base_api/api_def_ResourceScatterNdMax.pbtxt @@ -0,0 +1,31 @@ +op { + graph_op_name: "ResourceScatterNdMax" + in_arg { + name: "ref" + description: <