From 7c1339e32d7c8c3b95fbb11799bcef4795a9b72a Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 15 May 2017 16:35:55 -0700 Subject: Fix some unused variable warnings when IS_MOBILE_PLATFORM is defined. PiperOrigin-RevId: 156120864 --- tensorflow/core/common_runtime/simple_graph_execution_state.cc | 3 ++- tensorflow/core/kernels/lrn_op.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/common_runtime/simple_graph_execution_state.cc b/tensorflow/core/common_runtime/simple_graph_execution_state.cc index 47cf29d403..3806f9f47f 100644 --- a/tensorflow/core/common_runtime/simple_graph_execution_state.cc +++ b/tensorflow/core/common_runtime/simple_graph_execution_state.cc @@ -236,11 +236,12 @@ Status SimpleGraphExecutionState::InitBaseGraph( const BuildGraphOptions& options) { const GraphDef* graph_def = &original_graph_def_; +#ifndef IS_MOBILE_PLATFORM GraphDef optimized_graph; + const RewriterConfig& rewrite_options = session_options_->config.graph_options().rewrite_options(); -#ifndef IS_MOBILE_PLATFORM if (grappler::MetaOptimizerEnabled(rewrite_options)) { // Adding this functionalty in steps. The first step is to make sure // we don't break dependencies. The second step will be to turn the diff --git a/tensorflow/core/kernels/lrn_op.cc b/tensorflow/core/kernels/lrn_op.cc index 3435486c95..c905ebc84a 100644 --- a/tensorflow/core/kernels/lrn_op.cc +++ b/tensorflow/core/kernels/lrn_op.cc @@ -79,11 +79,11 @@ struct LaunchLRN { const int rows = static_cast(in.dim_size(1)); const int cols = static_cast(in.dim_size(2)); const int depth = static_cast(in.dim_size(3)); - const int nodes = cols * rows; #if defined(IS_MOBILE_PLATFORM) SingleThreadedLRN(in, batch, rows, cols, depth, output); #else + const int nodes = cols * rows; if (depth > kSingleThreadedLRNDepthCutoff && (beta_ == T(0.5) || beta_ == T(1))) { SingleThreadedLRN(in, batch, rows, cols, depth, output); -- cgit v1.2.3