From bf67d0a1c52c303f9018c00cbc030dc35438ed2c Mon Sep 17 00:00:00 2001 From: Brennan Saeta Date: Tue, 17 Jan 2017 13:38:04 -0800 Subject: [PATCH] Remove extra unnecessary parameter to functor::ResizeBilinear This extra parameter got introduced in a previous commit as part of some performance improvements. But because it is unused, it should be reverted back. Change: 144749662 --- tensorflow/core/kernels/resize_bilinear_op.cc | 9 ++++----- tensorflow/core/kernels/resize_bilinear_op.h | 4 +--- tensorflow/core/kernels/resize_bilinear_op_gpu.cu.cc | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tensorflow/core/kernels/resize_bilinear_op.cc b/tensorflow/core/kernels/resize_bilinear_op.cc index 7630fe1ffc9..85d28d2c641 100644 --- a/tensorflow/core/kernels/resize_bilinear_op.cc +++ b/tensorflow/core/kernels/resize_bilinear_op.cc @@ -55,9 +55,9 @@ class ResizeBilinearOp : public OpKernel { typename TTypes::Tensor output_data = st.output->tensor(); - functor::ResizeBilinear()( - context, context->eigen_device(), image_data, st.height_scale, - st.width_scale, output_data); + functor::ResizeBilinear()(context->eigen_device(), + image_data, st.height_scale, + st.width_scale, output_data); } private: @@ -263,8 +263,7 @@ inline void scale_similar_image(const float* input_image, const int b, namespace functor { template struct ResizeBilinear { - void operator()(OpKernelContext* context, const CPUDevice& d, - typename TTypes::ConstTensor images, + void operator()(const CPUDevice& d, typename TTypes::ConstTensor images, const float height_scale, const float width_scale, typename TTypes::Tensor output) { const int batch_size = images.dimension(0); diff --git a/tensorflow/core/kernels/resize_bilinear_op.h b/tensorflow/core/kernels/resize_bilinear_op.h index 762d92f0c2c..d16ed64f148 100644 --- a/tensorflow/core/kernels/resize_bilinear_op.h +++ b/tensorflow/core/kernels/resize_bilinear_op.h @@ -18,7 +18,6 @@ limitations under the License. #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" #include "tensorflow/core/framework/numeric_types.h" -#include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/tensor_types.h" namespace tensorflow { @@ -26,8 +25,7 @@ namespace functor { template struct ResizeBilinear { - void operator()(OpKernelContext* context, const Device& d, - typename TTypes::ConstTensor images, + void operator()(const Device& d, typename TTypes::ConstTensor images, const float height_scale, const float width_scale, typename TTypes::Tensor resized_images); }; diff --git a/tensorflow/core/kernels/resize_bilinear_op_gpu.cu.cc b/tensorflow/core/kernels/resize_bilinear_op_gpu.cu.cc index c2dac063641..a7da7a0777d 100644 --- a/tensorflow/core/kernels/resize_bilinear_op_gpu.cu.cc +++ b/tensorflow/core/kernels/resize_bilinear_op_gpu.cu.cc @@ -149,8 +149,7 @@ namespace functor { // Partial specialization of ResizeBilinear functor for a GPUDevice. template struct ResizeBilinear { - void operator()(OpKernelContext* context, const GPUDevice& d, - typename TTypes::ConstTensor images, + void operator()(const GPUDevice& d, typename TTypes::ConstTensor images, const float height_scale, const float width_scale, typename TTypes::Tensor output) { const int batch = images.dimension(0);