aboutsummaryrefslogtreecommitdiff
path: root/tests/ExecuteNetwork
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-10-24 17:07:43 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-25 14:51:29 +0000
commitc82c8732fb514b412012002bd951a84039eca696 (patch)
tree3f332d585fd86ff45ba514eb069be7fe26a2004a /tests/ExecuteNetwork
parent1f826967da321f87b192bd1c29152b0f1fc51ed8 (diff)
downloadarmnn-c82c8732fb514b412012002bd951a84039eca696.tar.gz
IVGCVSW-4008 Add profiling mode to ExecuteNetwork
* Removed the requirement for specifying a data file for each input tensor * Added the possibility to generate dummy tensor data (filled with 0s) if no data files are specified by the user * Warn the user when they request to save the output to a file, but the input was generate, therefore rendering the output useless Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I8baed116dcd99fe380e419db322dc7e04ab1c653
Diffstat (limited to 'tests/ExecuteNetwork')
-rw-r--r--tests/ExecuteNetwork/ExecuteNetwork.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index ee7d2c1f5c..59269328c9 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -69,9 +69,10 @@ int main(int argc, const char* argv[])
"The shape of the input tensors in the network as a flat array of integers separated by comma."
"Several shapes can be passed by separating them with a colon (:)."
"This parameter is optional, depending on the network.")
- ("input-tensor-data,d", po::value(&inputTensorDataFilePaths),
+ ("input-tensor-data,d", po::value(&inputTensorDataFilePaths)->default_value(""),
"Path to files containing the input data as a flat array separated by whitespace. "
- "Several paths can be passed by separating them with a comma.")
+ "Several paths can be passed by separating them with a comma. If not specified, the network will be run "
+ "with dummy data (useful for profiling).")
("input-type,y",po::value(&inputTypes), "The type of the input tensors in the network separated by comma. "
"If unset, defaults to \"float\" for all defined inputs. "
"Accepted values (float, int or qasymm8)")
@@ -255,14 +256,15 @@ 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;
std::shared_ptr<armnn::IRuntime> runtime(armnn::IRuntime::Create(options));
+
return RunTest(modelFormat, inputTensorShapes, computeDevices, dynamicBackendsPath, modelPath, inputNames,
inputTensorDataFilePaths, inputTypes, quantizeInput, outputTypes, outputNames,
outputTensorFiles, enableProfiling, enableFp16TurboMode, thresholdTime, printIntermediate,