| 1 |
.TH "hwlocality_levelzero" 3 "Version 2.14.0" "Hardware Locality (hwloc)" \" -*- nroff -*- |
| 2 |
.ad l |
| 3 |
.nh |
| 4 |
.SH NAME |
| 5 |
hwlocality_levelzero \- Interoperability with the oneAPI Level Zero interface\&. |
| 6 |
.SH SYNOPSIS |
| 7 |
.br |
| 8 |
.PP |
| 9 |
.SS "Functions" |
| 10 |
|
| 11 |
.in +1c |
| 12 |
.ti -1c |
| 13 |
.RI "int \fBhwloc_levelzero_get_device_cpuset\fP (\fBhwloc_topology_t\fP topology, ze_device_handle_t device, \fBhwloc_cpuset_t\fP set)" |
| 14 |
.br |
| 15 |
.ti -1c |
| 16 |
.RI "int \fBhwloc_levelzero_get_sysman_device_cpuset\fP (\fBhwloc_topology_t\fP topology, zes_device_handle_t device, \fBhwloc_cpuset_t\fP set)" |
| 17 |
.br |
| 18 |
.ti -1c |
| 19 |
.RI "\fBhwloc_obj_t\fP \fBhwloc_levelzero_get_device_osdev\fP (\fBhwloc_topology_t\fP topology, ze_device_handle_t device)" |
| 20 |
.br |
| 21 |
.ti -1c |
| 22 |
.RI "\fBhwloc_obj_t\fP \fBhwloc_levelzero_get_sysman_device_osdev\fP (\fBhwloc_topology_t\fP topology, zes_device_handle_t device)" |
| 23 |
.br |
| 24 |
.in -1c |
| 25 |
.SH "Detailed Description" |
| 26 |
.PP |
| 27 |
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)\&. |
| 28 |
.SH "Function Documentation" |
| 29 |
.PP |
| 30 |
.SS "int hwloc_levelzero_get_device_cpuset (\fBhwloc_topology_t\fP topology, ze_device_handle_t device, \fBhwloc_cpuset_t\fP set)\fR [inline]\fP" |
| 31 |
|
| 32 |
.PP |
| 33 |
Get the CPU set of logical processors that are physically close to the Level Zero device \fRdevice\fP\&. Store in \fRset\fP the CPU-set describing the locality of the Level Zero device \fRdevice\fP\&. |
| 34 |
|
| 35 |
.PP |
| 36 |
Topology \fRtopology\fP and device \fRdevice\fP 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\&. |
| 37 |
|
| 38 |
.PP |
| 39 |
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_levelzero_get_device_osdev()\fP\&. |
| 40 |
|
| 41 |
.PP |
| 42 |
This function is currently only implemented in a meaningful way for Linux; other systems will simply get the cpuset of the entire topology\&. |
| 43 |
|
| 44 |
.PP |
| 45 |
\fBReturns\fP |
| 46 |
.RS 4 |
| 47 |
0 on success\&. |
| 48 |
|
| 49 |
.PP |
| 50 |
-1 on error, for instance if device information could not be found\&. |
| 51 |
.RE |
| 52 |
.PP |
| 53 |
\fBNote\fP |
| 54 |
.RS 4 |
| 55 |
zeDevicePciGetPropertiesExt() must be supported, or the entire machine locality will be returned\&. |
| 56 |
.RE |
| 57 |
.PP |
| 58 |
|
| 59 |
.SS "\fBhwloc_obj_t\fP hwloc_levelzero_get_device_osdev (\fBhwloc_topology_t\fP topology, ze_device_handle_t device)\fR [inline]\fP" |
| 60 |
|
| 61 |
.PP |
| 62 |
Get the hwloc OS device object corresponding to Level Zero device \fRdevice\fP\&. |
| 63 |
.PP |
| 64 |
\fBReturns\fP |
| 65 |
.RS 4 |
| 66 |
The hwloc OS device object that describes the given Level Zero device \fRdevice\fP\&. |
| 67 |
|
| 68 |
.PP |
| 69 |
\fRNULL\fP if none could be found\&. |
| 70 |
.RE |
| 71 |
.PP |
| 72 |
Topology \fRtopology\fP and device \fRdv_ind\fP 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 \fBhwloc_levelzero_get_device_cpuset()\fP\&. |
| 73 |
|
| 74 |
.PP |
| 75 |
\fBNote\fP |
| 76 |
.RS 4 |
| 77 |
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\&. |
| 78 |
|
| 79 |
.PP |
| 80 |
The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out)\&. |
| 81 |
|
| 82 |
.PP |
| 83 |
zeDevicePciGetPropertiesExt() must be supported\&. |
| 84 |
.RE |
| 85 |
.PP |
| 86 |
|
| 87 |
.SS "int hwloc_levelzero_get_sysman_device_cpuset (\fBhwloc_topology_t\fP topology, zes_device_handle_t device, \fBhwloc_cpuset_t\fP set)\fR [inline]\fP" |
| 88 |
|
| 89 |
.PP |
| 90 |
Get the CPU set of logical processors that are physically close to the Level Zero Sysman device \fRdevice\fP\&. Store in \fRset\fP the CPU-set describing the locality of the Level Zero device \fRdevice\fP\&. |
| 91 |
|
| 92 |
.PP |
| 93 |
Topology \fRtopology\fP and device \fRdevice\fP 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\&. |
| 94 |
|
| 95 |
.PP |
| 96 |
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_levelzero_get_device_osdev()\fP\&. |
| 97 |
|
| 98 |
.PP |
| 99 |
This function is currently only implemented in a meaningful way for Linux; other systems will simply get the cpuset of the entire topology\&. |
| 100 |
|
| 101 |
.PP |
| 102 |
\fBReturns\fP |
| 103 |
.RS 4 |
| 104 |
0 on success\&. |
| 105 |
|
| 106 |
.PP |
| 107 |
-1 on error, for instance if device information could not be found\&. |
| 108 |
.RE |
| 109 |
.PP |
| 110 |
|
| 111 |
.SS "\fBhwloc_obj_t\fP hwloc_levelzero_get_sysman_device_osdev (\fBhwloc_topology_t\fP topology, zes_device_handle_t device)\fR [inline]\fP" |
| 112 |
|
| 113 |
.PP |
| 114 |
Get the hwloc OS device object corresponding to Level Zero Sysman device \fRdevice\fP\&. |
| 115 |
.PP |
| 116 |
\fBReturns\fP |
| 117 |
.RS 4 |
| 118 |
The hwloc OS device object that describes the given Level Zero device \fRdevice\fP\&. |
| 119 |
|
| 120 |
.PP |
| 121 |
\fRNULL\fP if none could be found\&. |
| 122 |
.RE |
| 123 |
.PP |
| 124 |
Topology \fRtopology\fP and device \fRdv_ind\fP 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 \fBhwloc_levelzero_get_device_cpuset()\fP\&. |
| 125 |
|
| 126 |
.PP |
| 127 |
\fBNote\fP |
| 128 |
.RS 4 |
| 129 |
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\&. |
| 130 |
|
| 131 |
.PP |
| 132 |
The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out)\&. |
| 133 |
.RE |
| 134 |
.PP |
| 135 |
|
| 136 |
.SH "Author" |
| 137 |
.PP |
| 138 |
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&. |