17 TEST_CASE(
"OptimizeValidateCpuAccDeviceSupportLayerNoFallback")
36 NeonWorkloadFactoryHelper::GetFactory(NeonWorkloadFactoryHelper::GetMemoryManager());
39 for (
auto&& layer : graph)
43 layer->CreateWorkload(fact));
47 TEST_CASE(
"OptimizeValidateDeviceNonSupportLayerNoFallback")
70 std::vector<std::string> errMessages;
75 FAIL(
"Should have thrown an exception.");
81 CHECK(errMessages.size() > 0);
84 TEST_CASE(
"FastMathEnabledTestOnCpuAcc")
103 *net, backends, runtime->GetDeviceSpec(), optimizerOptions);
109 CHECK(modelOptionsOut.size() == 1);
110 CHECK(modelOptionsOut[0].GetOption(0).GetName() ==
"FastMathEnabled");
111 CHECK(modelOptionsOut[0].GetOption(0).GetValue().AsBool() ==
true);
114 TEST_CASE(
"NumberOfThreadsTestOnCpuAcc")
127 unsigned int numberOfThreads = 2;
135 *net, backends, runtime->GetDeviceSpec(), optimizerOptions);
138 std::unique_ptr<armnn::Graph> graphPtr;
141 auto modelOptionsOut = impl.GetModelOptions();
143 CHECK(modelOptionsOut.size() == 1);
144 CHECK(modelOptionsOut[0].GetOption(0).GetName() ==
"NumberOfThreads");
145 CHECK(modelOptionsOut[0].GetOption(0).GetValue().AsUnsignedInt() == numberOfThreads);
ModelOptions m_ModelOptions
static IRuntimePtr Create(const CreationOptions &options)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
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
ArmNN performs an optimization on each model/network before it gets loaded for execution.
Graph & GetGraphForTesting(IOptimizedNetwork *optNet)
Struct for the users to pass backend specific options.
CPU Execution: NEON: ArmCompute.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
ModelOptions & GetModelOptionsForTesting(IOptimizedNetwork *optNet)
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
A NormalizationDescriptor for the NormalizationLayer.
static INetworkPtr Create(NetworkOptions networkOptions={})