aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-05-15 16:35:55 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-15 16:39:37 -0700
commit7c1339e32d7c8c3b95fbb11799bcef4795a9b72a (patch)
tree68c5d3a5b9b50c1a302e5b10e1efeda13afb2794
parent0a34a7db58276adda9de491a8b83f185fbc30820 (diff)
Fix some unused variable warnings when IS_MOBILE_PLATFORM
is defined. PiperOrigin-RevId: 156120864
-rw-r--r--tensorflow/core/common_runtime/simple_graph_execution_state.cc3
-rw-r--r--tensorflow/core/kernels/lrn_op.cc2
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<CPUDevice, T> {
const int rows = static_cast<int>(in.dim_size(1));
const int cols = static_cast<int>(in.dim_size(2));
const int depth = static_cast<int>(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);