blob: 8f32ea39ff566468dc32d429584dc76d0a1340ff [file] [log] [blame]
Nikhil Raj1dc83fe2024-05-16 09:47:51 +01001<!-- HTML header for doxygen 1.8.17-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
7<meta name="generator" content="Doxygen 1.8.17"/>
8<meta name="viewport" content="width=device-width, initial-scale=1"/>
9<title>Arm NN: GpuFsaPreCompiledWorkload Class Reference</title>
10<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
15<script type="text/javascript" src="navtreedata.js"></script>
16<script type="text/javascript" src="navtree.js"></script>
17<link href="search/search.css" rel="stylesheet" type="text/css"/>
18<script type="text/javascript" src="search/searchdata.js"></script>
19<script type="text/javascript" src="search/search.js"></script>
20<script type="text/x-mathjax-config">
21 MathJax.Hub.Config({
22 extensions: ["tex2jax.js"],
23 jax: ["input/TeX","output/HTML-CSS"],
24});
25</script>
26<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
27<link href="doxygen.css" rel="stylesheet" type="text/css" />
28<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
29</head>
30<body>
31<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
32<div id="titlearea">
33<table cellspacing="0" cellpadding="0">
34 <tbody>
35 <tr style="height: 56px;">
36 <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 15rem; margin-top: .5rem; margin-left 13px"/>
37 <td id="projectalign" style="padding-left: 0.9em;">
38 <div id="projectname">
39 &#160;<span id="projectnumber">24.05</span>
40 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
47<!-- Generated by Doxygen 1.8.17 -->
48<script type="text/javascript">
49/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
50var searchBox = new SearchBox("searchBox", "search",false,'Search');
51/* @license-end */
52</script>
53<script type="text/javascript" src="menudata.js"></script>
54<script type="text/javascript" src="menu.js"></script>
55<script type="text/javascript">
56/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
57$(function() {
58 initMenu('',true,false,'search.php','Search');
59 $(document).ready(function() { init_search(); });
60});
61/* @license-end */</script>
62<div id="main-nav"></div>
63</div><!-- top -->
64<div id="side-nav" class="ui-resizable side-nav-resizable">
65 <div id="nav-tree">
66 <div id="nav-tree-contents">
67 <div id="nav-sync" class="sync"></div>
68 </div>
69 </div>
70 <div id="splitbar" style="-moz-user-select:none;"
71 class="ui-resizable-handle">
72 </div>
73</div>
74<script type="text/javascript">
75/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
76$(document).ready(function(){initNavTree('classarmnn_1_1_gpu_fsa_pre_compiled_workload.html',''); initResizable(); });
77/* @license-end */
78</script>
79<div id="doc-content">
80<!-- window showing the filter options -->
81<div id="MSearchSelectWindow"
82 onmouseover="return searchBox.OnSearchSelectShow()"
83 onmouseout="return searchBox.OnSearchSelectHide()"
84 onkeydown="return searchBox.OnSearchSelectKey(event)">
85</div>
86
87<!-- iframe showing the search results (closed by default) -->
88<div id="MSearchResultsWindow">
89<iframe src="javascript:void(0)" frameborder="0"
90 name="MSearchResults" id="MSearchResults">
91</iframe>
92</div>
93
94<div class="header">
95 <div class="summary">
96<a href="#pub-methods">Public Member Functions</a> &#124;
97<a href="classarmnn_1_1_gpu_fsa_pre_compiled_workload-members.html">List of all members</a> </div>
98 <div class="headertitle">
99<div class="title">GpuFsaPreCompiledWorkload Class Reference</div> </div>
100</div><!--header-->
101<div class="contents">
102
103<p><code>#include &lt;<a class="el" href="_gpu_fsa_pre_compiled_workload_8hpp_source.html">GpuFsaPreCompiledWorkload.hpp</a>&gt;</code></p>
104<div class="dynheader">
105Inheritance diagram for GpuFsaPreCompiledWorkload:</div>
106<div class="dyncontent">
107<div class="center"><iframe scrolling="no" frameborder="0" src="classarmnn_1_1_gpu_fsa_pre_compiled_workload__inherit__graph.svg" width="430" height="294"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
108</div>
109<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
110<div class="dynheader">
111Collaboration diagram for GpuFsaPreCompiledWorkload:</div>
112<div class="dyncontent">
113<div class="center"><iframe scrolling="no" frameborder="0" src="classarmnn_1_1_gpu_fsa_pre_compiled_workload__coll__graph.svg" width="735" height="488"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
114</div>
115<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
116<table class="memberdecls">
117<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
118Public Member Functions</h2></td></tr>
119<tr class="memitem:aeef6e7488b495adc96f8abd7d29e3d5f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_gpu_fsa_pre_compiled_workload.html#aeef6e7488b495adc96f8abd7d29e3d5f">GpuFsaPreCompiledWorkload</a> (const <a class="el" href="structarmnn_1_1_pre_compiled_queue_descriptor.html">PreCompiledQueueDescriptor</a> &amp;descriptor, const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> &amp;info)</td></tr>
120<tr class="separator:aeef6e7488b495adc96f8abd7d29e3d5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
121<tr class="memitem:ae071e8822437c78baea75c3aef3a263a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_gpu_fsa_pre_compiled_workload.html#ae071e8822437c78baea75c3aef3a263a">Execute</a> () const override</td></tr>
122<tr class="separator:ae071e8822437c78baea75c3aef3a263a"><td class="memSeparator" colspan="2">&#160;</td></tr>
123<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="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarmnn_1_1_base_workload.html">BaseWorkload&lt; PreCompiledQueueDescriptor &gt;</a></td></tr>
124<tr class="memitem:af2ef420610280dc5a661cd3d4836d5a2 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">&#160;</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_pre_compiled_queue_descriptor.html">PreCompiledQueueDescriptor</a> &amp;descriptor, const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> &amp;info)</td></tr>
125<tr class="separator:af2ef420610280dc5a661cd3d4836d5a2 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
126<tr class="memitem:a163c04b26f9804eafc598a047128f887 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a163c04b26f9804eafc598a047128f887">GetName</a> () const override</td></tr>
127<tr class="separator:a163c04b26f9804eafc598a047128f887 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
128<tr class="memitem:ae1c43d025fc90382d7aff7a500937e2c inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#ae1c43d025fc90382d7aff7a500937e2c">ExecuteAsync</a> (<a class="el" href="structarmnn_1_1experimental_1_1_execution_data.html">ExecutionData</a> &amp;executionData) override</td></tr>
129<tr class="separator:ae1c43d025fc90382d7aff7a500937e2c inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<tr class="memitem:a81627f96ba06d76e147f7d392a8117ed inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a81627f96ba06d76e147f7d392a8117ed">PostAllocationConfigure</a> () override</td></tr>
131<tr class="separator:a81627f96ba06d76e147f7d392a8117ed inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
132<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_pre_compiled_queue_descriptor.html">PreCompiledQueueDescriptor</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a965cf380c7adf547d0f14b3f6d1da249">GetData</a> () const</td></tr>
133<tr class="separator:a965cf380c7adf547d0f14b3f6d1da249 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
134<tr class="memitem:aaff95a48875d8fb4a616352906660ca9 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">arm::pipe::ProfilingGuid&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#aaff95a48875d8fb4a616352906660ca9">GetGuid</a> () const final</td></tr>
135<tr class="separator:aaff95a48875d8fb4a616352906660ca9 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
136<tr class="memitem:a0c326c344355d8423217e9431781f2ee inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a0c326c344355d8423217e9431781f2ee">SupportsTensorHandleReplacement</a> () const override</td></tr>
137<tr class="separator:a0c326c344355d8423217e9431781f2ee inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
138<tr class="memitem:ab0a67f8179ddb997dda0070a6661f837 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#ab0a67f8179ddb997dda0070a6661f837">ReplaceInputTensorHandle</a> (<a class="el" href="classarmnn_1_1_i_tensor_handle.html">ITensorHandle</a> *tensorHandle, unsigned int slot) override</td></tr>
139<tr class="separator:ab0a67f8179ddb997dda0070a6661f837 inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
140<tr class="memitem:acc08590544f05c641d21c724aedf26dd inherit pub_methods_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#acc08590544f05c641d21c724aedf26dd">ReplaceOutputTensorHandle</a> (<a class="el" href="classarmnn_1_1_i_tensor_handle.html">ITensorHandle</a> *tensorHandle, unsigned int slot) override</td></tr>
141<tr class="separator:acc08590544f05c641d21c724aedf26dd inherit pub_methods_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
142<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="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarmnn_1_1_i_workload.html">IWorkload</a></td></tr>
143<tr class="memitem:a69c83c02ae8de866bc7a46c49e69c1ba inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_workload.html#a69c83c02ae8de866bc7a46c49e69c1ba">~IWorkload</a> ()</td></tr>
144<tr class="separator:a69c83c02ae8de866bc7a46c49e69c1ba inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
145<tr class="memitem:a00f887eb14b9ed163d795b31c4964965 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual arm::pipe::ProfilingGuid&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_workload.html#a00f887eb14b9ed163d795b31c4964965">GetGuid</a> () const =0</td></tr>
146<tr class="separator:a00f887eb14b9ed163d795b31c4964965 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
147<tr class="memitem:a4295bd67f063570a3a378dc2fbf16df5 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_workload.html#a4295bd67f063570a3a378dc2fbf16df5">GetName</a> () const =0</td></tr>
148<tr class="separator:a4295bd67f063570a3a378dc2fbf16df5 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
149<tr class="memitem:ab81312bd5e64cbae2803de9f243bdb32 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</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> &amp;)</td></tr>
150<tr class="separator:ab81312bd5e64cbae2803de9f243bdb32 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
151<tr class="memitem:a2d2834d1029217934f504e3e59579081 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classarmnn_1_1_optional.html">armnn::Optional</a>&lt; <a class="el" href="structarmnn_1_1_memory_requirements.html">armnn::MemoryRequirements</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_workload.html#a2d2834d1029217934f504e3e59579081">GetMemoryRequirements</a> ()</td></tr>
152<tr class="separator:a2d2834d1029217934f504e3e59579081 inherit pub_methods_classarmnn_1_1_i_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
153</table><table class="memberdecls">
154<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
155Additional Inherited Members</h2></td></tr>
156<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="-"/>&#160;Protected Attributes inherited from <a class="el" href="classarmnn_1_1_base_workload.html">BaseWorkload&lt; PreCompiledQueueDescriptor &gt;</a></td></tr>
157<tr class="memitem:afb8d2c8817c75de9d01a4c0e0d5c160b inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structarmnn_1_1_pre_compiled_queue_descriptor.html">PreCompiledQueueDescriptor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a></td></tr>
158<tr class="separator:afb8d2c8817c75de9d01a4c0e0d5c160b inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
159<tr class="memitem:a4c2b3ca86eec6c199364671af267cd2c inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">const arm::pipe::ProfilingGuid&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a4c2b3ca86eec6c199364671af267cd2c">m_Guid</a></td></tr>
160<tr class="separator:a4c2b3ca86eec6c199364671af267cd2c inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
161<tr class="memitem:a77806f89d6edb879d3f6c6b6b18168a7 inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memItemLeft" align="right" valign="top">const std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_base_workload.html#a77806f89d6edb879d3f6c6b6b18168a7">m_Name</a></td></tr>
162<tr class="separator:a77806f89d6edb879d3f6c6b6b18168a7 inherit pro_attribs_classarmnn_1_1_base_workload"><td class="memSeparator" colspan="2">&#160;</td></tr>
163</table>
164<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
165<div class="textblock">
166<p class="definition">Definition at line <a class="el" href="_gpu_fsa_pre_compiled_workload_8hpp_source.html#l00030">30</a> of file <a class="el" href="_gpu_fsa_pre_compiled_workload_8hpp_source.html">GpuFsaPreCompiledWorkload.hpp</a>.</p>
167</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
168<a id="aeef6e7488b495adc96f8abd7d29e3d5f"></a>
169<h2 class="memtitle"><span class="permalink"><a href="#aeef6e7488b495adc96f8abd7d29e3d5f">&#9670;&nbsp;</a></span>GpuFsaPreCompiledWorkload()</h2>
170
171<div class="memitem">
172<div class="memproto">
173 <table class="memname">
174 <tr>
175 <td class="memname"><a class="el" href="classarmnn_1_1_gpu_fsa_pre_compiled_workload.html">GpuFsaPreCompiledWorkload</a> </td>
176 <td>(</td>
177 <td class="paramtype">const <a class="el" href="structarmnn_1_1_pre_compiled_queue_descriptor.html">PreCompiledQueueDescriptor</a> &amp;&#160;</td>
178 <td class="paramname"><em>descriptor</em>, </td>
179 </tr>
180 <tr>
181 <td class="paramkey"></td>
182 <td></td>
183 <td class="paramtype">const <a class="el" href="structarmnn_1_1_workload_info.html">WorkloadInfo</a> &amp;&#160;</td>
184 <td class="paramname"><em>info</em>&#160;</td>
185 </tr>
186 <tr>
187 <td></td>
188 <td>)</td>
189 <td></td><td></td>
190 </tr>
191 </table>
192</div><div class="memdoc">
193
194<p class="definition">Definition at line <a class="el" href="_gpu_fsa_pre_compiled_workload_8cpp_source.html#l00031">31</a> of file <a class="el" href="_gpu_fsa_pre_compiled_workload_8cpp_source.html">GpuFsaPreCompiledWorkload.cpp</a>.</p>
195<div class="fragment"><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; : BaseWorkload&lt;PreCompiledQueueDescriptor&gt;(descriptor, info), m_workloadInfo(info)</div>
196<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;{</div>
197<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="comment">// Check that the workload is holding a pointer to a valid pre-compiled object</span></div>
198<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keywordflow">if</span> (<a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_pre_compiled_queue_descriptor.html#aa1fedd1a6371526cb68cc5cc58c87465">m_PreCompiledObject</a> == <span class="keyword">nullptr</span>)</div>
199<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; {</div>
200<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keywordflow">throw</span> InvalidArgumentException(</div>
201<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="stringliteral">&quot;GpuFsaPrecompiledWorkload requires a valid pre-compiled object (GpuWorkloadSketch).&quot;</span>);</div>
202<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; }</div>
203<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;}</div>
204</div><!-- fragment -->
205<p class="reference">References <a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::info</a>, <a class="el" href="_workload_8hpp_source.html#l00089">BaseWorkload&lt; PreCompiledQueueDescriptor &gt;::m_Data</a>, and <a class="el" href="_workload_data_8hpp_source.html#l00519">PreCompiledQueueDescriptor::m_PreCompiledObject</a>.</p>
206
207</div>
208</div>
209<h2 class="groupheader">Member Function Documentation</h2>
210<a id="ae071e8822437c78baea75c3aef3a263a"></a>
211<h2 class="memtitle"><span class="permalink"><a href="#ae071e8822437c78baea75c3aef3a263a">&#9670;&nbsp;</a></span>Execute()</h2>
212
213<div class="memitem">
214<div class="memproto">
215<table class="mlabels">
216 <tr>
217 <td class="mlabels-left">
218 <table class="memname">
219 <tr>
220 <td class="memname">void Execute </td>
221 <td>(</td>
222 <td class="paramname"></td><td>)</td>
223 <td> const</td>
224 </tr>
225 </table>
226 </td>
227 <td class="mlabels-right">
228<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
229 </tr>
230</table>
231</div><div class="memdoc">
232
233<p>Implements <a class="el" href="classarmnn_1_1_i_workload.html#a72ae00e6604850c8798c5e0d825ee7e4">IWorkload</a>.</p>
234
235<p class="definition">Definition at line <a class="el" href="_gpu_fsa_pre_compiled_workload_8cpp_source.html#l00043">43</a> of file <a class="el" href="_gpu_fsa_pre_compiled_workload_8cpp_source.html">GpuFsaPreCompiledWorkload.cpp</a>.</p>
236<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;{</div>
237<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="comment">/*</span></div>
238<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="comment"> * The Execute function of the GpuFsa Backends PreCompiled workload needs to jump through various hoops in order to</span></div>
239<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="comment"> * create a valid sketch and runtime that can execute the kernel</span></div>
240<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment"> * First we need all of the data stored within the PreCompiled blob which was used to setup the workload, namely:</span></div>
241<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment"> * The GpuWorkloadContext, this is a context which contains the TensorInfos and is unique to the graph being run</span></div>
242<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment"> * The Sketch, this can contain one or many ops and acts as a subgraph within the context</span></div>
243<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment"> * The inputTensorInfos / outputTensorInfos, These are vectors containing the TensorInfos used when creating the sketch</span></div>
244<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="comment"> *</span></div>
245<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment"> * It is very important that the Tensors passed into the Runtime being used to execute this sketch are created with</span></div>
246<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="comment"> * the same TensorInfos as used when creating the sketch. We do this by creating new tensors, getting the original</span></div>
247<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment"> * TensorInfos from the vectors of tensorInfos stored in the blob, and then importing the buffers from our own</span></div>
248<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment"> * TensorHandles directly into these newly created Tensors. This allows us to link the externally visible Tensors</span></div>
249<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="comment"> * from ArmNN to the Tensors which are needed to execute with the Sketch.</span></div>
250<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment"> *</span></div>
251<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="comment"> */</span></div>
252<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keyword">using namespace </span>arm_compute::experimental::dynamic_fusion;</div>
253<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="comment">// Get the runtime and configure it with the precompiled sketch</span></div>
254<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; ClWorkloadRuntime runtime;</div>
255<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; GpuFsaPreCompiledBlob *preCompiledBlob = <span class="keyword">static_cast&lt;</span>GpuFsaPreCompiledBlob*<span class="keyword">&gt;</span>(<a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_pre_compiled_queue_descriptor.html#aa1fedd1a6371526cb68cc5cc58c87465">m_PreCompiledObject</a>);</div>
256<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">auto</span> sketch = preCompiledBlob-&gt;sketch.release();</div>
257<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keyword">auto</span> status = runtime.configure(*sketch);</div>
258<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; </div>
259<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="comment">// Get the TensorInfos stored within the PreCompiledBlob and check they&#39;re the right size</span></div>
260<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keyword">auto</span> inputTensorInfos = preCompiledBlob-&gt;inputTensorInfos.get();</div>
261<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keyword">auto</span> outputTensorInfos = preCompiledBlob-&gt;outputTensorInfos.get();</div>
262<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">if</span> (inputTensorInfos-&gt;size() != <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>.size())</div>
263<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; {</div>
264<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">throw</span> InvalidArgumentException(fmt::format(<span class="stringliteral">&quot;GpuFsaPreCompiledWorkload::Execute: The number of inputTensorInfos&quot;</span></div>
265<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="stringliteral">&quot; {} does not match the number of inputs {}.&quot;</span>,</div>
266<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; inputTensorInfos-&gt;size(), <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>.size()));</div>
267<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div>
268<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">if</span> (outputTensorInfos-&gt;size() != <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>.size())</div>
269<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div>
270<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">throw</span> InvalidArgumentException(fmt::format(<span class="stringliteral">&quot;GpuFsaPreCompiledWorkload::Execute: The number of outputTensorInfos&quot;</span></div>
271<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="stringliteral">&quot; {} does not match the number of outputs {}.&quot;</span>,</div>
272<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; outputTensorInfos-&gt;size(), <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>.size()));</div>
273<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div>
274<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; </div>
275<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// (Important) Allocate auxiliary tensor memory if there are any</span></div>
276<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">auto</span> &amp;data : runtime.get_auxiliary_tensors())</div>
277<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; {</div>
278<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; arm_compute::CLTensor* tensor = std::get&lt;0&gt;(data);</div>
279<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; arm_compute::TensorInfo <a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a> = std::get&lt;1&gt;(data);</div>
280<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; arm_compute::experimental::dynamic_fusion::AuxMemoryInfo aux_mem_req = std::get&lt;2&gt;(data);</div>
281<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; tensor-&gt;allocator()-&gt;init(info, aux_mem_req.alignment);</div>
282<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; tensor-&gt;allocator()-&gt;allocate(); <span class="comment">// Use ACL allocated memory</span></div>
283<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; }</div>
284<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; </div>
285<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="comment">// Create and initialize user tensors</span></div>
286<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; std::vector&lt;arm_compute::CLTensor*&gt; inputsWeightsOutputs;</div>
287<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; inputsWeightsOutputs.reserve(<a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>.size() + <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>.size());</div>
288<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; </div>
289<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keywordflow">for</span> (uint32_t inputSlotIdx = 0; inputSlotIdx &lt; <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>.size(); ++inputSlotIdx)</div>
290<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; {</div>
291<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; arm_compute::CLTensor* input = <span class="keyword">new</span> arm_compute::CLTensor{};</div>
292<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">// inputTensorInfos is a ptr to a vector of ptrs, so we need to do a double dereference</span></div>
293<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; input-&gt;allocator()-&gt;init(*((*inputTensorInfos)[inputSlotIdx]));</div>
294<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keyword">auto</span>* inputHandle = PolymorphicDowncast&lt;GpuFsaTensorHandle*&gt;(<a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a4b50e46a6810018f3edecfb68b2a76b3">m_Inputs</a>[inputSlotIdx]);</div>
295<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; input-&gt;allocator()-&gt;import_memory(inputHandle-&gt;GetTensor().cl_buffer());</div>
296<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; inputsWeightsOutputs.emplace_back(std::move(input));</div>
297<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; }</div>
298<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="comment">// Set the outputs</span></div>
299<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="keywordflow">for</span> (uint32_t outputSlotIdx = 0; outputSlotIdx &lt; <a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>.size(); ++outputSlotIdx)</div>
300<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; {</div>
301<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; arm_compute::CLTensor* output = <span class="keyword">new</span> arm_compute::CLTensor{};</div>
302<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// outputTensorInfos is a ptr to a vector of ptrs, so we need to do a double dereference</span></div>
303<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; output-&gt;allocator()-&gt;init(*((*outputTensorInfos)[outputSlotIdx]));</div>
304<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keyword">auto</span>* outputHandle = PolymorphicDowncast&lt;GpuFsaTensorHandle*&gt;(<a class="code" href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">m_Data</a>.<a class="code" href="structarmnn_1_1_queue_descriptor.html#a6abd491bb99ffe88bd472c1ae5a1ed1a">m_Outputs</a>[outputSlotIdx]);</div>
305<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; output-&gt;allocator()-&gt;import_memory(outputHandle-&gt;GetTensor().cl_buffer());</div>
306<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; inputsWeightsOutputs.emplace_back(std::move(output));</div>
307<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; }</div>
308<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; runtime.run(inputsWeightsOutputs);</div>
309<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;}</div>
310</div><!-- fragment -->
311<p class="reference">References <a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::info</a>, <a class="el" href="_gpu_fsa_backend_8hpp_source.html#l00037">GpuFsaPreCompiledBlob::inputTensorInfos</a>, <a class="el" href="_workload_8hpp_source.html#l00089">BaseWorkload&lt; PreCompiledQueueDescriptor &gt;::m_Data</a>, <a class="el" href="_workload_data_8hpp_source.html#l00026">QueueDescriptor::m_Inputs</a>, <a class="el" href="_workload_data_8hpp_source.html#l00027">QueueDescriptor::m_Outputs</a>, <a class="el" href="_workload_data_8hpp_source.html#l00519">PreCompiledQueueDescriptor::m_PreCompiledObject</a>, <a class="el" href="_gpu_fsa_backend_8hpp_source.html#l00038">GpuFsaPreCompiledBlob::outputTensorInfos</a>, and <a class="el" href="_gpu_fsa_backend_8hpp_source.html#l00034">GpuFsaPreCompiledBlob::sketch</a>.</p>
312
313</div>
314</div>
315<hr/>The documentation for this class was generated from the following files:<ul>
316<li>src/backends/gpuFsa/workloads/<a class="el" href="_gpu_fsa_pre_compiled_workload_8hpp_source.html">GpuFsaPreCompiledWorkload.hpp</a></li>
317<li>src/backends/gpuFsa/workloads/<a class="el" href="_gpu_fsa_pre_compiled_workload_8cpp_source.html">GpuFsaPreCompiledWorkload.cpp</a></li>
318</ul>
319</div><!-- contents -->
320</div><!-- doc-content -->
321<div class="ttc" id="astructarmnn_1_1_pre_compiled_queue_descriptor_html_aa1fedd1a6371526cb68cc5cc58c87465"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_queue_descriptor.html#aa1fedd1a6371526cb68cc5cc58c87465">armnn::PreCompiledQueueDescriptor::m_PreCompiledObject</a></div><div class="ttdeci">void * m_PreCompiledObject</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00519">WorkloadData.hpp:519</a></div></div>
322<div class="ttc" id="anamespacearmnn_html_a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::BoostLogSeverityMapping::info</a></div><div class="ttdeci">@ info</div></div>
323<div class="ttc" id="astructarmnn_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&lt; ITensorHandle * &gt; m_Outputs</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00027">WorkloadData.hpp:27</a></div></div>
324<div class="ttc" id="aclassarmnn_1_1_base_workload_html_afb8d2c8817c75de9d01a4c0e0d5c160b"><div class="ttname"><a href="classarmnn_1_1_base_workload.html#afb8d2c8817c75de9d01a4c0e0d5c160b">armnn::BaseWorkload&lt; PreCompiledQueueDescriptor &gt;::m_Data</a></div><div class="ttdeci">PreCompiledQueueDescriptor m_Data</div><div class="ttdef"><b>Definition:</b> <a href="_workload_8hpp_source.html#l00089">Workload.hpp:89</a></div></div>
325<div class="ttc" id="astructarmnn_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&lt; ITensorHandle * &gt; m_Inputs</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00026">WorkloadData.hpp:26</a></div></div>
326<!-- start footer part -->
327<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
328 <ul>
329 <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_gpu_fsa_pre_compiled_workload.html">GpuFsaPreCompiledWorkload</a></li>
330 <li class="footer">Generated on Thu May 16 2024 09:31:56 for Arm NN by
331 <a href="http://www.doxygen.org/index.html">
332 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
333 </ul>
334</div>
335</body>
336</html>