Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions cuda_core/cuda/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,51 @@ class _PatchedProperty(metaclass=_PatchedPropMeta):
)
from cuda.core._tensor_map import TensorMapDescriptor, TensorMapDescriptorOptions

# Flat public API of the ``cuda.core`` namespace. Submodule namespaces
# (``checkpoint``, ``graph``, ``system``, ``texture``, ``utils``) carry their
# own ``__all__`` and are intentionally not re-listed here.
__all__ = [
"LEGACY_DEFAULT_STREAM",
"PER_THREAD_DEFAULT_STREAM",
"Buffer",
"Context",
"ContextOptions",
"Device",
"DeviceMemoryResource",
"DeviceMemoryResourceOptions",
"DeviceResources",
"Event",
"EventOptions",
"GraphMemoryResource",
"GraphicsResource",
"Host",
"Kernel",
"LaunchConfig",
"LegacyPinnedMemoryResource",
"Linker",
"LinkerOptions",
"ManagedBuffer",
"ManagedMemoryResource",
"ManagedMemoryResourceOptions",
"MemoryResource",
"ObjectCode",
"PinnedMemoryResource",
"PinnedMemoryResourceOptions",
"Program",
"ProgramOptions",
"SMResource",
"SMResourceOptions",
"Stream",
"StreamOptions",
"TensorMapDescriptor",
"TensorMapDescriptorOptions",
"VirtualMemoryResource",
"VirtualMemoryResourceOptions",
"WorkqueueResource",
"WorkqueueResourceOptions",
"launch",
]

# isort: split
# Texture/surface types live under the cuda.core.texture namespace (not the
# flat cuda.core namespace); import the subpackage so it is available as
Expand Down
12 changes: 12 additions & 0 deletions cuda_core/cuda/core/graph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@
#
# SPDX-License-Identifier: Apache-2.0

from . import _graph_builder, _graph_definition, _graph_node, _subclasses
from ._graph_builder import *
from ._graph_definition import *
from ._graph_node import *
from ._subclasses import *

# Aggregate the star-imported submodule exports so ``cuda.core.graph`` carries
# an explicit ``__all__`` derived from its parts (no manual list to drift).
__all__ = [
*_graph_builder.__all__,
*_graph_definition.__all__,
*_graph_node.__all__,
*_subclasses.__all__,
]

del _graph_builder, _graph_definition, _graph_node, _subclasses
3 changes: 2 additions & 1 deletion cuda_core/cuda/core/system/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

__all__ = [
"CUDA_BINDINGS_NVML_IS_COMPATIBLE",
"get_driver_branch",
"get_kernel_mode_driver_version",
"get_num_devices",
"get_nvml_version",
"get_process_name",
"get_user_mode_driver_version",
]
Expand All @@ -40,7 +42,6 @@
from .exceptions import *
from .exceptions import __all__ as _exceptions_all

__all__.append("get_nvml_version")
__all__.extend(_device_all)
__all__.extend(_system_events_all)
__all__.extend(_exceptions_all)
8 changes: 8 additions & 0 deletions cuda_core/docs/source/api_nvml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,11 @@ Types

Device
NvlinkInfo

Constants
---------

.. autosummary::
:toctree: generated/

CUDA_BINDINGS_NVML_IS_COMPATIBLE
35 changes: 34 additions & 1 deletion cuda_core/docs/source/api_private.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ CUDA runtime

:template: autosummary/cyclass.rst

DeviceResources
_device.DeviceProperties
_device_resources.DeviceResources
_memory._ipc.IPCAllocationHandle
_memory._ipc.IPCBufferDescriptor
_memory._managed_buffer.AccessedBySetProxy
Expand Down Expand Up @@ -125,3 +125,36 @@ NVML
system.typing.TemperatureThresholds
system.typing.ThermalController
system.typing.ThermalTarget

system.NvmlError
system.UninitializedError
system.InvalidArgumentError
system.NotSupportedError
system.NoPermissionError
system.AlreadyInitializedError
system.NotFoundError
system.InsufficientSizeError
system.InsufficientPowerError
system.DriverNotLoadedError
system.TimeoutError
system.IrqIssueError
system.LibraryNotFoundError
system.FunctionNotFoundError
system.CorruptedInforomError
system.GpuIsLostError
system.ResetRequiredError
system.OperatingSystemError
system.LibRmVersionMismatchError
system.InUseError
system.MemoryError
system.NoDataError
system.VgpuEccNotSupportedError
system.InsufficientResourcesError
system.FreqNotSupportedError
system.ArgumentVersionMismatchError
system.DeprecatedError
system.NotReadyError
system.GpuNotFoundError
system.InvalidStateError
system.ResetTypeNotSupportedError
system.UnknownError
1 change: 1 addition & 0 deletions cuda_core/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pytest-randomly = "*"
pytest-repeat = "*"
pytest-rerunfailures = "*"
cloudpickle = "*"
docutils = "*"
psutil = "*"
pyglet = "*"

Expand Down
1 change: 1 addition & 0 deletions cuda_core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ test = [
"pytest-timeout==2.4.0",
"cloudpickle==3.1.2",
"psutil==7.2.2",
"docutils==0.23",
# TODO: remove the Python 3.15 guard once 3.15 is officially supported
"cffi==2.0.0; python_version < '3.15'",
]
Expand Down
Loading
Loading