Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: NeonLstmFloatWorkload Class Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('classarmnn_1_1_neon_lstm_float_workload.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#pub-methods">Public Member Functions</a> | |
| 85 | <a href="classarmnn_1_1_neon_lstm_float_workload-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">NeonLstmFloatWorkload Class Reference</div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="_neon_lstm_float_workload_8hpp_source.html">NeonLstmFloatWorkload.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for NeonLstmFloatWorkload:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1_neon_lstm_float_workload.png" usemap="#NeonLstmFloatWorkload_map" alt=""/> |
| 97 | <map id="NeonLstmFloatWorkload_map" name="NeonLstmFloatWorkload_map"> |
| 98 | <area href="classarmnn_1_1_typed_workload.html" alt="TypedWorkload< QueueDescriptor, DataTypes >" shape="rect" coords="0,112,246,136"/> |
| 99 | <area href="classarmnn_1_1_base_workload.html" alt="BaseWorkload< QueueDescriptor >" shape="rect" coords="0,56,246,80"/> |
| 100 | <area href="classarmnn_1_1_i_workload.html" title="Workload interface to enqueue a layer computation. " alt="IWorkload" shape="rect" coords="0,0,246,24"/> |
| 101 | </map> |
| 102 | </div></div> |
| 103 | <table class="memberdecls"> |
| 104 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 105 | Public Member Functions</h2></td></tr> |
| 106 | <tr class="memitem:a471d876fac9cbcc3347eec34e558fe46"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_lstm_float_workload.html#a471d876fac9cbcc3347eec34e558fe46">NeonLstmFloatWorkload</a> (const <a class="el" href="structarmnn_1_1_lstm_queue_descriptor.html">LstmQueueDescriptor</a> &descriptor, const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> &<a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>)</td></tr> |
| 107 | <tr class="separator:a471d876fac9cbcc3347eec34e558fe46"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:ae071e8822437c78baea75c3aef3a263a"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_lstm_float_workload.html#ae071e8822437c78baea75c3aef3a263a">Execute</a> () const override</td></tr> |
| 109 | <tr class="separator:ae071e8822437c78baea75c3aef3a263a"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="inherit_header pub_methods_classarmnn_1_1_typed_workload"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1_typed_workload')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1_typed_workload.html">TypedWorkload< QueueDescriptor, DataTypes ></a></td></tr> |
| 111 | <tr class="memitem:aa617fec9998f9650150a758b68498865 inherit pub_methods_classarmnn_1_1_typed_workload"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_typed_workload.html#aa617fec9998f9650150a758b68498865">TypedWorkload</a> (const <a class="el" href="structarmnn_1_1_queue_descriptor.html">QueueDescriptor</a> &descriptor, const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> &<a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>)</td></tr> |
| 112 | <tr class="separator:aa617fec9998f9650150a758b68498865 inherit pub_methods_classarmnn_1_1_typed_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 113 | <tr class="inherit_header pub_methods_classarmnn_1_1_base_workload"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1_base_workload')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1_base_workload.html">BaseWorkload< QueueDescriptor ></a></td></tr> |
| 114 | <tr class="memitem:af2ef420610280dc5a661cd3d4836d5a2 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#af2ef420610280dc5a661cd3d4836d5a2">BaseWorkload</a> (const <a class="el" href="structarmnn_1_1_queue_descriptor.html">QueueDescriptor</a> &descriptor, const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> &<a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>)</td></tr> |
| 115 | <tr class="separator:af2ef420610280dc5a661cd3d4836d5a2 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="memitem:a81627f96ba06d76e147f7d392a8117ed inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a81627f96ba06d76e147f7d392a8117ed">PostAllocationConfigure</a> () override</td></tr> |
| 117 | <tr class="separator:a81627f96ba06d76e147f7d392a8117ed inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a965cf380c7adf547d0f14b3f6d1da249 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structarmnn_1_1_queue_descriptor.html">QueueDescriptor</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a965cf380c7adf547d0f14b3f6d1da249">GetData</a> () const</td></tr> |
| 119 | <tr class="separator:a965cf380c7adf547d0f14b3f6d1da249 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:a29c2c6dd77c6fe10674fc6876751cbce inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1profiling_1_1_profiling_guid.html">profiling::ProfilingGuid</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a29c2c6dd77c6fe10674fc6876751cbce">GetGuid</a> () const final</td></tr> |
| 121 | <tr class="separator:a29c2c6dd77c6fe10674fc6876751cbce inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="inherit_header pub_methods_classarmnn_1_1_i_workload"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1_i_workload')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1_i_workload.html">IWorkload</a></td></tr> |
| 123 | <tr class="memitem:a69c83c02ae8de866bc7a46c49e69c1ba inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_workload.html#a69c83c02ae8de866bc7a46c49e69c1ba">~IWorkload</a> ()</td></tr> |
| 124 | <tr class="separator:a69c83c02ae8de866bc7a46c49e69c1ba inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | <tr class="memitem:ab81312bd5e64cbae2803de9f243bdb32 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_workload.html#ab81312bd5e64cbae2803de9f243bdb32">RegisterDebugCallback</a> (const <a class="el" href="namespacearmnn.html#a15f3ad9b5e4e3d46b0a6dda246a7bc28">DebugCallbackFunction</a> &)</td></tr> |
| 126 | <tr class="separator:ab81312bd5e64cbae2803de9f243bdb32 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 127 | </table><table class="memberdecls"> |
| 128 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a> |
| 129 | Additional Inherited Members</h2></td></tr> |
| 130 | <tr class="inherit_header pro_attribs_classarmnn_1_1_base_workload"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classarmnn_1_1_base_workload')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="classarmnn_1_1_base_workload.html">BaseWorkload< QueueDescriptor ></a></td></tr> |
| 131 | <tr class="memitem:a0a487c549c63319505095b855ea3c195 inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structarmnn_1_1_queue_descriptor.html">QueueDescriptor</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a></td></tr> |
| 132 | <tr class="separator:a0a487c549c63319505095b855ea3c195 inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | <tr class="memitem:a902044db290170b8467ed4697b7fed24 inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1profiling_1_1_profiling_guid.html">profiling::ProfilingGuid</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a902044db290170b8467ed4697b7fed24">m_Guid</a></td></tr> |
| 134 | <tr class="separator:a902044db290170b8467ed4697b7fed24 inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | </table> |
| 136 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 137 | <div class="textblock"> |
| 138 | <p class="definition">Definition at line <a class="el" href="_neon_lstm_float_workload_8hpp_source.html#l00019">19</a> of file <a class="el" href="_neon_lstm_float_workload_8hpp_source.html">NeonLstmFloatWorkload.hpp</a>.</p> |
| 139 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 140 | <a id="a471d876fac9cbcc3347eec34e558fe46"></a> |
| 141 | <h2 class="memtitle"><span class="permalink"><a href="#a471d876fac9cbcc3347eec34e558fe46">◆ </a></span>NeonLstmFloatWorkload()</h2> |
| 142 | |
| 143 | <div class="memitem"> |
| 144 | <div class="memproto"> |
| 145 | <table class="memname"> |
| 146 | <tr> |
| 147 | <td class="memname"><a class="el" href="classarmnn_1_1_neon_lstm_float_workload.html">NeonLstmFloatWorkload</a> </td> |
| 148 | <td>(</td> |
| 149 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_lstm_queue_descriptor.html">LstmQueueDescriptor</a> & </td> |
| 150 | <td class="paramname"><em>descriptor</em>, </td> |
| 151 | </tr> |
| 152 | <tr> |
| 153 | <td class="paramkey"></td> |
| 154 | <td></td> |
| 155 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> & </td> |
| 156 | <td class="paramname"><em>info</em> </td> |
| 157 | </tr> |
| 158 | <tr> |
| 159 | <td></td> |
| 160 | <td>)</td> |
| 161 | <td></td><td></td> |
| 162 | </tr> |
| 163 | </table> |
| 164 | </div><div class="memdoc"> |
| 165 | |
| 166 | <p class="definition">Definition at line <a class="el" href="_neon_lstm_float_workload_8cpp_source.html#l00017">17</a> of file <a class="el" href="_neon_lstm_float_workload_8cpp_source.html">NeonLstmFloatWorkload.cpp</a>.</p> |
| 167 | <div class="fragment"><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  : FloatWorkload<LstmQueueDescriptor>(descriptor, <a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>)</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  arm_compute::LSTMParams<arm_compute::ITensor> lstm_param;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="comment">// Basic parameters</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  m_InputToForgetWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  BuildArmComputeTensor(*m_InputToForgetWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToForgetWeights->GetTensorInfo());</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  m_InputToCellWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  BuildArmComputeTensor(*m_InputToCellWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToCellWeights->GetTensorInfo());</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  m_InputToOutputWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  BuildArmComputeTensor(*m_InputToOutputWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToOutputWeights->GetTensorInfo());</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  m_RecurrentToForgetWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  BuildArmComputeTensor(*m_RecurrentToForgetWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToForgetWeights->GetTensorInfo());</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  m_RecurrentToCellWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  BuildArmComputeTensor(*m_RecurrentToCellWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToCellWeights->GetTensorInfo());</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  m_RecurrentToOutputWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  BuildArmComputeTensor(*m_RecurrentToOutputWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToOutputWeights->GetTensorInfo());</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  m_ForgetGateBiasTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  BuildArmComputeTensor(*m_ForgetGateBiasTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ForgetGateBias->GetTensorInfo());</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  m_CellBiasTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  BuildArmComputeTensor(*m_CellBiasTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellBias->GetTensorInfo());</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  m_OutputGateBiasTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  BuildArmComputeTensor(*m_OutputGateBiasTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_OutputGateBias->GetTensorInfo());</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="comment">// for future reference: check the AndroidNN API for the logic here</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_CifgEnabled)</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  m_InputToInputWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  BuildArmComputeTensor(*m_InputToInputWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToInputWeights->GetTensorInfo());</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  m_RecurrentToInputWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  BuildArmComputeTensor(*m_RecurrentToInputWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToInputWeights->GetTensorInfo());</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  m_CellToInputWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToInputWeights != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  BuildArmComputeTensor(*m_CellToInputWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToInputWeights->GetTensorInfo());</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  }</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  m_InputGateBiasTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  BuildArmComputeTensor(*m_InputGateBiasTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputGateBias->GetTensorInfo());</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  lstm_param.set_cifg_params(m_InputToInputWeightsTensor.get(),</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  m_RecurrentToInputWeightsTensor.get(),</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToInputWeights != <span class="keyword">nullptr</span> ? m_CellToInputWeightsTensor.get() : <span class="keyword">nullptr</span>,</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  m_InputGateBiasTensor.get());</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ProjectionEnabled)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  m_ProjectionWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  BuildArmComputeTensor(*m_ProjectionWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionWeights->GetTensorInfo());</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  m_ProjectionBiasTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionBias != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  BuildArmComputeTensor(*m_ProjectionBiasTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionBias->GetTensorInfo());</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  lstm_param.set_projection_params(m_ProjectionWeightsTensor.get(),</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionBias != <span class="keyword">nullptr</span> ? m_ProjectionBiasTensor.get() : <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  }</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_PeepholeEnabled)</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  m_CellToForgetWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  BuildArmComputeTensor(*m_CellToForgetWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToForgetWeights->GetTensorInfo());</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  m_CellToOutputWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  BuildArmComputeTensor(*m_CellToOutputWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToOutputWeights->GetTensorInfo());</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  lstm_param.set_peephole_params(m_CellToForgetWeightsTensor.get(), m_CellToOutputWeightsTensor.get());</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_LayerNormEnabled)</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  m_InputLayerNormWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_CifgEnabled)</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  BuildArmComputeTensor(*m_InputLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputLayerNormWeights->GetTensorInfo());</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  m_ForgetLayerNormWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  BuildArmComputeTensor(*m_ForgetLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ForgetLayerNormWeights->GetTensorInfo());</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  m_CellLayerNormWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  BuildArmComputeTensor(*m_CellLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellLayerNormWeights->GetTensorInfo());</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  m_OutputLayerNormWeightsTensor = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  BuildArmComputeTensor(*m_OutputLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_OutputLayerNormWeights->GetTensorInfo());</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  lstm_param.set_layer_normalization_params(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_CifgEnabled ?</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">nullptr</span> : m_InputLayerNormWeightsTensor.get(),</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  m_ForgetLayerNormWeightsTensor.get(),</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  m_CellLayerNormWeightsTensor.get(),</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  m_OutputLayerNormWeightsTensor.get());</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  }</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keyword">const</span> arm_compute::ITensor& input = <span class="keyword">static_cast<</span>IAclTensorHandle*<span class="keyword">></span>(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>[0])->GetTensor();</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keyword">const</span> arm_compute::ITensor& output_state_in = <span class="keyword">static_cast<</span>IAclTensorHandle*<span class="keyword">></span>(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>[1])->GetTensor();</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keyword">const</span> arm_compute::ITensor& cell_state_in = <span class="keyword">static_cast<</span>IAclTensorHandle*<span class="keyword">></span>(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>[2])->GetTensor();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  arm_compute::ITensor& output_state_out = <span class="keyword">static_cast<</span>IAclTensorHandle*<span class="keyword">></span>(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>[1])->GetTensor();</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  arm_compute::ITensor& cell_state_out = <span class="keyword">static_cast<</span>IAclTensorHandle*<span class="keyword">></span>(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>[2])->GetTensor();</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  arm_compute::ITensor& output = <span class="keyword">static_cast<</span>IAclTensorHandle*<span class="keyword">></span>(<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>[3])->GetTensor();</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="comment">// Get the batch_size and the num_units from the cellStateIn dimensions</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">const</span> TensorInfo& inputTensorInfo = <a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>.m_InputTensorInfos[2];</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> batch_size = boost::numeric_cast<<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(inputTensorInfo.GetShape()[0]);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_units = boost::numeric_cast<<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(inputTensorInfo.GetShape()[1]);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> </div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  m_ScratchBuffer = std::make_unique<arm_compute::Tensor>();</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_CifgEnabled)</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  {</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="comment">// 2D tensor with dimensions [num_units * 3, batch_size] with CIFG</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> scratchBuffer1({ batch_size, num_units * 3 }, <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  BuildArmComputeTensor(*m_ScratchBuffer, scratchBuffer1);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// scratch_buffer [num_units * 4, batch_size] without CIFG</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> scratchBuffer2({ batch_size, num_units * 4 }, <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  BuildArmComputeTensor(*m_ScratchBuffer, scratchBuffer2);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordtype">float</span> cell_threshold = <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ClippingThresCell;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordtype">float</span> projection_threshold = <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ClippingThresProj;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">// for preparing the object for the class ActivationLayerInfo, we need to consider 5 situations</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  arm_compute::ActivationLayerInfo activationLayerInfo;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ActivationFunc == 0)</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  {</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="comment">// no activation, do nothing</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  }</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ActivationFunc == 1)</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  activationLayerInfo = arm_compute::ActivationLayerInfo(</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  arm_compute::ActivationLayerInfo::ActivationFunction::RELU);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  }</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ActivationFunc == 3)</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  {</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  activationLayerInfo = arm_compute::ActivationLayerInfo(</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  arm_compute::ActivationLayerInfo::ActivationFunction::BOUNDED_RELU, 6.0);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  }</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ActivationFunc == 4)</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  {</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  activationLayerInfo = arm_compute::ActivationLayerInfo(</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  arm_compute::ActivationLayerInfo::ActivationFunction::TANH, 1.0, 1.0);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  }</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ActivationFunc == 6)</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  activationLayerInfo = arm_compute::ActivationLayerInfo(</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  arm_compute::ActivationLayerInfo::ActivationFunction::LOGISTIC);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  {</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_exception.html">armnn::Exception</a>(<span class="stringliteral">"Wrong Type of Activation Function!"</span>);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  }</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  m_LstmLayer.configure(&input, m_InputToForgetWeightsTensor.get(), m_InputToCellWeightsTensor.get(),</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  m_InputToOutputWeightsTensor.get(), m_RecurrentToForgetWeightsTensor.get(),</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  m_RecurrentToCellWeightsTensor.get(), m_RecurrentToOutputWeightsTensor.get(),</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  m_ForgetGateBiasTensor.get(), m_CellBiasTensor.get(), m_OutputGateBiasTensor.get(),</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  &output_state_in, &cell_state_in, m_ScratchBuffer.get(), &output_state_out,</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  &cell_state_out, &output, lstm_param, activationLayerInfo,</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  cell_threshold, projection_threshold);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  armcomputetensorutils::InitialiseArmComputeTensorEmpty(*m_ScratchBuffer);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_InputToForgetWeightsTensor,</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToForgetWeights);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_InputToCellWeightsTensor,</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToCellWeights);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_InputToOutputWeightsTensor,</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToOutputWeights);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_RecurrentToForgetWeightsTensor,</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToForgetWeights);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_RecurrentToCellWeightsTensor,</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToCellWeights);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_RecurrentToOutputWeightsTensor,</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToOutputWeights);</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_ForgetGateBiasTensor,</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ForgetGateBias);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_CellBiasTensor,</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellBias);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_OutputGateBiasTensor,</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_OutputGateBias);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_CifgEnabled)</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  {</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_InputToInputWeightsTensor,</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputToInputWeights);</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_RecurrentToInputWeightsTensor,</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_RecurrentToInputWeights);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToInputWeights != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_CellToInputWeightsTensor,</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToInputWeights);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  }</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_InputGateBiasTensor,</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputGateBias);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  }</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span> </div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_ProjectionEnabled)</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_ProjectionWeightsTensor,</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionWeights);</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionBias != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_ProjectionBiasTensor,</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ProjectionBias);</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_PeepholeEnabled)</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_CellToForgetWeightsTensor,</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToForgetWeights);</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_CellToOutputWeightsTensor,</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellToOutputWeights);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  }</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_LayerNormEnabled)</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  {</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_Parameters.m_CifgEnabled)</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  {</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_InputLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_InputLayerNormWeights);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  }</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_ForgetLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_ForgetLayerNormWeights);</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_CellLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_CellLayerNormWeights);</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <a class="code" href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">InitializeArmComputeTensorData</a>(*m_OutputLayerNormWeightsTensor, <a class="code" href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">m_Data</a>.m_OutputLayerNormWeights);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  }</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span> </div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="comment">// Force Compute Library to perform the necessary copying and reshaping, after which</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="comment">// delete all the input tensors that will no longer be needed</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  m_LstmLayer.prepare();</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  FreeUnusedTensors();</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span> }</div><div class="ttc" id="namespacearmnn_html_a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::BoostLogSeverityMapping::info</a></div></div> |
| 168 | <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div> |
| 169 | <div class="ttc" id="namespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 170 | <div class="ttc" id="classarmnn_1_1_base_workload_html_a0a487c549c63319505095b855ea3c195"><div class="ttname"><a href="classarmnn_1_1_base_workload.html#a0a487c549c63319505095b855ea3c195">armnn::BaseWorkload::m_Data</a></div><div class="ttdeci">const QueueDescriptor m_Data</div><div class="ttdef"><b>Definition:</b> <a href="_workload_8hpp_source.html#l00046">Workload.hpp:46</a></div></div> |
| 171 | <div class="ttc" id="classarmnn_1_1_exception_html"><div class="ttname"><a href="classarmnn_1_1_exception.html">armnn::Exception</a></div><div class="ttdoc">Base class for all ArmNN exceptions so that users can filter to just those. </div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00046">Exceptions.hpp:46</a></div></div> |
| 172 | <div class="ttc" id="structarmnn_1_1_queue_descriptor_html_a6abd491bb99ffe88bd472c1ae5a1ed1a"><div class="ttname"><a href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">armnn::QueueDescriptor::m_Outputs</a></div><div class="ttdeci">std::vector< ITensorHandle * > m_Outputs</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00031">WorkloadData.hpp:31</a></div></div> |
| 173 | <div class="ttc" id="structarmnn_1_1_queue_descriptor_html_a4b50e46a6810018f3edecfb68b2a76b3"><div class="ttname"><a href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">armnn::QueueDescriptor::m_Inputs</a></div><div class="ttdeci">std::vector< ITensorHandle * > m_Inputs</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00030">WorkloadData.hpp:30</a></div></div> |
| 174 | <div class="ttc" id="namespacearmnn_html_ad9aa8d49d42ada3f757290033af39857"><div class="ttname"><a href="namespacearmnn.html#ad9aa8d49d42ada3f757290033af39857">armnn::InitializeArmComputeTensorData</a></div><div class="ttdeci">void InitializeArmComputeTensorData(arm_compute::Tensor &tensor, const ConstCpuTensorHandle *handle)</div><div class="ttdef"><b>Definition:</b> <a href="_neon_workload_utils_8hpp_source.html#l00035">NeonWorkloadUtils.hpp:35</a></div></div> |
| 175 | </div><!-- fragment --> |
| 176 | </div> |
| 177 | </div> |
| 178 | <h2 class="groupheader">Member Function Documentation</h2> |
| 179 | <a id="ae071e8822437c78baea75c3aef3a263a"></a> |
| 180 | <h2 class="memtitle"><span class="permalink"><a href="#ae071e8822437c78baea75c3aef3a263a">◆ </a></span>Execute()</h2> |
| 181 | |
| 182 | <div class="memitem"> |
| 183 | <div class="memproto"> |
| 184 | <table class="mlabels"> |
| 185 | <tr> |
| 186 | <td class="mlabels-left"> |
| 187 | <table class="memname"> |
| 188 | <tr> |
| 189 | <td class="memname">void Execute </td> |
| 190 | <td>(</td> |
| 191 | <td class="paramname"></td><td>)</td> |
| 192 | <td> const</td> |
| 193 | </tr> |
| 194 | </table> |
| 195 | </td> |
| 196 | <td class="mlabels-right"> |
| 197 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 198 | </tr> |
| 199 | </table> |
| 200 | </div><div class="memdoc"> |
| 201 | |
| 202 | <p>Implements <a class="el" href="classarmnn_1_1_i_workload.html#a72ae00e6604850c8798c5e0d825ee7e4">IWorkload</a>.</p> |
| 203 | |
| 204 | <p class="definition">Definition at line <a class="el" href="_neon_lstm_float_workload_8cpp_source.html#l00266">266</a> of file <a class="el" href="_neon_lstm_float_workload_8cpp_source.html">NeonLstmFloatWorkload.cpp</a>.</p> |
| 205 | <div class="fragment"><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> {</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  m_LstmLayer.run();</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> }</div></div><!-- fragment --> |
| 206 | </div> |
| 207 | </div> |
| 208 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 209 | <li>src/backends/neon/workloads/<a class="el" href="_neon_lstm_float_workload_8hpp_source.html">NeonLstmFloatWorkload.hpp</a></li> |
| 210 | <li>src/backends/neon/workloads/<a class="el" href="_neon_lstm_float_workload_8cpp_source.html">NeonLstmFloatWorkload.cpp</a></li> |
| 211 | </ul> |
| 212 | </div><!-- contents --> |
| 213 | </div><!-- doc-content --> |
| 214 | <!-- start footer part --> |
| 215 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 216 | <ul> |
| 217 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_neon_lstm_float_workload.html">NeonLstmFloatWorkload</a></li> |
| 218 | <li class="footer">Generated on Fri Mar 13 2020 16:07:04 for ArmNN by |
| 219 | <a href="http://www.doxygen.org/index.html"> |
| 220 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 221 | </ul> |
| 222 | </div> |
| 223 | </body> |
| 224 | </html> |