6 #include "../FileOnlyProfilingConnection.hpp" 13 #include <boost/filesystem.hpp> 14 #include <boost/numeric/conversion/cast.hpp> 15 #include <boost/test/unit_test.hpp> 23 using namespace armnn;
42 boost::filesystem::path
tempPath = boost::filesystem::temp_directory_path();
43 boost::filesystem::path
tempFile = boost::filesystem::unique_path();
45 armnn::Runtime::CreationOptions::ExternalProfilingOptions
options;
46 options.m_EnableProfiling =
true;
47 options.m_FileOnly =
true;
48 options.m_IncomingCaptureFile =
"";
49 options.m_OutgoingCaptureFile = tempPath.string();
50 options.m_CapturePeriod = 100;
71 if(!helper.WaitForPacketsSent())
73 BOOST_FAIL(
"Timeout waiting for packets");
80 BOOST_CHECK(boost::filesystem::exists(tempPath.c_str()) ==
true);
91 helper.WaitForPacketsSent();
94 options.m_EnableProfiling =
false;
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
bool IsCounterRegistered(uint16_t counterUid) const override
static ProfilingService & Instance()
ProfilingState GetCurrentState() const
uint32_t GetCounterValue(uint16_t counterUid) const override
Copyright (c) 2020 ARM Limited.
ProfilingService & profilingService
uint32_t IncrementCounterValue(uint16_t counterUid) override
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
bool WaitForPacketSent(ProfilingService &instance, uint32_t timeout=1000)
bool Remove(const char *path)
boost::filesystem::path tempFile
long long GetFileSize(const char *path)
void ResetExternalProfilingOptions(const ExternalProfilingOptions &options, bool resetProfilingService=false)
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
BOOST_AUTO_TEST_SUITE_END()
helper WaitForPacketsSent()
armnn::Runtime::CreationOptions::ExternalProfilingOptions options
FileOnlyHelperService helper