Skip to content

Commit

Permalink
Remove extra unnecessary parameter to functor::ResizeBilinear
Browse files Browse the repository at this point in the history
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
  • Loading branch information
saeta authored and tensorflower-gardener committed Jan 17, 2017
1 parent da0116b commit bf67d0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
9 changes: 4 additions & 5 deletions tensorflow/core/kernels/resize_bilinear_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class ResizeBilinearOp : public OpKernel {
typename TTypes<float, 4>::Tensor output_data =
st.output->tensor<float, 4>();

functor::ResizeBilinear<Device, T>()(
context, context->eigen_device<Device>(), image_data, st.height_scale,
st.width_scale, output_data);
functor::ResizeBilinear<Device, T>()(context->eigen_device<Device>(),
image_data, st.height_scale,
st.width_scale, output_data);
}

private:
Expand Down Expand Up @@ -263,8 +263,7 @@ inline void scale_similar_image(const float* input_image, const int b,
namespace functor {
template <typename T>
struct ResizeBilinear<CPUDevice, T> {
void operator()(OpKernelContext* context, const CPUDevice& d,
typename TTypes<T, 4>::ConstTensor images,
void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor images,
const float height_scale, const float width_scale,
typename TTypes<float, 4>::Tensor output) {
const int batch_size = images.dimension(0);
Expand Down
4 changes: 1 addition & 3 deletions tensorflow/core/kernels/resize_bilinear_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@ 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 {
namespace functor {

template <typename Device, typename T>
struct ResizeBilinear {
void operator()(OpKernelContext* context, const Device& d,
typename TTypes<T, 4>::ConstTensor images,
void operator()(const Device& d, typename TTypes<T, 4>::ConstTensor images,
const float height_scale, const float width_scale,
typename TTypes<float, 4>::Tensor resized_images);
};
Expand Down
3 changes: 1 addition & 2 deletions tensorflow/core/kernels/resize_bilinear_op_gpu.cu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ namespace functor {
// Partial specialization of ResizeBilinear functor for a GPUDevice.
template <typename T>
struct ResizeBilinear<GPUDevice, T> {
void operator()(OpKernelContext* context, const GPUDevice& d,
typename TTypes<T, 4>::ConstTensor images,
void operator()(const GPUDevice& d, typename TTypes<T, 4>::ConstTensor images,
const float height_scale, const float width_scale,
typename TTypes<float, 4>::Tensor output) {
const int batch = images.dimension(0);
Expand Down

0 comments on commit bf67d0a

Please sign in to comment.