| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 |
<meta http-equiv="X-UA-Compatible" content="IE=11"/> |
| 6 |
<meta name="generator" content="Doxygen 1.15.0"/> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 |
<title>Hardware Locality (hwloc): Interoperability with the oneAPI Level Zero interface.</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 |
<script type="text/javascript" src="clipboard.js"></script> |
| 13 |
<link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 14 |
</head> |
| 15 |
<body> |
| 16 |
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 17 |
<div id="titlearea"> |
| 18 |
<table cellspacing="0" cellpadding="0"> |
| 19 |
<tbody> |
| 20 |
<tr id="projectrow"> |
| 21 |
<td id="projectalign"> |
| 22 |
<div id="projectname">Hardware Locality (hwloc)<span id="projectnumber"> 2.14.0</span> |
| 23 |
</div> |
| 24 |
</td> |
| 25 |
</tr> |
| 26 |
</tbody> |
| 27 |
</table> |
| 28 |
</div> |
| 29 |
<!-- end header part --> |
| 30 |
<!-- Generated by Doxygen 1.15.0 --> |
| 31 |
<script type="text/javascript"> |
| 32 |
$(function() { codefold.init(); }); |
| 33 |
</script> |
| 34 |
<script type="text/javascript" src="menudata.js"></script> |
| 35 |
<script type="text/javascript" src="menu.js"></script> |
| 36 |
<script type="text/javascript"> |
| 37 |
$(function() { |
| 38 |
initMenu('',false,false,'search.php','Search',false); |
| 39 |
}); |
| 40 |
</script> |
| 41 |
<div id="main-nav"></div> |
| 42 |
</div><!-- top --> |
| 43 |
<div id="doc-content"> |
| 44 |
<div class="header"> |
| 45 |
<div class="summary"> |
| 46 |
<a href="#func-members">Functions</a> </div> |
| 47 |
<div class="headertitle"><div class="title">Interoperability with the oneAPI Level Zero interface. </div></div> |
| 48 |
</div><!--header--> |
| 49 |
<div class="contents"> |
| 50 |
<table class="memberdecls"> |
| 51 |
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a> |
| 52 |
Functions</h2></td></tr> |
| 53 |
<tr class="memitem:gac99688cac5174738d9cf8284dda8b769" id="r_gac99688cac5174738d9cf8284dda8b769"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#gac99688cac5174738d9cf8284dda8b769">hwloc_levelzero_get_device_cpuset</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, ze_device_handle_t device, <a class="el" href="a00166.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> set)</td></tr> |
| 54 |
<tr class="memitem:gaca49a9ca9e8e9e845a4ff98cde6ef3e1" id="r_gaca49a9ca9e8e9e845a4ff98cde6ef3e1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#gaca49a9ca9e8e9e845a4ff98cde6ef3e1">hwloc_levelzero_get_sysman_device_cpuset</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, zes_device_handle_t device, <a class="el" href="a00166.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> set)</td></tr> |
| 55 |
<tr class="memitem:ga96bd686ed762bb53152d7dd1524391d8" id="r_ga96bd686ed762bb53152d7dd1524391d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga96bd686ed762bb53152d7dd1524391d8">hwloc_levelzero_get_device_osdev</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, ze_device_handle_t device)</td></tr> |
| 56 |
<tr class="memitem:ga3316db956816c5d1da4f9aa5fef415db" id="r_ga3316db956816c5d1da4f9aa5fef415db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3316db956816c5d1da4f9aa5fef415db">hwloc_levelzero_get_sysman_device_osdev</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, zes_device_handle_t device)</td></tr> |
| 57 |
</table> |
| 58 |
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2> |
| 59 |
<p>This interface offers ways to retrieve topology information about devices managed by the Level Zero API, both for main Core devices (ZE API) and the Sysman devices (ZES API). </p> |
| 60 |
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2> |
| 61 |
<a id="gac99688cac5174738d9cf8284dda8b769" name="gac99688cac5174738d9cf8284dda8b769"></a> |
| 62 |
<h2 class="memtitle"><span class="permalink"><a href="#gac99688cac5174738d9cf8284dda8b769">◆ </a></span>hwloc_levelzero_get_device_cpuset()</h2> |
| 63 |
|
| 64 |
<div class="memitem"> |
| 65 |
<div class="memproto"> |
| 66 |
<table class="mlabels"> |
| 67 |
<tr> |
| 68 |
<td class="mlabels-left"> |
| 69 |
<table class="memname"> |
| 70 |
<tr> |
| 71 |
<td class="memname">int hwloc_levelzero_get_device_cpuset </td> |
| 72 |
<td>(</td> |
| 73 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 74 |
</tr> |
| 75 |
<tr> |
| 76 |
<td class="paramkey"></td> |
| 77 |
<td></td> |
| 78 |
<td class="paramtype">ze_device_handle_t</td> <td class="paramname"><span class="paramname"><em>device</em></span>, </td> |
| 79 |
</tr> |
| 80 |
<tr> |
| 81 |
<td class="paramkey"></td> |
| 82 |
<td></td> |
| 83 |
<td class="paramtype"><a class="el" href="a00166.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a></td> <td class="paramname"><span class="paramname"><em>set</em></span> )</td> |
| 84 |
</tr> |
| 85 |
</table> |
| 86 |
</td> |
| 87 |
<td class="mlabels-right"> |
| 88 |
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td> |
| 89 |
</tr> |
| 90 |
</table> |
| 91 |
</div><div class="memdoc"> |
| 92 |
|
| 93 |
<p>Get the CPU set of logical processors that are physically close to the Level Zero device <code class="param">device</code>. </p> |
| 94 |
<p>Store in <code class="param">set</code> the CPU-set describing the locality of the Level Zero device <code class="param">device</code>.</p> |
| 95 |
<p>Topology <code class="param">topology</code> and device <code class="param">device</code> must match the local machine. The Level Zero library must have been initialized with zeInit(). I/O devices detection and the Level Zero component are not needed in the topology.</p> |
| 96 |
<p>The function only returns the locality of the device. If more information about the device is needed, OS objects should be used instead, see <a class="el" href="#ga96bd686ed762bb53152d7dd1524391d8" title="Get the hwloc OS device object corresponding to Level Zero device device.">hwloc_levelzero_get_device_osdev()</a>.</p> |
| 97 |
<p>This function is currently only implemented in a meaningful way for Linux; other systems will simply get the cpuset of the entire topology.</p> |
| 98 |
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd> |
| 99 |
<dd> |
| 100 |
-1 on error, for instance if device information could not be found.</dd></dl> |
| 101 |
<dl class="section note"><dt>Note</dt><dd>zeDevicePciGetPropertiesExt() must be supported, or the entire machine locality will be returned. </dd></dl> |
| 102 |
|
| 103 |
</div> |
| 104 |
</div> |
| 105 |
<a id="ga96bd686ed762bb53152d7dd1524391d8" name="ga96bd686ed762bb53152d7dd1524391d8"></a> |
| 106 |
<h2 class="memtitle"><span class="permalink"><a href="#ga96bd686ed762bb53152d7dd1524391d8">◆ </a></span>hwloc_levelzero_get_device_osdev()</h2> |
| 107 |
|
| 108 |
<div class="memitem"> |
| 109 |
<div class="memproto"> |
| 110 |
<table class="mlabels"> |
| 111 |
<tr> |
| 112 |
<td class="mlabels-left"> |
| 113 |
<table class="memname"> |
| 114 |
<tr> |
| 115 |
<td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_levelzero_get_device_osdev </td> |
| 116 |
<td>(</td> |
| 117 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 118 |
</tr> |
| 119 |
<tr> |
| 120 |
<td class="paramkey"></td> |
| 121 |
<td></td> |
| 122 |
<td class="paramtype">ze_device_handle_t</td> <td class="paramname"><span class="paramname"><em>device</em></span> )</td> |
| 123 |
</tr> |
| 124 |
</table> |
| 125 |
</td> |
| 126 |
<td class="mlabels-right"> |
| 127 |
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td> |
| 128 |
</tr> |
| 129 |
</table> |
| 130 |
</div><div class="memdoc"> |
| 131 |
|
| 132 |
<p>Get the hwloc OS device object corresponding to Level Zero device <code class="param">device</code>. </p> |
| 133 |
<dl class="section return"><dt>Returns</dt><dd>The hwloc OS device object that describes the given Level Zero device <code class="param">device</code>. </dd> |
| 134 |
<dd> |
| 135 |
<code>NULL</code> if none could be found.</dd></dl> |
| 136 |
<p>Topology <code class="param">topology</code> and device <code class="param">dv_ind</code> must match the local machine. The Level Zero library must have been initialized with zeInit(). I/O devices detection and the Level Zero component must be enabled in the topology. If not, the locality of the object may still be found using <a class="el" href="#gac99688cac5174738d9cf8284dda8b769" title="Get the CPU set of logical processors that are physically close to the Level Zero device device.">hwloc_levelzero_get_device_cpuset()</a>.</p> |
| 137 |
<dl class="section note"><dt>Note</dt><dd>If the input ZE device is actually a subdevice, then its parent (root device) is actually translated, i.e. the main hwloc OS device is returned instead of one of its children.</dd> |
| 138 |
<dd> |
| 139 |
The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out).</dd> |
| 140 |
<dd> |
| 141 |
zeDevicePciGetPropertiesExt() must be supported. </dd></dl> |
| 142 |
|
| 143 |
</div> |
| 144 |
</div> |
| 145 |
<a id="gaca49a9ca9e8e9e845a4ff98cde6ef3e1" name="gaca49a9ca9e8e9e845a4ff98cde6ef3e1"></a> |
| 146 |
<h2 class="memtitle"><span class="permalink"><a href="#gaca49a9ca9e8e9e845a4ff98cde6ef3e1">◆ </a></span>hwloc_levelzero_get_sysman_device_cpuset()</h2> |
| 147 |
|
| 148 |
<div class="memitem"> |
| 149 |
<div class="memproto"> |
| 150 |
<table class="mlabels"> |
| 151 |
<tr> |
| 152 |
<td class="mlabels-left"> |
| 153 |
<table class="memname"> |
| 154 |
<tr> |
| 155 |
<td class="memname">int hwloc_levelzero_get_sysman_device_cpuset </td> |
| 156 |
<td>(</td> |
| 157 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 158 |
</tr> |
| 159 |
<tr> |
| 160 |
<td class="paramkey"></td> |
| 161 |
<td></td> |
| 162 |
<td class="paramtype">zes_device_handle_t</td> <td class="paramname"><span class="paramname"><em>device</em></span>, </td> |
| 163 |
</tr> |
| 164 |
<tr> |
| 165 |
<td class="paramkey"></td> |
| 166 |
<td></td> |
| 167 |
<td class="paramtype"><a class="el" href="a00166.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a></td> <td class="paramname"><span class="paramname"><em>set</em></span> )</td> |
| 168 |
</tr> |
| 169 |
</table> |
| 170 |
</td> |
| 171 |
<td class="mlabels-right"> |
| 172 |
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td> |
| 173 |
</tr> |
| 174 |
</table> |
| 175 |
</div><div class="memdoc"> |
| 176 |
|
| 177 |
<p>Get the CPU set of logical processors that are physically close to the Level Zero Sysman device <code class="param">device</code>. </p> |
| 178 |
<p>Store in <code class="param">set</code> the CPU-set describing the locality of the Level Zero device <code class="param">device</code>.</p> |
| 179 |
<p>Topology <code class="param">topology</code> and device <code class="param">device</code> must match the local machine. The Level Zero library must have been initialized with Sysman enabled with zesInit(). I/O devices detection and the Level Zero component are not needed in the topology.</p> |
| 180 |
<p>The function only returns the locality of the device. If more information about the device is needed, OS objects should be used instead, see <a class="el" href="#ga96bd686ed762bb53152d7dd1524391d8" title="Get the hwloc OS device object corresponding to Level Zero device device.">hwloc_levelzero_get_device_osdev()</a>.</p> |
| 181 |
<p>This function is currently only implemented in a meaningful way for Linux; other systems will simply get the cpuset of the entire topology.</p> |
| 182 |
<dl class="section return"><dt>Returns</dt><dd>0 on success. </dd> |
| 183 |
<dd> |
| 184 |
-1 on error, for instance if device information could not be found. </dd></dl> |
| 185 |
|
| 186 |
</div> |
| 187 |
</div> |
| 188 |
<a id="ga3316db956816c5d1da4f9aa5fef415db" name="ga3316db956816c5d1da4f9aa5fef415db"></a> |
| 189 |
<h2 class="memtitle"><span class="permalink"><a href="#ga3316db956816c5d1da4f9aa5fef415db">◆ </a></span>hwloc_levelzero_get_sysman_device_osdev()</h2> |
| 190 |
|
| 191 |
<div class="memitem"> |
| 192 |
<div class="memproto"> |
| 193 |
<table class="mlabels"> |
| 194 |
<tr> |
| 195 |
<td class="mlabels-left"> |
| 196 |
<table class="memname"> |
| 197 |
<tr> |
| 198 |
<td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_levelzero_get_sysman_device_osdev </td> |
| 199 |
<td>(</td> |
| 200 |
<td class="paramtype"><a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a></td> <td class="paramname"><span class="paramname"><em>topology</em></span>, </td> |
| 201 |
</tr> |
| 202 |
<tr> |
| 203 |
<td class="paramkey"></td> |
| 204 |
<td></td> |
| 205 |
<td class="paramtype">zes_device_handle_t</td> <td class="paramname"><span class="paramname"><em>device</em></span> )</td> |
| 206 |
</tr> |
| 207 |
</table> |
| 208 |
</td> |
| 209 |
<td class="mlabels-right"> |
| 210 |
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td> |
| 211 |
</tr> |
| 212 |
</table> |
| 213 |
</div><div class="memdoc"> |
| 214 |
|
| 215 |
<p>Get the hwloc OS device object corresponding to Level Zero Sysman device <code class="param">device</code>. </p> |
| 216 |
<dl class="section return"><dt>Returns</dt><dd>The hwloc OS device object that describes the given Level Zero device <code class="param">device</code>. </dd> |
| 217 |
<dd> |
| 218 |
<code>NULL</code> if none could be found.</dd></dl> |
| 219 |
<p>Topology <code class="param">topology</code> and device <code class="param">dv_ind</code> must match the local machine. The Level Zero library must have been initialized with Sysman enabled with zesInit(). I/O devices detection and the Level Zero component must be enabled in the topology. If not, the locality of the object may still be found using <a class="el" href="#gac99688cac5174738d9cf8284dda8b769" title="Get the CPU set of logical processors that are physically close to the Level Zero device device.">hwloc_levelzero_get_device_cpuset()</a>.</p> |
| 220 |
<dl class="section note"><dt>Note</dt><dd>If the input ZES device is actually a subdevice, then its parent (root device) is actually translated, i.e. the main hwloc OS device is returned instead of one of its children.</dd> |
| 221 |
<dd> |
| 222 |
The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out). </dd></dl> |
| 223 |
|
| 224 |
</div> |
| 225 |
</div> |
| 226 |
</div><!-- contents --> |
| 227 |
<!-- start footer part --> |
| 228 |
<hr class="footer"/><address class="footer"><small> |
| 229 |
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0 |
| 230 |
</small></address> |
| 231 |
</div><!-- doc-content --> |
| 232 |
</body> |
| 233 |
</html> |