Debian Codegraph @

doc/doxygen-doc/man/man3/hwlocality_amdsmi.3

raw
1 .TH "hwlocality_amdsmi" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 hwlocality_amdsmi \- Interoperability with the AMD SMI Management Library
6 .SH SYNOPSIS
7 .br
8 .PP
9 .SS "Functions"
10
11 .in +1c
12 .ti -1c
13 .RI "int \fBhwloc_amdsmi_get_device_cpuset\fP (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc, \fBhwloc_cpuset_t\fP set)"
14 .br
15 .ti -1c
16 .RI "\fBhwloc_obj_t\fP \fBhwloc_amdsmi_get_device_osdev_by_index\fP (\fBhwloc_topology_t\fP topology, uint32_t hip_id)"
17 .br
18 .ti -1c
19 .RI "\fBhwloc_obj_t\fP \fBhwloc_amdsmi_get_device_osdev\fP (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc)"
20 .br
21 .in -1c
22 .SH "Detailed Description"
23 .PP
24 This interface offers ways to retrieve topology information about devices managed by the AMD SMI Management Library\&.
25 .SH "Function Documentation"
26 .PP
27 .SS "int hwloc_amdsmi_get_device_cpuset (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc, \fBhwloc_cpuset_t\fP set)\fR [inline]\fP"
28
29 .PP
30 Get the CPU set of logical processors that are physically close to AMD GPU device whose index is \fRdv_ind\fP\&. Store in \fRset\fP the CPU-set describing the locality of the AMD GPU device whose processor handle is \fRproc\fP\&.
31
32 .PP
33 Topology \fRtopology\fP and device \fRdv_ind\fP must match the local machine\&. I/O devices detection and the ROCm SMI component are not needed in the topology\&.
34
35 .PP
36 The function only returns the locality of the device\&. If more information about the device is needed, OS objects should be used instead, see \fBhwloc_amdsmi_get_device_osdev()\fP and \fBhwloc_amdsmi_get_device_osdev_by_index()\fP\&.
37
38 .PP
39 This function is currently only implemented in a meaningful way for Linux; other systems will simply get the cpuset of the entire topology\&.
40
41 .PP
42 \fBReturns\fP
43 .RS 4
44 0 on success\&.
45
46 .PP
47 -1 on error, for instance if device information could not be found\&.
48 .RE
49 .PP
50
51 .SS "\fBhwloc_obj_t\fP hwloc_amdsmi_get_device_osdev (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc)\fR [inline]\fP"
52
53 .PP
54 Get the hwloc OS device object corresponding to AMD GPU device, whose processor handle is \fRproc\fP\&.
55 .PP
56 \fBReturns\fP
57 .RS 4
58 The hwloc OS device object that describes the given AMD GPU, whose processor handle is \fRproc\fP\&.
59
60 .PP
61 \fRNULL\fP if none could be found\&.
62 .RE
63 .PP
64 Topology \fRtopology\fP and processor handle \fRproc\fP must match the local machine\&. I/O devices detection and the RSMI component must be enabled in the topology\&. If not, the locality of the object may still be found using \fBhwloc_amdsmi_get_device_cpuset()\fP\&.
65
66 .PP
67 \fBNote\fP
68 .RS 4
69 The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out)\&.
70 .RE
71 .PP
72
73 .SS "\fBhwloc_obj_t\fP hwloc_amdsmi_get_device_osdev_by_index (\fBhwloc_topology_t\fP topology, uint32_t hip_id)\fR [inline]\fP"
74
75 .PP
76 Get the hwloc OS device object corresponding to the AMD GPU device whose HIP index is \fRhip_id\fP\&.
77 .PP
78 \fBReturns\fP
79 .RS 4
80 The hwloc OS device object describing the AMD GPU device whose HIP index is \fRhip_id\fP\&.
81
82 .PP
83 \fRNULL\fP if none could be found\&.
84 .RE
85 .PP
86 The topology \fRtopology\fP 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 RSMI component must be enabled in the topology\&.
87
88 .PP
89 \fBNote\fP
90 .RS 4
91 The corresponding PCI device object can be obtained by looking at the OS device parent object (unless PCI devices are filtered out)\&.
92 .RE
93 .PP
94
95 .SH "Author"
96 .PP
97 Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.