14 #include <boost/test/unit_test.hpp> 17 #include <valgrind/memcheck.h> 45 #ifdef ARMNN_LEAK_CHECKING_ENABLED 57 CreateAndDropDummyNetwork(backends, runtime);
66 CreateAndDropDummyNetwork(backends, runtime);
75 #if defined(WITH_VALGRIND) 82 unsigned long leakedBefore = 0;
83 unsigned long leakedAfter = 0;
88 unsigned long reachableBefore = 0;
89 unsigned long reachableAfter = 0;
92 unsigned long dubious = 0;
93 unsigned long suppressed = 0;
104 VALGRIND_DO_QUICK_LEAK_CHECK;
105 VALGRIND_COUNT_LEAKS(leakedBefore, dubious, reachableBefore, suppressed);
129 runtime.
LoadNetwork(networkIdentifier, std::move(optNet));
134 VALGRIND_DO_ADDED_LEAK_CHECK;
135 VALGRIND_COUNT_LEAKS(leakedAfter, dubious, reachableAfter, suppressed);
138 BOOST_TEST(leakedBefore == leakedAfter);
143 BOOST_TEST(static_cast<long>(reachableAfter) - static_cast<long>(reachableBefore) < 81920);
#define ARMNN_SCOPED_LEAK_CHECKER(TAG)
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
static IRuntimePtr Create(const CreationOptions &options)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId)
virtual const IDeviceSpec & GetDeviceSpec() const override
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
void IgnoreUnused(Ts &&...)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
#define ARMNN_LEAK_CHECKER_IS_ACTIVE()
#define ARMNN_OBJECTS_LEAKED_IN_SCOPE()
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.
An ActivationDescriptor for the ActivationLayer.
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(RuntimeValidateGpuDeviceSupportLayerNoFallback)
virtual Status LoadNetwork(NetworkId &networkIdOut, IOptimizedNetworkPtr network) override
Loads a complete network into the Runtime.
#define ARMNN_NO_LEAKS_IN_SCOPE()
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
virtual Status UnloadNetwork(NetworkId networkId) override
Unloads a network from the Runtime.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
virtual int Connect(IInputSlot &destination)=0
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
#define ARMNN_BYTES_LEAKED_IN_SCOPE()
static INetworkPtr Create()
void RuntimeLoadedNetworksReserve(armnn::Runtime *runtime)