13 #include <boost/core/ignore_unused.hpp> 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);
147 boost::ignore_unused(dubious);
148 boost::ignore_unused(suppressed);
virtual const IInputSlot & GetInputSlot(unsigned int index) const =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())
virtual Status UnloadNetwork(NetworkId networkId) override
virtual const IDeviceSpec & GetDeviceSpec() const override
#define ARMNN_LEAK_CHECKER_IS_ACTIVE()
An ActivationDescriptor for the ActivationLayer.
#define ARMNN_OBJECTS_LEAKED_IN_SCOPE()
#define ARMNN_NO_LEAKS_IN_SCOPE()
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
BOOST_AUTO_TEST_CASE(RuntimeValidateGpuDeviceSupportLayerNoFallback)
void VerifyPostOptimisationStructureTestImpl(armnn::BackendId backendId)
#define ARMNN_BYTES_LEAKED_IN_SCOPE()
static INetworkPtr Create()
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
GPU Execution: OpenCL: ArmCompute.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
static IRuntimePtr Create(const CreationOptions &options)
BOOST_AUTO_TEST_SUITE_END()
void RuntimeLoadedNetworksReserve(armnn::Runtime *runtime)
#define ARMNN_SCOPED_LEAK_CHECKER(TAG)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr
virtual int Connect(IInputSlot &destination)=0
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr
virtual Status LoadNetwork(NetworkId &networkIdOut, IOptimizedNetworkPtr network) override
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0