diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2020-03-11 18:04:20 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2020-03-19 18:25:33 +0000 |
commit | a0687eef149fbf57bb6db0621ec65724f550b1ed (patch) | |
tree | b11b19403f5e4117eecf315072375a5d3ea84647 /tests | |
parent | ea54a01f6bd30f013cbe88ae1751985bc86b6af5 (diff) | |
download | armnn-a0687eef149fbf57bb6db0621ec65724f550b1ed.tar.gz |
MLECO-755: ArmNN: Add file format external profiling option
* Added new m_FileFormat variable in ExternalProfilingOptions
* Added new profiling option to ExecuteNetwork
* Added check for file format in ProfilingConnectionFactory
* Added test in profiling tests
Change-Id: I0e9cb8ecac919dc0ed03dcf77324a65621f07ae7
Signed-off-by: Isabella Gottardi <isabella.gottardi@arm.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ExecuteNetwork/ExecuteNetwork.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp index 3c0301010d..3a63fffeae 100644 --- a/tests/ExecuteNetwork/ExecuteNetwork.cpp +++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp @@ -33,6 +33,7 @@ int main(int argc, const char* argv[]) std::string outgoingCaptureFile; std::string incomingCaptureFile; uint32_t counterCapturePeriod; + std::string fileFormat; double thresholdTime = 0.0; @@ -114,6 +115,8 @@ int main(int argc, const char* argv[]) "If enabled then the 'file-only' test mode of external profiling will be enabled") ("counter-capture-period,u", po::value<uint32_t>(&counterCapturePeriod)->default_value(150u), "If profiling is enabled in 'file-only' mode this is the capture period that will be used in the test") + ("file-format,ff", po::value(&fileFormat), + "If profiling is enabled specifies the output file format") ("parse-unsupported", po::bool_switch()->default_value(false), "Add unsupported operators as stand-in layers (where supported by parser)"); } @@ -187,13 +190,14 @@ int main(int argc, const char* argv[]) // Create runtime armnn::IRuntime::CreationOptions options; - options.m_EnableGpuProfiling = enableProfiling; - options.m_DynamicBackendsPath = dynamicBackendsPath; - options.m_ProfilingOptions.m_EnableProfiling = enableExternalProfiling; + options.m_EnableGpuProfiling = enableProfiling; + options.m_DynamicBackendsPath = dynamicBackendsPath; + options.m_ProfilingOptions.m_EnableProfiling = enableExternalProfiling; options.m_ProfilingOptions.m_IncomingCaptureFile = incomingCaptureFile; options.m_ProfilingOptions.m_OutgoingCaptureFile = outgoingCaptureFile; - options.m_ProfilingOptions.m_FileOnly = fileOnlyExternalProfiling; - options.m_ProfilingOptions.m_CapturePeriod = counterCapturePeriod; + options.m_ProfilingOptions.m_FileOnly = fileOnlyExternalProfiling; + options.m_ProfilingOptions.m_CapturePeriod = counterCapturePeriod; + options.m_ProfilingOptions.m_FileFormat = fileFormat; std::shared_ptr<armnn::IRuntime> runtime(armnn::IRuntime::Create(options)); const std::string executableName("ExecuteNetwork"); @@ -271,6 +275,7 @@ int main(int argc, const char* argv[]) options.m_ProfilingOptions.m_OutgoingCaptureFile = outgoingCaptureFile; options.m_ProfilingOptions.m_FileOnly = fileOnlyExternalProfiling; options.m_ProfilingOptions.m_CapturePeriod = counterCapturePeriod; + options.m_ProfilingOptions.m_FileFormat = fileFormat; std::shared_ptr<armnn::IRuntime> runtime(armnn::IRuntime::Create(options)); return RunTest(modelFormat, inputTensorShapes, computeDevices, dynamicBackendsPath, modelPath, inputNames, |