hwlocality_cudart.3 3.9 KB

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