xref: /aosp_15_r20/external/armnn/src/armnn/layers/ChannelShuffleLayer.hpp (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1 //
2 // Copyright © 2021-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "LayerWithParameters.hpp"
8 
9 namespace armnn
10 {
11 class ChannelShuffleLayer : public LayerWithParameters<ChannelShuffleDescriptor>
12 {
13 public:
14 
15     /// Creates a dynamically-allocated copy of this layer.
16     /// @param graph The graph into which this layer is being cloned
17     ChannelShuffleLayer* Clone(Graph& graph) const override;
18 
19     /// Makes a workload for the ChannelShuffle type.
20     /// @param factory The workload factory which will create the workload
21     /// @return A pointer to the created workload, or nullptr if not created.
22     virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
23 
24     /// Check if the input tensor shape(s)
25     /// will lead to a valid configuration of @ref ChannelShuffleLayer.
26     /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validated.
27     void ValidateTensorShapesFromInputs() override;
28 
29 protected:
30     ChannelShuffleLayer(const ChannelShuffleDescriptor& param, const char* name);
31 
32     ~ChannelShuffleLayer() = default;
33 };
34 
35 } // namespace