diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-03-02 15:25:41 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-02 15:33:05 -0800 |
commit | e8e4e5b99b721dcd79e0d1a9a7fe6bfb990744ba (patch) | |
tree | 24f08c1148fbc7f7ad32d4d4e186540751ba55c4 /tensorflow/core/kernels/mkl_lrn_op.cc | |
parent | 9a45b6bdf0246477754f50fab357e568051bed4f (diff) |
Fix some compiler warnings in MKL build.
PiperOrigin-RevId: 187677893
Diffstat (limited to 'tensorflow/core/kernels/mkl_lrn_op.cc')
-rw-r--r-- | tensorflow/core/kernels/mkl_lrn_op.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/core/kernels/mkl_lrn_op.cc b/tensorflow/core/kernels/mkl_lrn_op.cc index 5f0a12a1fb..282012c719 100644 --- a/tensorflow/core/kernels/mkl_lrn_op.cc +++ b/tensorflow/core/kernels/mkl_lrn_op.cc @@ -88,7 +88,8 @@ class MklLRNOp : public OpKernel { OP_REQUIRES_OK(context, context->GetAttr("alpha", &alpha_)); OP_REQUIRES_OK(context, context->GetAttr("beta", &beta_)); workspace_enabled_ = false; - context->GetAttr("workspace_enabled", &workspace_enabled_); + OP_REQUIRES_OK(context, + context->GetAttr("workspace_enabled", &workspace_enabled_)); } void Compute(OpKernelContext* context) override { @@ -357,7 +358,8 @@ class MklLRNGradOp : public OpKernel { OP_REQUIRES_OK(context, context->GetAttr("alpha", &alpha_)); OP_REQUIRES_OK(context, context->GetAttr("beta", &beta_)); workspace_enabled_ = false; - context->GetAttr("workspace_enabled", &workspace_enabled_); + OP_REQUIRES_OK(context, + context->GetAttr("workspace_enabled", &workspace_enabled_)); } void Compute(OpKernelContext* context) override { @@ -535,7 +537,6 @@ class MklLRNGradOp : public OpKernel { Tensor* mkl_tmp_outimage_buf_tensor) { const Tensor& in_grads = MklGetInput(context, 0); const Tensor& in_image = MklGetInput(context, 1); - const Tensor& out_image = MklGetInput(context, 2); const Tensor& workspace = MklGetInput( context, 3); /*Worskpsace is enabled, get the buffer to the workspace */ @@ -544,8 +545,6 @@ class MklLRNGradOp : public OpKernel { static_cast<const void*>(in_grads.flat<T>().data())); void* user_fwd_input = const_cast<void*>( static_cast<const void*>(in_image.flat<T>().data())); - void* user_fwd_output = const_cast<void*>( - static_cast<const void*>(out_image.flat<T>().data())); void* workspace_buffer = const_cast<void*>( static_cast<const void*>(workspace.flat<T>().data())); |