diff --git a/cuda_core/cuda/core/system/__init__.py b/cuda_core/cuda/core/system/__init__.py index 9eaa79a6f7..29dc1538da 100644 --- a/cuda_core/cuda/core/system/__init__.py +++ b/cuda_core/cuda/core/system/__init__.py @@ -23,16 +23,11 @@ from ._system import * if CUDA_BINDINGS_NVML_IS_COMPATIBLE: - from ._device import Device, DeviceArchitecture + from ._device import * + from ._device import __all__ as _device_all from .exceptions import * from .exceptions import __all__ as _exceptions_all - __all__.extend( - [ - "get_nvml_version", - "Device", - "DeviceArchitecture", - ] - ) - + __all__.append("get_nvml_version") + __all__.extend(_device_all) __all__.extend(_exceptions_all) diff --git a/cuda_core/cuda/core/system/_device.pyx b/cuda_core/cuda/core/system/_device.pyx index faea1296b7..2b5ec242e8 100644 --- a/cuda_core/cuda/core/system/_device.pyx +++ b/cuda_core/cuda/core/system/_device.pyx @@ -175,7 +175,7 @@ cdef class Device: """ Representation of a device. - ``cuda.core.system.Device`` provides access to various pieces of metadata + :class:`cuda.core.system.Device` provides access to various pieces of metadata about devices and their topology, as provided by the NVIDIA Management Library (NVML). To use CUDA with a device, use :class:`cuda.core.Device`. @@ -312,3 +312,12 @@ cdef class Device: board serial identifier. """ return nvml.device_get_uuid(self._handle) + + +__all__ = [ + "BAR1MemoryInfo", + "Device", + "DeviceArchitecture", + "MemoryInfo", + "PciInfo", +] diff --git a/cuda_core/docs/source/api.rst b/cuda_core/docs/source/api.rst index ac46fa2fa5..13e1f43a2f 100644 --- a/cuda_core/docs/source/api.rst +++ b/cuda_core/docs/source/api.rst @@ -79,6 +79,10 @@ CUDA system information and NVIDIA Management Library (NVML) :template: autosummary/cyclass.rst system.Device + system.DeviceArchitecture + system.MemoryInfo + system.BAR1MemoryInfo + system.PciInfo .. module:: cuda.core.utils