13 namespace optimizations
30 if (CanMovePermuteToInputs(base))
32 auto permute = boost::polymorphic_downcast<PermuteLayer*>(&connection.
GetOwningLayer());
39 const std::string name = std::string(
"moved_up-") + permute->GetName();
49 const TensorInfo& childOutInfo = permute->GetOutputHandler().GetTensorInfo();
53 permute->GetOutputSlot().MoveAllConnections(base.
GetOutputSlot());
63 static bool CanMovePermuteToInputs(
const Layer& base)
const OutputHandler & GetOutputHandler(unsigned int i=0) const
~MovePermuteUpImpl()=default
LayerType GetType() const
std::vector< InputSlot >::iterator BeginInputSlots()
std::vector< InputSlot >::iterator EndInputSlots()
armnn::TensorShape Permuted(const armnn::TensorShape &srcShape, const armnn::PermutationVector &mappings)
void Run(Graph &graph, InputSlot &connection) const
unsigned int GetNumConnections() const override
This layer represents a permutation operation.
MovePermuteUpImpl()=default
void SetTensorInfo(const TensorInfo &tensorInfo)
Sets the TensorInfo used by this output handler.
LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)
Layer & GetOwningLayer() const
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
const InputSlot & GetInputSlot(unsigned int index) const override