ArmNN  NotReleased
OptimizeInverseConversions.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "Optimization.hpp"
8 
9 #include <boost/core/ignore_unused.hpp>
10 
11 namespace armnn
12 {
13 namespace optimizations
14 {
15 
17 {
18 public:
21  void Run(Graph& graph, InputSlot& connection) const
22  {
23  boost::ignore_unused(graph);
24  Layer& base = connection.GetConnectedOutputSlot()->GetOwningLayer();
25  Layer& child = connection.GetOwningLayer();
26 
27  BOOST_ASSERT((base.GetType() == LayerType::ConvertFp16ToFp32 &&
31 
32  // Bypass both conversion layers
34  }
35 
36 protected:
39 };
40 
45 
46 } // namespace optimizations
47 } // namespace armnn
const OutputSlot * GetConnectedOutputSlot() const
Definition: Layer.hpp:55
LayerType GetType() const
Definition: Layer.hpp:259
void Run(Graph &graph, InputSlot &connection) const
void MoveAllConnections(OutputSlot &destination)
Moves all connections to another OutputSlot.
Definition: Layer.cpp:112
Layer & GetOwningLayer() const
Definition: Layer.hpp:115
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Definition: Layer.hpp:312
Layer & GetOwningLayer() const
Definition: Layer.hpp:52
const InputSlot & GetInputSlot(unsigned int index) const override
Definition: Layer.hpp:310