aboutsummaryrefslogtreecommitdiff
path: root/20.02/_execute_network_8cpp_source.xhtml
diff options
context:
space:
mode:
Diffstat (limited to '20.02/_execute_network_8cpp_source.xhtml')
-rw-r--r--20.02/_execute_network_8cpp_source.xhtml136
1 files changed, 136 insertions, 0 deletions
diff --git a/20.02/_execute_network_8cpp_source.xhtml b/20.02/_execute_network_8cpp_source.xhtml
new file mode 100644
index 0000000000..943a2315fd
--- /dev/null
+++ b/20.02/_execute_network_8cpp_source.xhtml
@@ -0,0 +1,136 @@
+<!-- Copyright (c) 2020 ARM Limited. -->
+<!-- -->
+<!-- SPDX-License-Identifier: MIT -->
+<!-- -->
+<!-- HTML header for doxygen 1.8.13-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="robots" content="NOINDEX, NOFOLLOW" />
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>ArmNN: tests/ExecuteNetwork/ExecuteNetwork.cpp Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+ $(document).ready(initResizable);
+</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js"],
+ jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/>
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">
+ &#160;<span id="projectnumber">20.02</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+ <div id="nav-tree">
+ <div id="nav-tree-contents">
+ <div id="nav-sync" class="sync"></div>
+ </div>
+ </div>
+ <div id="splitbar" style="-moz-user-select:none;"
+ class="ui-resizable-handle">
+ </div>
+</div>
+<script type="text/javascript">
+$(document).ready(function(){initNavTree('_execute_network_8cpp_source.xhtml','');});
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">ExecuteNetwork.cpp</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="_execute_network_8cpp.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Copyright © 2017 Arm Ltd. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &quot;../NetworkExecutionUtils/NetworkExecutionUtils.hpp&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">// MAIN</span></div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="_execute_network_8cpp.xhtml#ac0f2228420376f4db7e1274f2b41667c"> 9</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="_execute_network_8cpp.xhtml#ac0f2228420376f4db7e1274f2b41667c">main</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span>* argv[])</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;{</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; <span class="comment">// Configures logging for both the ARMNN library and this test program.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#ifdef NDEBUG</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; <a class="code" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a> level = <a class="code" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875">armnn::LogSeverity::Info</a>;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <a class="code" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a> level = <a class="code" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::LogSeverity::Debug</a>;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; <a class="code" href="namespacearmnn.xhtml#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a>(<span class="keyword">true</span>, <span class="keyword">true</span>, level);</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; std::string testCasesFile;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; std::string modelFormat;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; std::string modelPath;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; std::string inputNames;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; std::string inputTensorShapes;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; std::string inputTensorDataFilePaths;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160; std::string outputNames;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; std::string inputTypes;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; std::string outputTypes;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; std::string dynamicBackendsPath;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; std::string outputTensorFiles;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="comment">// external profiling parameters</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; std::string outgoingCaptureFile;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; std::string incomingCaptureFile;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; uint32_t counterCapturePeriod;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordtype">double</span> thresholdTime = 0.0;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordtype">size_t</span> subgraphId = 0;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keyword">const</span> std::string backendsMessage = <span class="stringliteral">&quot;REQUIRED: Which device to run layers on by default. Possible choices: &quot;</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; + <a class="code" href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a>().<a class="code" href="classarmnn_1_1_backend_registry.xhtml#ae1de2f7ca1db17f45f97155e239b8b45">GetBackendIdsAsString</a>();</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; po::options_description desc(<span class="stringliteral">&quot;Options&quot;</span>);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordflow">try</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; desc.add_options()</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; (<span class="stringliteral">&quot;help&quot;</span>, <span class="stringliteral">&quot;Display usage information&quot;</span>)</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; (<span class="stringliteral">&quot;compute,c&quot;</span>, po::value&lt;std::vector&lt;std::string&gt;&gt;()-&gt;multitoken()-&gt;required(),</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; backendsMessage.c_str())</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; (<span class="stringliteral">&quot;test-cases,t&quot;</span>, po::value(&amp;testCasesFile), <span class="stringliteral">&quot;Path to a CSV file containing test cases to run. &quot;</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="stringliteral">&quot;If set, further parameters -- with the exception of compute device and concurrency -- will be ignored, &quot;</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="stringliteral">&quot;as they are expected to be defined in the file for each test in particular.&quot;</span>)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; (<span class="stringliteral">&quot;concurrent,n&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="stringliteral">&quot;Whether or not the test cases should be executed in parallel&quot;</span>)</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; (<span class="stringliteral">&quot;model-format,f&quot;</span>, po::value(&amp;modelFormat)-&gt;required(),</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="stringliteral">&quot;armnn-binary, caffe-binary, caffe-text, onnx-binary, onnx-text, tflite-binary, tensorflow-binary or &quot;</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="stringliteral">&quot;tensorflow-text.&quot;</span>)</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; (<span class="stringliteral">&quot;model-path,m&quot;</span>, po::value(&amp;modelPath)-&gt;required(), <span class="stringliteral">&quot;Path to model file, e.g. .armnn, .caffemodel, &quot;</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="stringliteral">&quot;.prototxt, .tflite, .onnx&quot;</span>)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; (<span class="stringliteral">&quot;dynamic-backends-path,b&quot;</span>, po::value(&amp;dynamicBackendsPath),</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="stringliteral">&quot;Path where to load any available dynamic backend from. &quot;</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="stringliteral">&quot;If left empty (the default), dynamic backends will not be used.&quot;</span>)</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; (<span class="stringliteral">&quot;input-name,i&quot;</span>, po::value(&amp;inputNames),</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="stringliteral">&quot;Identifier of the input tensors in the network separated by comma.&quot;</span>)</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; (<span class="stringliteral">&quot;subgraph-number,x&quot;</span>, po::value&lt;size_t&gt;(&amp;subgraphId)-&gt;default_value(0), <span class="stringliteral">&quot;Id of the subgraph to be executed.&quot;</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="stringliteral">&quot;Defaults to 0&quot;</span>)</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; (<span class="stringliteral">&quot;input-tensor-shape,s&quot;</span>, po::value(&amp;inputTensorShapes),</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="stringliteral">&quot;The shape of the input tensors in the network as a flat array of integers separated by comma.&quot;</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="stringliteral">&quot;Several shapes can be passed by separating them with a colon (:).&quot;</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="stringliteral">&quot;This parameter is optional, depending on the network.&quot;</span>)</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; (<span class="stringliteral">&quot;input-tensor-data,d&quot;</span>, po::value(&amp;inputTensorDataFilePaths)-&gt;default_value(<span class="stringliteral">&quot;&quot;</span>),</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="stringliteral">&quot;Path to files containing the input data as a flat array separated by whitespace. &quot;</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="stringliteral">&quot;Several paths can be passed by separating them with a comma. If not specified, the network will be run &quot;</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="stringliteral">&quot;with dummy data (useful for profiling).&quot;</span>)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; (<span class="stringliteral">&quot;input-type,y&quot;</span>,po::value(&amp;inputTypes), <span class="stringliteral">&quot;The type of the input tensors in the network separated by comma. &quot;</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="stringliteral">&quot;If unset, defaults to \&quot;float\&quot; for all defined inputs. &quot;</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="stringliteral">&quot;Accepted values (float, int or qasymm8)&quot;</span>)</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; (<span class="stringliteral">&quot;quantize-input,q&quot;</span>,po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="stringliteral">&quot;If this option is enabled, all float inputs will be quantized to qasymm8. &quot;</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="stringliteral">&quot;If unset, default to not quantized. &quot;</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="stringliteral">&quot;Accepted values (true or false)&quot;</span>)</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; (<span class="stringliteral">&quot;output-type,z&quot;</span>,po::value(&amp;outputTypes),</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="stringliteral">&quot;The type of the output tensors in the network separated by comma. &quot;</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="stringliteral">&quot;If unset, defaults to \&quot;float\&quot; for all defined outputs. &quot;</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="stringliteral">&quot;Accepted values (float, int or qasymm8).&quot;</span>)</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; (<span class="stringliteral">&quot;dequantize-output,l&quot;</span>,po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="stringliteral">&quot;If this option is enabled, all quantized outputs will be dequantized to float. &quot;</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="stringliteral">&quot;If unset, default to not get dequantized. &quot;</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="stringliteral">&quot;Accepted values (true or false)&quot;</span>)</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; (<span class="stringliteral">&quot;output-name,o&quot;</span>, po::value(&amp;outputNames),</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="stringliteral">&quot;Identifier of the output tensors in the network separated by comma.&quot;</span>)</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; (<span class="stringliteral">&quot;write-outputs-to-file,w&quot;</span>, po::value(&amp;outputTensorFiles),</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="stringliteral">&quot;Comma-separated list of output file paths keyed with the binding-id of the output slot. &quot;</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="stringliteral">&quot;If left empty (the default), the output tensors will not be written to a file.&quot;</span>)</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; (<span class="stringliteral">&quot;event-based-profiling,e&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="stringliteral">&quot;Enables built in profiler. If unset, defaults to off.&quot;</span>)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; (<span class="stringliteral">&quot;visualize-optimized-model,v&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="stringliteral">&quot;Enables built optimized model visualizer. If unset, defaults to off.&quot;</span>)</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; (<span class="stringliteral">&quot;fp16-turbo-mode,h&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>), <span class="stringliteral">&quot;If this option is enabled, FP32 layers, &quot;</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="stringliteral">&quot;weights and biases will be converted to FP16 where the backend supports it&quot;</span>)</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; (<span class="stringliteral">&quot;threshold-time,r&quot;</span>, po::value&lt;double&gt;(&amp;thresholdTime)-&gt;default_value(0.0),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="stringliteral">&quot;Threshold time is the maximum allowed time for inference measured in milliseconds. If the actual &quot;</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="stringliteral">&quot;inference time is greater than the threshold time, the test will fail. By default, no threshold &quot;</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="stringliteral">&quot;time is used.&quot;</span>)</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; (<span class="stringliteral">&quot;print-intermediate-layers,p&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="stringliteral">&quot;If this option is enabled, the output of every graph layer will be printed.&quot;</span>)</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; (<span class="stringliteral">&quot;enable-external-profiling,a&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="stringliteral">&quot;If enabled external profiling will be switched on&quot;</span>)</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; (<span class="stringliteral">&quot;outgoing-capture-file,j&quot;</span>, po::value(&amp;outgoingCaptureFile),</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="stringliteral">&quot;If specified the outgoing external profiling packets will be captured in this binary file&quot;</span>)</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; (<span class="stringliteral">&quot;incoming-capture-file,k&quot;</span>, po::value(&amp;incomingCaptureFile),</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="stringliteral">&quot;If specified the incoming external profiling packets will be captured in this binary file&quot;</span>)</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; (<span class="stringliteral">&quot;file-only-external-profiling,g&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="stringliteral">&quot;If enabled then the &#39;file-only&#39; test mode of external profiling will be enabled&quot;</span>)</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; (<span class="stringliteral">&quot;counter-capture-period,u&quot;</span>, po::value&lt;uint32_t&gt;(&amp;counterCapturePeriod)-&gt;default_value(150u),</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="stringliteral">&quot;If profiling is enabled in &#39;file-only&#39; mode this is the capture period that will be used in the test&quot;</span>)</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; (<span class="stringliteral">&quot;parse-unsupported&quot;</span>, po::bool_switch()-&gt;default_value(<span class="keyword">false</span>),</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="stringliteral">&quot;Add unsupported operators as stand-in layers (where supported by parser)&quot;</span>);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e)</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="comment">// Coverity points out that default_value(...) can throw a bad_lexical_cast,</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <span class="comment">// and that desc.add_options() can throw boost::io::too_few_args.</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// They really won&#39;t in any of these cases.</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; BOOST_ASSERT_MSG(<span class="keyword">false</span>, <span class="stringliteral">&quot;Caught unexpected exception&quot;</span>);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) &lt;&lt; <span class="stringliteral">&quot;Fatal internal error: &quot;</span> &lt;&lt; e.what();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; }</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="comment">// Parses the command-line.</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; po::variables_map vm;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordflow">try</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; {</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; po::store(po::parse_command_line(argc, argv, desc), vm);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordflow">if</span> (CheckOption(vm, <span class="stringliteral">&quot;help&quot;</span>) || argc &lt;= 1)</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; {</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Executes a neural network model using the provided input tensor. &quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Prints the resulting output tensor.&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; std::cout &lt;&lt; std::endl;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; std::cout &lt;&lt; desc &lt;&lt; std::endl;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">return</span> EXIT_SUCCESS;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; po::notify(vm);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">catch</span> (<span class="keyword">const</span> po::error&amp; e)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; std::cerr &lt;&lt; e.what() &lt;&lt; std::endl &lt;&lt; std::endl;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; std::cerr &lt;&lt; desc &lt;&lt; std::endl;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="comment">// Get the value of the switch arguments.</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordtype">bool</span> concurrent = vm[<span class="stringliteral">&quot;concurrent&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keywordtype">bool</span> enableProfiling = vm[<span class="stringliteral">&quot;event-based-profiling&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; <span class="keywordtype">bool</span> enableLayerDetails = vm[<span class="stringliteral">&quot;visualize-optimized-model&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordtype">bool</span> enableFp16TurboMode = vm[<span class="stringliteral">&quot;fp16-turbo-mode&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordtype">bool</span> quantizeInput = vm[<span class="stringliteral">&quot;quantize-input&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordtype">bool</span> dequantizeOutput = vm[<span class="stringliteral">&quot;dequantize-output&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keywordtype">bool</span> printIntermediate = vm[<span class="stringliteral">&quot;print-intermediate-layers&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keywordtype">bool</span> enableExternalProfiling = vm[<span class="stringliteral">&quot;enable-external-profiling&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordtype">bool</span> fileOnlyExternalProfiling = vm[<span class="stringliteral">&quot;file-only-external-profiling&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordtype">bool</span> parseUnsupported = vm[<span class="stringliteral">&quot;parse-unsupported&quot;</span>].as&lt;<span class="keywordtype">bool</span>&gt;();</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="comment">// Check whether we have to load test cases from a file.</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <span class="keywordflow">if</span> (CheckOption(vm, <span class="stringliteral">&quot;test-cases&quot;</span>))</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; {</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">// Check that the file exists.</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="keywordflow">if</span> (!boost::filesystem::exists(testCasesFile))</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; {</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) &lt;&lt; <span class="stringliteral">&quot;Given file \&quot;&quot;</span> &lt;&lt; testCasesFile &lt;&lt; <span class="stringliteral">&quot;\&quot; does not exist&quot;</span>;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="comment">// Parse CSV file and extract test cases</span></div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <a class="code" href="classarmnn_utils_1_1_csv_reader.xhtml">armnnUtils::CsvReader</a> reader;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; std::vector&lt;armnnUtils::CsvRow&gt; testCases = reader.<a class="code" href="classarmnn_utils_1_1_csv_reader.xhtml#afe61638fbcc211b6164b563937c8dce1">ParseFile</a>(testCasesFile);</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// Check that there is at least one test case to run</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordflow">if</span> (testCases.empty())</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; {</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) &lt;&lt; <span class="stringliteral">&quot;Given file \&quot;&quot;</span> &lt;&lt; testCasesFile &lt;&lt; <span class="stringliteral">&quot;\&quot; has no test cases&quot;</span>;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; }</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="comment">// Create runtime</span></div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">armnn::IRuntime::CreationOptions</a> <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a6560146509197f3e197d8d36f76c1347">options</a>;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a2fe8c3eadf4f4f9c0c664a24a2a298f9">m_EnableGpuProfiling</a> = enableProfiling;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#ae43cf4b5df0068ee6a9151c98947248b">m_DynamicBackendsPath</a> = dynamicBackendsPath;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a26d42007440bb01a1a6d0ab3b5a657ee">m_EnableProfiling</a> = enableExternalProfiling;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a36dd18e4f73d470e3234d72198aa5fef">m_IncomingCaptureFile</a> = incomingCaptureFile;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#aa0d6aa79d683bc79d20d4ddcf7db87db">m_OutgoingCaptureFile</a> = outgoingCaptureFile;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#ad8f8cb971cad412664cd7df58df7eb1e">m_FileOnly</a> = fileOnlyExternalProfiling;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a2239347f38747f993c324bdd8b1eb146">m_CapturePeriod</a> = counterCapturePeriod;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; std::shared_ptr&lt;armnn::IRuntime&gt; runtime(<a class="code" href="classarmnn_1_1_i_runtime.xhtml#ad44ecd3700748dc30dc4bbe34ba5bde7">armnn::IRuntime::Create</a>(options));</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keyword">const</span> std::string executableName(<span class="stringliteral">&quot;ExecuteNetwork&quot;</span>);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="comment">// Check whether we need to run the test cases concurrently</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="keywordflow">if</span> (concurrent)</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; {</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; std::vector&lt;std::future&lt;int&gt;&gt; results;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; results.reserve(testCases.size());</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="comment">// Run each test case in its own thread</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; testCase : testCases)</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; {</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; testCase.values.insert(testCase.values.begin(), executableName);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; results.push_back(std::async(std::launch::async, <a class="code" href="_network_execution_utils_8hpp.xhtml#a31556a7bc4fe615f51dd68af510a9947">RunCsvTest</a>, std::cref(testCase), std::cref(runtime),</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; enableProfiling, enableFp16TurboMode, thresholdTime, printIntermediate,</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; enableLayerDetails, parseUnsupported));</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; }</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="comment">// Check results</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; result : results)</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keywordflow">if</span> (result.get() != EXIT_SUCCESS)</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; {</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; }</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; }</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; }</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; {</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="comment">// Run tests sequentially</span></div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; testCase : testCases)</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; {</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; testCase.values.insert(testCase.values.begin(), executableName);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="_network_execution_utils_8hpp.xhtml#a31556a7bc4fe615f51dd68af510a9947">RunCsvTest</a>(testCase, runtime, enableProfiling,</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; enableFp16TurboMode, thresholdTime, printIntermediate,</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; enableLayerDetails, parseUnsupported) != EXIT_SUCCESS)</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; {</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; }</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; }</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="keywordflow">return</span> EXIT_SUCCESS;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; }</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="keywordflow">else</span> <span class="comment">// Run single test</span></div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; {</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; <span class="comment">// Get the preferred order of compute devices. If none are specified, default to using CpuRef</span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="keyword">const</span> std::string computeOption(<span class="stringliteral">&quot;compute&quot;</span>);</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; std::vector&lt;std::string&gt; computeDevicesAsStrings =</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; CheckOption(vm, computeOption.c_str()) ?</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; vm[computeOption].as&lt;std::vector&lt;std::string&gt;&gt;() :</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; std::vector&lt;std::string&gt;();</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; std::vector&lt;armnn::BackendId&gt; computeDevices(computeDevicesAsStrings.begin(), computeDevicesAsStrings.end());</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="comment">// Remove duplicates from the list of compute devices.</span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; RemoveDuplicateDevices(computeDevices);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="keywordflow">try</span></div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; {</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; CheckOptionDependencies(vm);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; }</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="keywordflow">catch</span> (<span class="keyword">const</span> po::error&amp; e)</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; {</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; std::cerr &lt;&lt; e.what() &lt;&lt; std::endl &lt;&lt; std::endl;</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; std::cerr &lt;&lt; desc &lt;&lt; std::endl;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; }</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="comment">// Create runtime</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">armnn::IRuntime::CreationOptions</a> <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a6560146509197f3e197d8d36f76c1347">options</a>;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a2fe8c3eadf4f4f9c0c664a24a2a298f9">m_EnableGpuProfiling</a> = enableProfiling;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#ae43cf4b5df0068ee6a9151c98947248b">m_DynamicBackendsPath</a> = dynamicBackendsPath;</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a26d42007440bb01a1a6d0ab3b5a657ee">m_EnableProfiling</a> = enableExternalProfiling;</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a36dd18e4f73d470e3234d72198aa5fef">m_IncomingCaptureFile</a> = incomingCaptureFile;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#aa0d6aa79d683bc79d20d4ddcf7db87db">m_OutgoingCaptureFile</a> = outgoingCaptureFile;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#ad8f8cb971cad412664cd7df58df7eb1e">m_FileOnly</a> = fileOnlyExternalProfiling;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">m_ProfilingOptions</a>.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a2239347f38747f993c324bdd8b1eb146">m_CapturePeriod</a> = counterCapturePeriod;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; std::shared_ptr&lt;armnn::IRuntime&gt; runtime(<a class="code" href="classarmnn_1_1_i_runtime.xhtml#ad44ecd3700748dc30dc4bbe34ba5bde7">armnn::IRuntime::Create</a>(options));</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="keywordflow">return</span> <a class="code" href="_network_execution_utils_8hpp.xhtml#ab182729acbd2161a0358d85906d30703">RunTest</a>(modelFormat, inputTensorShapes, computeDevices, dynamicBackendsPath, modelPath, inputNames,</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; inputTensorDataFilePaths, inputTypes, quantizeInput, outputTypes, outputNames,</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; outputTensorFiles, dequantizeOutput, enableProfiling, enableFp16TurboMode, thresholdTime,</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; printIntermediate, subgraphId, enableLayerDetails, parseUnsupported, runtime);</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; }</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_runtime_xhtml_ad44ecd3700748dc30dc4bbe34ba5bde7"><div class="ttname"><a href="classarmnn_1_1_i_runtime.xhtml#ad44ecd3700748dc30dc4bbe34ba5bde7">armnn::IRuntime::Create</a></div><div class="ttdeci">static IRuntimePtr Create(const CreationOptions &amp;options)</div><div class="ttdef"><b>Definition:</b> <a href="_runtime_8cpp_source.xhtml#l00032">Runtime.cpp:32</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options_xhtml_aa0d6aa79d683bc79d20d4ddcf7db87db"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#aa0d6aa79d683bc79d20d4ddcf7db87db">armnn::IRuntime::CreationOptions::ExternalProfilingOptions::m_OutgoingCaptureFile</a></div><div class="ttdeci">std::string m_OutgoingCaptureFile</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00071">IRuntime.hpp:71</a></div></div>
+<div class="ttc" id="_network_execution_utils_8hpp_xhtml_ab182729acbd2161a0358d85906d30703"><div class="ttname"><a href="_network_execution_utils_8hpp.xhtml#ab182729acbd2161a0358d85906d30703">RunTest</a></div><div class="ttdeci">int RunTest(const std::string &amp;format, const std::string &amp;inputTensorShapesStr, const vector&lt; armnn::BackendId &gt; &amp;computeDevices, const std::string &amp;dynamicBackendsPath, const std::string &amp;path, const std::string &amp;inputNames, const std::string &amp;inputTensorDataFilePaths, const std::string &amp;inputTypes, bool quantizeInput, const std::string &amp;outputTypes, const std::string &amp;outputNames, const std::string &amp;outputTensorFiles, bool dequantizeOuput, bool enableProfiling, bool enableFp16TurboMode, const double &amp;thresholdTime, bool printIntermediate, const size_t subgraphId, bool enableLayerDetails=false, bool parseUnsupported=false, const std::shared_ptr&lt; armnn::IRuntime &gt; &amp;runtime=nullptr)</div><div class="ttdef"><b>Definition:</b> <a href="_network_execution_utils_8hpp_source.xhtml#l00537">NetworkExecutionUtils.hpp:537</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_aa59f7a819c3e29d10ffc41e5c0616872"><div class="ttname"><a href="namespacearmnn.xhtml#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a></div><div class="ttdeci">void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity)</div><div class="ttdoc">Configures the logging behaviour of the ARMNN library. </div><div class="ttdef"><b>Definition:</b> <a href="_utils_8cpp_source.xhtml#l00010">Utils.cpp:10</a></div></div>
+<div class="ttc" id="_network_execution_utils_8hpp_xhtml_a31556a7bc4fe615f51dd68af510a9947"><div class="ttname"><a href="_network_execution_utils_8hpp.xhtml#a31556a7bc4fe615f51dd68af510a9947">RunCsvTest</a></div><div class="ttdeci">int RunCsvTest(const armnnUtils::CsvRow &amp;csvRow, const std::shared_ptr&lt; armnn::IRuntime &gt; &amp;runtime, const bool enableProfiling, const bool enableFp16TurboMode, const double &amp;thresholdTime, const bool printIntermediate, bool enableLayerDetails=false, bool parseUnuspported=false)</div><div class="ttdef"><b>Definition:</b> <a href="_network_execution_utils_8hpp_source.xhtml#l00750">NetworkExecutionUtils.hpp:750</a></div></div>
+<div class="ttc" id="_logging_8hpp_xhtml_a7b6ad073975f437ec38ca7d20154727f"><div class="ttname"><a href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a></div><div class="ttdeci">#define ARMNN_LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="_logging_8hpp_source.xhtml#l00163">Logging.hpp:163</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_ac2807505b850738bc8a1991ce669dd47"><div class="ttname"><a href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a></div><div class="ttdeci">BackendRegistry &amp; BackendRegistryInstance()</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8cpp_source.xhtml#l00013">BackendRegistry.cpp:13</a></div></div>
+<div class="ttc" id="classarmnn_1_1_backend_registry_xhtml_ae1de2f7ca1db17f45f97155e239b8b45"><div class="ttname"><a href="classarmnn_1_1_backend_registry.xhtml#ae1de2f7ca1db17f45f97155e239b8b45">armnn::BackendRegistry::GetBackendIdsAsString</a></div><div class="ttdeci">std::string GetBackendIdsAsString() const</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8cpp_source.xhtml#l00076">BackendRegistry.cpp:76</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options_xhtml_a36dd18e4f73d470e3234d72198aa5fef"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a36dd18e4f73d470e3234d72198aa5fef">armnn::IRuntime::CreationOptions::ExternalProfilingOptions::m_IncomingCaptureFile</a></div><div class="ttdeci">std::string m_IncomingCaptureFile</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00072">IRuntime.hpp:72</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options_xhtml_a26d42007440bb01a1a6d0ab3b5a657ee"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a26d42007440bb01a1a6d0ab3b5a657ee">armnn::IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling</a></div><div class="ttdeci">bool m_EnableProfiling</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00070">IRuntime.hpp:70</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options_xhtml_ad8f8cb971cad412664cd7df58df7eb1e"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#ad8f8cb971cad412664cd7df58df7eb1e">armnn::IRuntime::CreationOptions::ExternalProfilingOptions::m_FileOnly</a></div><div class="ttdeci">bool m_FileOnly</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00073">IRuntime.hpp:73</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875"><div class="ttname"><a href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875">armnn::LogSeverity::Info</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba"><div class="ttname"><a href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::LogSeverity::Debug</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">armnn::IRuntime::CreationOptions</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00041">IRuntime.hpp:41</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml_ae43cf4b5df0068ee6a9151c98947248b"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#ae43cf4b5df0068ee6a9151c98947248b">armnn::IRuntime::CreationOptions::m_DynamicBackendsPath</a></div><div class="ttdeci">std::string m_DynamicBackendsPath</div><div class="ttdoc">Setting this value will override the paths set by the DYNAMIC_BACKEND_PATHS compiler directive Only a...</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00058">IRuntime.hpp:58</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml_a2fe8c3eadf4f4f9c0c664a24a2a298f9"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a2fe8c3eadf4f4f9c0c664a24a2a298f9">armnn::IRuntime::CreationOptions::m_EnableGpuProfiling</a></div><div class="ttdeci">bool m_EnableGpuProfiling</div><div class="ttdoc">Setting this flag will allow the user to obtain GPU profiling information from the runtime...</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00054">IRuntime.hpp:54</a></div></div>
+<div class="ttc" id="_execute_network_8cpp_xhtml_ac0f2228420376f4db7e1274f2b41667c"><div class="ttname"><a href="_execute_network_8cpp.xhtml#ac0f2228420376f4db7e1274f2b41667c">main</a></div><div class="ttdeci">int main(int argc, const char *argv[])</div><div class="ttdef"><b>Definition:</b> <a href="_execute_network_8cpp_source.xhtml#l00009">ExecuteNetwork.cpp:9</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options_xhtml_a2239347f38747f993c324bdd8b1eb146"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml#a2239347f38747f993c324bdd8b1eb146">armnn::IRuntime::CreationOptions::ExternalProfilingOptions::m_CapturePeriod</a></div><div class="ttdeci">uint32_t m_CapturePeriod</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00074">IRuntime.hpp:74</a></div></div>
+<div class="ttc" id="classarmnn_utils_1_1_csv_reader_xhtml"><div class="ttname"><a href="classarmnn_utils_1_1_csv_reader.xhtml">armnnUtils::CsvReader</a></div><div class="ttdef"><b>Definition:</b> <a href="_csv_reader_8hpp_source.xhtml#l00018">CsvReader.hpp:18</a></div></div>
+<div class="ttc" id="classarmnn_utils_1_1_csv_reader_xhtml_afe61638fbcc211b6164b563937c8dce1"><div class="ttname"><a href="classarmnn_utils_1_1_csv_reader.xhtml#afe61638fbcc211b6164b563937c8dce1">armnnUtils::CsvReader::ParseFile</a></div><div class="ttdeci">static std::vector&lt; CsvRow &gt; ParseFile(const std::string &amp;csvFile)</div><div class="ttdef"><b>Definition:</b> <a href="_csv_reader_8cpp_source.xhtml#l00032">CsvReader.cpp:32</a></div></div>
+<div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a6560146509197f3e197d8d36f76c1347"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a6560146509197f3e197d8d36f76c1347">options</a></div><div class="ttdeci">armnn::Runtime::CreationOptions::ExternalProfilingOptions options</div><div class="ttdef"><b>Definition:</b> <a href="_file_only_profiling_decorator_tests_8cpp_source.xhtml#l00045">FileOnlyProfilingDecoratorTests.cpp:45</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml_a30412a91cadff138686eaeb12f5357cc"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a30412a91cadff138686eaeb12f5357cc">armnn::IRuntime::CreationOptions::m_ProfilingOptions</a></div><div class="ttdeci">ExternalProfilingOptions m_ProfilingOptions</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00076">IRuntime.hpp:76</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a93a3ba385cad27c4774e5fe64c025d3d"><div class="ttname"><a href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a></div><div class="ttdeci">LogSeverity</div><div class="ttdef"><b>Definition:</b> <a href="_utils_8hpp_source.xhtml#l00012">Utils.hpp:12</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+ <ul>
+ <li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.xhtml">tests</a></li><li class="navelem"><a class="el" href="dir_3502d64799b714c597b8fa7662494b65.xhtml">ExecuteNetwork</a></li><li class="navelem"><a class="el" href="_execute_network_8cpp.xhtml">ExecuteNetwork.cpp</a></li>
+ <li class="footer">Generated on Fri Mar 13 2020 16:09:13 for ArmNN by
+ <a href="http://www.doxygen.org/index.html">
+ <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
+ </ul>
+</div>
+</body>
+</html>