6 #include "../armnnTestUtils/GraphUtils.hpp" 7 #include "../armnnTestUtils/TestUtils.hpp" 11 #include <doctest/doctest.h> 13 using namespace armnn;
17 #if defined(ARMCOMPUTENEON_ENABLED) || defined(ARMCOMPUTECL_ENABLED) 41 void PermuteDepthwiseConv2dWeightsTestRunner(
INetworkPtr& network,
53 CHECK(graph.GetNumLayers() == 5);
56 &IsLayerOfType<InputLayer>,
57 &IsLayerOfType<InputLayer>,
58 &IsLayerOfType<PermuteLayer>,
59 &IsLayerOfType<DepthwiseConvolution2dLayer>,
60 &IsLayerOfType<OutputLayer>));
66 unsigned int weightsShape[] = {outputShape[0], outputShape[1], outputShape[2], outputShape[3]};
71 CHECK((newShape[0] == weightsShape[0]));
72 CHECK((newShape[1] == weightsShape[3]));
73 CHECK((newShape[2] == weightsShape[1]));
74 CHECK((newShape[3] == weightsShape[2]));
77 void PermuteDepthwiseConv2dWeightsTest(
Compute backendId)
91 PermuteDepthwiseConv2dWeightsTestRunner(network,
98 #if defined(ARMCOMPUTECL_ENABLED) 99 TEST_SUITE(
"Optimizer_PermuteDepthwiseConv2dWeightsGpuAcc")
101 TEST_CASE(
"PermuteDepthwiseConv2dWeightsGpuAccTest")
108 #if defined(ARMCOMPUTENEON_ENABLED) 111 TEST_CASE(
"PermuteDepthwiseConv2dWeightsCpuAccTest")
TEST_SUITE("TestConstTensorLayerVisitor")
static IRuntimePtr Create(const CreationOptions &options)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
bool m_BiasEnabled
Enable/disable bias.
const TensorShape & GetShape() const
bool CheckSequence(const armnn::Graph::ConstIterator first, const armnn::Graph::ConstIterator last)
armnn::Layer * GetFirstLayerWithName(armnn::Graph &graph, const std::string &name)
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
Copyright (c) 2021 ARM Limited and Contributors.
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
Compute
The Compute enum is now deprecated and it is now being replaced by BackendId.
IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options=OptimizerOptions(), Optional< std::vector< std::string > &> messages=EmptyOptional())
Create an optimized version of the network.
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
GPU Execution: OpenCL: ArmCompute.
Graph & GetGraphForTesting(IOptimizedNetwork *optNet)
CPU Execution: NEON: ArmCompute.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
virtual int Connect(IInputSlot &destination)=0
const TensorInfo & GetTensorInfo() const override
static INetworkPtr Create(NetworkOptions networkOptions={})
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.