Debian Codegraph @

doc/doxygen-doc/html/a00205.html

raw
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 CUDA Runtime API</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">&#160;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 CUDA Runtime API </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:ga3cb11734dfd875e0ada63dcb3d456983" id="r_ga3cb11734dfd875e0ada63dcb3d456983"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3cb11734dfd875e0ada63dcb3d456983">hwloc_cudart_get_device_pci_ids</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, int idx, int *domain, int *bus, int *dev)</td></tr>
54 <tr class="memitem:ga1ff00f06220c2103c78ace35c7285d37" id="r_ga1ff00f06220c2103c78ace35c7285d37"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga1ff00f06220c2103c78ace35c7285d37">hwloc_cudart_get_device_cpuset</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, int idx, <a class="el" href="a00166.html#ga4bbf39b68b6f568fb92739e7c0ea7801">hwloc_cpuset_t</a> set)</td></tr>
55 <tr class="memitem:ga9e539c59b3b935561a1c08f18dacf144" id="r_ga9e539c59b3b935561a1c08f18dacf144"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga9e539c59b3b935561a1c08f18dacf144">hwloc_cudart_get_device_pcidev</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, int idx)</td></tr>
56 <tr class="memitem:ga959b08bcbaa77d39a79cfbb5b4883349" id="r_ga959b08bcbaa77d39a79cfbb5b4883349"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga959b08bcbaa77d39a79cfbb5b4883349">hwloc_cudart_get_device_osdev_by_index</a> (<a class="el" href="a00169.html#ga9d1e76ee15a7dee158b786c30b6a6e38">hwloc_topology_t</a> topology, unsigned idx)</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 CUDA devices when using the CUDA Runtime 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="ga1ff00f06220c2103c78ace35c7285d37" name="ga1ff00f06220c2103c78ace35c7285d37"></a>
62 <h2 class="memtitle"><span class="permalink"><a href="#ga1ff00f06220c2103c78ace35c7285d37">&#9670;&#160;</a></span>hwloc_cudart_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_cudart_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">int</td> <td class="paramname"><span class="paramname"><em>idx</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>&#160;)</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 processors that are physically close to device <code class="param">idx</code>. </p>
94 <p>Store in <code class="param">set</code> the CPU-set describing the locality of the CUDA device whose index is <code class="param">idx</code>.</p>
95 <p>Topology <code class="param">topology</code> and device <code class="param">idx</code> must match the local machine. I/O devices detection and the CUDA 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="#ga959b08bcbaa77d39a79cfbb5b4883349" title="Get the hwloc OS device object corresponding to the CUDA device whose index is idx.">hwloc_cudart_get_device_osdev_by_index()</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
102 </div>
103 </div>
104 <a id="ga959b08bcbaa77d39a79cfbb5b4883349" name="ga959b08bcbaa77d39a79cfbb5b4883349"></a>
105 <h2 class="memtitle"><span class="permalink"><a href="#ga959b08bcbaa77d39a79cfbb5b4883349">&#9670;&#160;</a></span>hwloc_cudart_get_device_osdev_by_index()</h2>
106
107 <div class="memitem">
108 <div class="memproto">
109 <table class="mlabels">
110 <tr>
111 <td class="mlabels-left">
112 <table class="memname">
113 <tr>
114 <td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_cudart_get_device_osdev_by_index </td>
115 <td>(</td>
116 <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>
117 </tr>
118 <tr>
119 <td class="paramkey"></td>
120 <td></td>
121 <td class="paramtype">unsigned</td> <td class="paramname"><span class="paramname"><em>idx</em></span>&#160;)</td>
122 </tr>
123 </table>
124 </td>
125 <td class="mlabels-right">
126 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
127 </tr>
128 </table>
129 </div><div class="memdoc">
130
131 <p>Get the hwloc OS device object corresponding to the CUDA device whose index is <code class="param">idx</code>. </p>
132 <dl class="section return"><dt>Returns</dt><dd>The hwloc OS device object describing the CUDA device whose index is <code class="param">idx</code>. </dd>
133 <dd>
134 <code>NULL</code> if none could be found.</dd></dl>
135 <p>The topology <code class="param">topology</code> does not necessarily have to match the current machine. For instance the topology may be an XML import of a remote host. I/O devices detection and the CUDA component must be enabled in the topology. If not, the locality of the object may still be found using <a class="el" href="#ga1ff00f06220c2103c78ace35c7285d37" title="Get the CPU set of processors that are physically close to device idx.">hwloc_cudart_get_device_cpuset()</a>.</p>
136 <dl class="section note"><dt>Note</dt><dd>The corresponding PCI device object can be obtained by looking at the OS device parent object (unless PCI devices are filtered out).</dd>
137 <dd>
138 This function is identical to <a class="el" href="a00204.html#ga94bd22defc09e07bd122ade707fef620" title="Get the hwloc OS device object corresponding to the CUDA device whose index is idx.">hwloc_cuda_get_device_osdev_by_index()</a>. </dd></dl>
139
140 </div>
141 </div>
142 <a id="ga3cb11734dfd875e0ada63dcb3d456983" name="ga3cb11734dfd875e0ada63dcb3d456983"></a>
143 <h2 class="memtitle"><span class="permalink"><a href="#ga3cb11734dfd875e0ada63dcb3d456983">&#9670;&#160;</a></span>hwloc_cudart_get_device_pci_ids()</h2>
144
145 <div class="memitem">
146 <div class="memproto">
147 <table class="mlabels">
148 <tr>
149 <td class="mlabels-left">
150 <table class="memname">
151 <tr>
152 <td class="memname">int hwloc_cudart_get_device_pci_ids </td>
153 <td>(</td>
154 <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>
155 </tr>
156 <tr>
157 <td class="paramkey"></td>
158 <td></td>
159 <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>idx</em></span>, </td>
160 </tr>
161 <tr>
162 <td class="paramkey"></td>
163 <td></td>
164 <td class="paramtype">int *</td> <td class="paramname"><span class="paramname"><em>domain</em></span>, </td>
165 </tr>
166 <tr>
167 <td class="paramkey"></td>
168 <td></td>
169 <td class="paramtype">int *</td> <td class="paramname"><span class="paramname"><em>bus</em></span>, </td>
170 </tr>
171 <tr>
172 <td class="paramkey"></td>
173 <td></td>
174 <td class="paramtype">int *</td> <td class="paramname"><span class="paramname"><em>dev</em></span>&#160;)</td>
175 </tr>
176 </table>
177 </td>
178 <td class="mlabels-right">
179 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
180 </tr>
181 </table>
182 </div><div class="memdoc">
183
184 <p>Return the domain, bus and device IDs of the CUDA device whose index is <code class="param">idx</code>. </p>
185 <p>Device index <code class="param">idx</code> must match the local machine.</p>
186 <dl class="section return"><dt>Returns</dt><dd>0 on success. </dd>
187 <dd>
188 -1 on error, for instance if device information could not be found. </dd></dl>
189
190 </div>
191 </div>
192 <a id="ga9e539c59b3b935561a1c08f18dacf144" name="ga9e539c59b3b935561a1c08f18dacf144"></a>
193 <h2 class="memtitle"><span class="permalink"><a href="#ga9e539c59b3b935561a1c08f18dacf144">&#9670;&#160;</a></span>hwloc_cudart_get_device_pcidev()</h2>
194
195 <div class="memitem">
196 <div class="memproto">
197 <table class="mlabels">
198 <tr>
199 <td class="mlabels-left">
200 <table class="memname">
201 <tr>
202 <td class="memname"><a class="el" href="a00168.html#ga79b8ab56877ef99ac59b833203391c7d">hwloc_obj_t</a> hwloc_cudart_get_device_pcidev </td>
203 <td>(</td>
204 <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>
205 </tr>
206 <tr>
207 <td class="paramkey"></td>
208 <td></td>
209 <td class="paramtype">int</td> <td class="paramname"><span class="paramname"><em>idx</em></span>&#160;)</td>
210 </tr>
211 </table>
212 </td>
213 <td class="mlabels-right">
214 <span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
215 </tr>
216 </table>
217 </div><div class="memdoc">
218
219 <p>Get the hwloc PCI device object corresponding to the CUDA device whose index is <code class="param">idx</code>. </p>
220 <dl class="section return"><dt>Returns</dt><dd>The hwloc PCI device object describing the CUDA device whose index is <code class="param">idx</code>. </dd>
221 <dd>
222 <code>NULL</code> if none could be found.</dd></dl>
223 <p>Topology <code class="param">topology</code> and device <code class="param">idx</code> must match the local machine. I/O devices detection must be enabled in topology <code class="param">topology</code>. The CUDA component is not needed in the topology. </p>
224
225 </div>
226 </div>
227 </div><!-- contents -->
228 <!-- start footer part -->
229 <hr class="footer"/><address class="footer"><small>
230 Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.15.0
231 </small></address>
232 </div><!-- doc-content -->
233 </body>
234 </html>