From f0e1848bdd95fc11015d95c79a20072272929189 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Shubham=20Gupta/System=20SW=20/SRI-Bangalore/Engineer/?= =?utf8?q?=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Fri, 19 Oct 2018 03:58:36 +0530 Subject: [PATCH] Remove unused shape variables from visit func (#3221) This patch removes the unused shape variables. Signed-off-by: shubham --- runtimes/pure_arm_compute/src/compilation.cc | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/runtimes/pure_arm_compute/src/compilation.cc b/runtimes/pure_arm_compute/src/compilation.cc index 01f66e6..229683f 100644 --- a/runtimes/pure_arm_compute/src/compilation.cc +++ b/runtimes/pure_arm_compute/src/compilation.cc @@ -3585,10 +3585,6 @@ void Planner::visit(const ::internal::tflite::op::Pad::Node &node) const ::internal::tflite::operand::Index ifm_index{node.param().ifm_index}; const ::internal::tflite::operand::Index paddings_index{node.param().paddings_index}; - const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature(); - const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature(); - const auto paddings_shape = _ctx.at(paddings_index).shape().asTensor(); - // Set Shape Constraints and TensorInfo _builder.addShapeConstr( ifm_index, asTensorInfo(asTensorShape(_ctx.at(ifm_index).shape()), _ctx.at(ifm_index).type(), @@ -3838,9 +3834,6 @@ void Planner::visit(const ::internal::tflite::op::L2Normalization::Node &node) const ::internal::tflite::operand::Index ofm_index{node.param().ofm_index}; const ::internal::tflite::operand::Index ifm_index{node.param().ifm_index}; - const auto ofm_shape = _ctx.at(ofm_index).shape(); - const auto ifm_shape = _ctx.at(ifm_index).shape(); - // Set Shape Constraints and TensorInfo _builder.addShapeConstr( ifm_index, asTensorInfo(asTensorShape(_ctx.at(ifm_index).shape()), _ctx.at(ifm_index).type(), @@ -3871,10 +3864,10 @@ void Planner::visit(const ::internal::tflite::op::L2Normalization::Node &node) param.ofm_index = ofm_index.asInt(); param.ifm_index = ifm_index.asInt(); - param.radius = 2 * ifm_shape.dim(3) + 1; // normSize = depth * 2 + 1 - param.alpha = 1.0f; // In the implementation to make alpha_ become 1 - param.beta = 0.5f; // pow(reduction, -0.5) = 1 / sqrt(reduction) - param.bias = 0.0f; // Don't offset the reduction. + param.radius = 2 * _ctx.at(ifm_index).shape().dim(3) + 1; // normSize = depth * 2 + 1 + param.alpha = 1.0f; // In the implementation to make alpha_ become 1 + param.beta = 0.5f; // pow(reduction, -0.5) = 1 / sqrt(reduction) + param.bias = 0.0f; // Don't offset the reduction. auto stage = [param](const IAllocationContext &ctx, IExecutionBuilder &builder) { auto ofm_alloc = ctx.at(::internal::tflite::operand::Index{param.ofm_index}); -- 2.7.4