aboutsummaryrefslogtreecommitdiff
path: root/tests/ExecuteNetwork
diff options
context:
space:
mode:
authorMatthew Jackson <matthew.jackson@arm.com>2019-08-27 15:35:59 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-08-28 14:07:28 +0000
commit54658b9c8cc27d513f35e078b8586767262d07f2 (patch)
tree78af07b574caf9b9476551c894fc8f03e56df95a /tests/ExecuteNetwork
parente89ebad9cd78096d9c18a28fa01337dd622f5081 (diff)
downloadarmnn-54658b9c8cc27d513f35e078b8586767262d07f2.tar.gz
IVGCVSW-3675 Add ExecuteNetwork option to print intermediate layers
Signed-off-by: Matthew Jackson <matthew.jackson@arm.com> Change-Id: Id7ab186ec607ff6e5ee6869c4ad562af4c40b97a
Diffstat (limited to 'tests/ExecuteNetwork')
-rw-r--r--tests/ExecuteNetwork/ExecuteNetwork.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index 1a0306244b..bccd50d929 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -87,7 +87,9 @@ int main(int argc, const char* argv[])
("threshold-time,r", po::value<double>(&thresholdTime)->default_value(0.0),
"Threshold time is the maximum allowed time for inference measured in milliseconds. If the actual "
"inference time is greater than the threshold time, the test will fail. By default, no threshold "
- "time is used.");
+ "time is used.")
+ ("print-intermediate-layers,p", po::bool_switch()->default_value(false),
+ "If this option is enabled, the output of every graph layer will be printed.");
}
catch (const std::exception& e)
{
@@ -128,6 +130,7 @@ int main(int argc, const char* argv[])
bool enableProfiling = vm["event-based-profiling"].as<bool>();
bool enableFp16TurboMode = vm["fp16-turbo-mode"].as<bool>();
bool quantizeInput = vm["quantize-input"].as<bool>();
+ bool printIntermediate = vm["print-intermediate-layers"].as<bool>();
// Check whether we have to load test cases from a file.
if (CheckOption(vm, "test-cases"))
@@ -169,7 +172,7 @@ int main(int argc, const char* argv[])
{
testCase.values.insert(testCase.values.begin(), executableName);
results.push_back(std::async(std::launch::async, RunCsvTest, std::cref(testCase), std::cref(runtime),
- enableProfiling, enableFp16TurboMode, thresholdTime));
+ enableProfiling, enableFp16TurboMode, thresholdTime, printIntermediate));
}
// Check results
@@ -187,7 +190,8 @@ int main(int argc, const char* argv[])
for (auto& testCase : testCases)
{
testCase.values.insert(testCase.values.begin(), executableName);
- if (RunCsvTest(testCase, runtime, enableProfiling, enableFp16TurboMode, thresholdTime) != EXIT_SUCCESS)
+ if (RunCsvTest(testCase, runtime, enableProfiling,
+ enableFp16TurboMode, thresholdTime, printIntermediate) != EXIT_SUCCESS)
{
return EXIT_FAILURE;
}
@@ -222,6 +226,6 @@ int main(int argc, const char* argv[])
return RunTest(modelFormat, inputTensorShapes, computeDevices, dynamicBackendsPath, modelPath, inputNames,
inputTensorDataFilePaths, inputTypes, quantizeInput, outputTypes, outputNames,
- enableProfiling, enableFp16TurboMode, thresholdTime, subgraphId);
+ enableProfiling, enableFp16TurboMode, thresholdTime, printIntermediate, subgraphId);
}
}