13 #include <boost/test/unit_test.hpp> 36 NeonWorkloadFactoryHelper::GetFactory(NeonWorkloadFactoryHelper::GetMemoryManager());
39 for (
auto&& layer : graph)
43 layer->CreateWorkload(fact));
70 std::vector<std::string> errMessages;
75 BOOST_FAIL(
"Should have thrown an exception.");
81 BOOST_CHECK(errMessages.size() > 0);
103 *net, backends, runtime->GetDeviceSpec(), optimizerOptions);
105 BOOST_CHECK(optimizedNet);
109 BOOST_TEST(modelOptionsOut.size() == 1);
110 BOOST_TEST(modelOptionsOut[0].GetOption(0).GetName() ==
"FastMathEnabled");
111 BOOST_TEST(modelOptionsOut[0].GetOption(0).GetValue().AsBool() ==
true);
127 unsigned int numberOfThreads = 2;
135 *net, backends, runtime->GetDeviceSpec(), optimizerOptions);
137 BOOST_CHECK(optimizedNet);
138 std::unique_ptr<armnn::Graph> graphPtr;
143 BOOST_TEST(modelOptionsOut.size() == 1);
144 BOOST_TEST(modelOptionsOut[0].GetOption(0).GetName() ==
"NumberOfThreads");
145 BOOST_TEST(modelOptionsOut[0].GetOption(0).GetValue().AsUnsignedInt() == numberOfThreads);
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
ModelOptions m_ModelOptions
static IRuntimePtr Create(const CreationOptions &options)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
ModelOptions & GetModelOptions()
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
BOOST_AUTO_TEST_CASE(OptimizeValidateCpuAccDeviceSupportLayerNoFallback)
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
Graph & GetGraphForTesting(IOptimizedNetwork *optNet)
Struct for the users to pass backend specific options.
BOOST_AUTO_TEST_SUITE_END()
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={})