6 #include "../FileOnlyProfilingConnection.hpp" 12 #include <boost/core/ignore_unused.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::filesystem::path tempFile
uint32_t GetCounterValue(uint16_t counterUid) const override
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
long long GetFileSize(const char *path)
bool Remove(const char *path)
bool IsCounterRegistered(uint16_t counterUid) const override
void ResetExternalProfilingOptions(const ExternalProfilingOptions &options, bool resetProfilingService=false)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
uint32_t IncrementCounterValue(uint16_t counterUid) override
static ProfilingService & Instance()
BOOST_AUTO_TEST_SUITE_END()
helper WaitForPacketsSent()
bool WaitForPacketSent(ProfilingService &instance, uint32_t timeout=1000)
FileOnlyHelperService helper
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
ProfilingState GetCurrentState() const
ProfilingService & profilingService
armnn::Runtime::CreationOptions::ExternalProfilingOptions options