.TH "hwlocality_amdsmi" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*- .ad l .nh .SH NAME hwlocality_amdsmi \- Interoperability with the AMD SMI Management Library .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "int \fBhwloc_amdsmi_get_device_cpuset\fP (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc, \fBhwloc_cpuset_t\fP set)" .br .ti -1c .RI "\fBhwloc_obj_t\fP \fBhwloc_amdsmi_get_device_osdev_by_index\fP (\fBhwloc_topology_t\fP topology, uint32_t hip_id)" .br .ti -1c .RI "\fBhwloc_obj_t\fP \fBhwloc_amdsmi_get_device_osdev\fP (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc)" .br .in -1c .SH "Detailed Description" .PP This interface offers ways to retrieve topology information about devices managed by the AMD SMI Management Library\&. .SH "Function Documentation" .PP .SS "int hwloc_amdsmi_get_device_cpuset (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc, \fBhwloc_cpuset_t\fP set)\fR [inline]\fP" .PP 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\&. .PP 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\&. .PP 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\&. .PP This function is currently only implemented in a meaningful way for Linux; other systems will simply get the cpuset of the entire topology\&. .PP \fBReturns\fP .RS 4 0 on success\&. .PP -1 on error, for instance if device information could not be found\&. .RE .PP .SS "\fBhwloc_obj_t\fP hwloc_amdsmi_get_device_osdev (\fBhwloc_topology_t\fP topology, amdsmi_processor_handle proc)\fR [inline]\fP" .PP Get the hwloc OS device object corresponding to AMD GPU device, whose processor handle is \fRproc\fP\&. .PP \fBReturns\fP .RS 4 The hwloc OS device object that describes the given AMD GPU, whose processor handle is \fRproc\fP\&. .PP \fRNULL\fP if none could be found\&. .RE .PP 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\&. .PP \fBNote\fP .RS 4 The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out)\&. .RE .PP .SS "\fBhwloc_obj_t\fP hwloc_amdsmi_get_device_osdev_by_index (\fBhwloc_topology_t\fP topology, uint32_t hip_id)\fR [inline]\fP" .PP Get the hwloc OS device object corresponding to the AMD GPU device whose HIP index is \fRhip_id\fP\&. .PP \fBReturns\fP .RS 4 The hwloc OS device object describing the AMD GPU device whose HIP index is \fRhip_id\fP\&. .PP \fRNULL\fP if none could be found\&. .RE .PP 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\&. .PP \fBNote\fP .RS 4 The corresponding PCI device object can be obtained by looking at the OS device parent object (unless PCI devices are filtered out)\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.