hwlocality_cuda.3 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. .TH "hwlocality_cuda" 3 "Thu Sep 7 2023" "Version 2.9.3" "Hardware Locality (hwloc)" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. hwlocality_cuda \- Interoperability with the CUDA Driver API
  6. .SH SYNOPSIS
  7. .br
  8. .PP
  9. .SS "Functions"
  10. .in +1c
  11. .ti -1c
  12. .RI "static int \fBhwloc_cuda_get_device_pci_ids\fP (\fBhwloc_topology_t\fP topology, CUdevice cudevice, int *domain, int *bus, int *dev)"
  13. .br
  14. .ti -1c
  15. .RI "static int \fBhwloc_cuda_get_device_cpuset\fP (\fBhwloc_topology_t\fP topology, CUdevice cudevice, \fBhwloc_cpuset_t\fP set)"
  16. .br
  17. .ti -1c
  18. .RI "static \fBhwloc_obj_t\fP \fBhwloc_cuda_get_device_pcidev\fP (\fBhwloc_topology_t\fP topology, CUdevice cudevice)"
  19. .br
  20. .ti -1c
  21. .RI "static \fBhwloc_obj_t\fP \fBhwloc_cuda_get_device_osdev\fP (\fBhwloc_topology_t\fP topology, CUdevice cudevice)"
  22. .br
  23. .ti -1c
  24. .RI "static \fBhwloc_obj_t\fP \fBhwloc_cuda_get_device_osdev_by_index\fP (\fBhwloc_topology_t\fP topology, unsigned idx)"
  25. .br
  26. .in -1c
  27. .SH "Detailed Description"
  28. .PP
  29. This interface offers ways to retrieve topology information about CUDA devices when using the CUDA Driver API\&.
  30. .SH "Function Documentation"
  31. .PP
  32. .SS "static int hwloc_cuda_get_device_cpuset (\fBhwloc_topology_t\fP topology, CUdevice cudevice, \fBhwloc_cpuset_t\fP set)\fC [inline]\fP, \fC [static]\fP"
  33. .PP
  34. Get the CPU set of processors that are physically close to device \fCcudevice\fP\&. Store in \fCset\fP the CPU-set describing the locality of the CUDA device \fCcudevice\fP\&.
  35. .PP
  36. Topology \fCtopology\fP and device \fCcudevice\fP must match the local machine\&. I/O devices detection and the CUDA component are not needed in the topology\&.
  37. .PP
  38. 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_cuda_get_device_osdev()\fP and \fBhwloc_cuda_get_device_osdev_by_index()\fP\&.
  39. .PP
  40. This function is currently only implemented in a meaningful way for Linux; other systems will simply get a full cpuset\&.
  41. .PP
  42. \fBReturns\fP
  43. .RS 4
  44. 0 on success\&.
  45. .PP
  46. -1 on error, for instance if device information could not be found\&.
  47. .RE
  48. .PP
  49. .SS "static \fBhwloc_obj_t\fP hwloc_cuda_get_device_osdev (\fBhwloc_topology_t\fP topology, CUdevice cudevice)\fC [inline]\fP, \fC [static]\fP"
  50. .PP
  51. Get the hwloc OS device object corresponding to CUDA device \fCcudevice\fP\&.
  52. .PP
  53. \fBReturns\fP
  54. .RS 4
  55. The hwloc OS device object that describes the given CUDA device \fCcudevice\fP\&.
  56. .PP
  57. \fCNULL\fP if none could be found\&.
  58. .RE
  59. .PP
  60. Topology \fCtopology\fP and device \fCcudevice\fP must match the local machine\&. 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 \fBhwloc_cuda_get_device_cpuset()\fP\&.
  61. .PP
  62. \fBNote\fP
  63. .RS 4
  64. This function cannot work if PCI devices are filtered out\&.
  65. .PP
  66. The corresponding hwloc PCI device may be found by looking at the result parent pointer (unless PCI devices are filtered out)\&.
  67. .RE
  68. .PP
  69. .SS "static \fBhwloc_obj_t\fP hwloc_cuda_get_device_osdev_by_index (\fBhwloc_topology_t\fP topology, unsigned idx)\fC [inline]\fP, \fC [static]\fP"
  70. .PP
  71. Get the hwloc OS device object corresponding to the CUDA device whose index is \fCidx\fP\&.
  72. .PP
  73. \fBReturns\fP
  74. .RS 4
  75. The hwloc OS device object describing the CUDA device whose index is \fCidx\fP\&.
  76. .PP
  77. \fCNULL\fP if none could be found\&.
  78. .RE
  79. .PP
  80. The topology \fCtopology\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 CUDA component must be enabled in the topology\&.
  81. .PP
  82. \fBNote\fP
  83. .RS 4
  84. The corresponding PCI device object can be obtained by looking at the OS device parent object (unless PCI devices are filtered out)\&.
  85. .PP
  86. This function is identical to \fBhwloc_cudart_get_device_osdev_by_index()\fP\&.
  87. .RE
  88. .PP
  89. .SS "static int hwloc_cuda_get_device_pci_ids (\fBhwloc_topology_t\fP topology, CUdevice cudevice, int * domain, int * bus, int * dev)\fC [inline]\fP, \fC [static]\fP"
  90. .PP
  91. Return the domain, bus and device IDs of the CUDA device \fCcudevice\fP\&. Device \fCcudevice\fP must match the local machine\&.
  92. .PP
  93. \fBReturns\fP
  94. .RS 4
  95. 0 on success\&.
  96. .PP
  97. -1 on error, for instance if device information could not be found\&.
  98. .RE
  99. .PP
  100. .SS "static \fBhwloc_obj_t\fP hwloc_cuda_get_device_pcidev (\fBhwloc_topology_t\fP topology, CUdevice cudevice)\fC [inline]\fP, \fC [static]\fP"
  101. .PP
  102. Get the hwloc PCI device object corresponding to the CUDA device \fCcudevice\fP\&.
  103. .PP
  104. \fBReturns\fP
  105. .RS 4
  106. The hwloc PCI device object describing the CUDA device \fCcudevice\fP\&.
  107. .PP
  108. \fCNULL\fP if none could be found\&.
  109. .RE
  110. .PP
  111. Topology \fCtopology\fP and device \fCcudevice\fP must match the local machine\&. I/O devices detection must be enabled in topology \fCtopology\fP\&. The CUDA component is not needed in the topology\&.
  112. .SH "Author"
  113. .PP
  114. Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code\&.