Skip to content

Privatize system.Device helper classes#1942

Open
mdboom wants to merge 1 commit intomainfrom
privatize-system-helper-classes
Open

Privatize system.Device helper classes#1942
mdboom wants to merge 1 commit intomainfrom
privatize-system-helper-classes

Conversation

@mdboom
Copy link
Copy Markdown
Contributor

@mdboom mdboom commented Apr 17, 2026

Also fixes #1941.

Remove helper/data-container classes from cuda.core.system's public API (__all__) since they are not intended to be directly instantiated by users. These classes are returned by Device properties/methods and serve as nested data containers.

Classes removed from __all__: BAR1MemoryInfo, ClockInfo, ClockOffsets, CoolerInfo, DeviceAttributes, DeviceEvents, EventData, FanInfo, FieldValue, FieldValues, GpuDynamicPstatesInfo, GpuDynamicPstatesUtilization, InforomInfo, PciInfo, RepairStatus, Temperature, ThermalSensor, ThermalSettings.

Enums, exceptions, Device itself, and free functions remain public.

Changes

  • Remove helper classes from __all__ in _device.pyx
  • Update api.rst to document helper classes via their private module path (system._device.ClassName)
  • Update Device property/method docstrings to link to helper classes using :obj: role
  • Update tests to import helper classes from _device module

@mdboom mdboom added this to the cuda.core next milestone Apr 17, 2026
@mdboom mdboom added the cuda.core Everything related to the cuda.core module label Apr 17, 2026
@mdboom mdboom self-assigned this Apr 17, 2026
@github-actions
Copy link
Copy Markdown

Remove helper/data-container classes from cuda.core.system's public API
(__all__) since they are not intended to be directly instantiated by
users. These classes are returned by Device properties/methods and serve
as nested data containers.

Classes removed from __all__: BAR1MemoryInfo, ClockInfo, ClockOffsets,
CoolerInfo, DeviceAttributes, DeviceEvents, EventData, FanInfo,
FieldValue, FieldValues, GpuDynamicPstatesInfo,
GpuDynamicPstatesUtilization, InforomInfo, PciInfo, RepairStatus,
Temperature, ThermalSensor, ThermalSettings.

Enums, exceptions, Device itself, and free functions remain public.

Also:
- Update api.rst to document helper classes via their private module
  path (system._device.ClassName)
- Update Device property/method docstrings to link to helper classes
  using :obj:`~ClassName` role
- Update tests to import helper classes from _device module
@mdboom mdboom force-pushed the privatize-system-helper-classes branch from 3bea34c to f3ab66a Compare April 17, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOCS: properties do not link to their type

1 participant