@@ -159,7 +159,7 @@ cdef class Device:
159159 @property
160160 def arch(self ) -> DeviceArch:
161161 """
162- Device architecture.
162+ :obj:`~DeviceArch` device architecture.
163163
164164 For example , a Tesla V100 will report ``DeviceArchitecture.name ==
165165 "VOLTA"``, and RTX A6000 will report ``DeviceArchitecture.name ==
@@ -177,7 +177,7 @@ cdef class Device:
177177 @property
178178 def brand(self ) -> BrandType:
179179 """
180- Brand of the device
180+ :obj:`~BrandType` brand of the device
181181 """
182182 return BrandType(nvml.device_get_brand(self._handle ))
183183
@@ -289,7 +289,7 @@ cdef class Device:
289289
290290 Returns
291291 -------
292- Iterator of Device
292+ Iterator over :obj:`~ Device`
293293 An iterator over available devices.
294294 """
295295 for device_id in range(nvml.device_get_count_v2()):
@@ -301,7 +301,7 @@ cdef class Device:
301301 @property
302302 def addressing_mode (self ) -> AddressingMode:
303303 """
304- Get the addressing mode of the device.
304+ Get the :obj:`~AddressingMode` of the device.
305305
306306 Addressing modes can be one of:
307307
@@ -334,7 +334,7 @@ cdef class Device:
334334
335335 Returns
336336 -------
337- Iterator of Device
337+ Iterator of :obj:`~ Device`
338338 An iterator over available devices.
339339 """
340340 cdef Device device
@@ -411,7 +411,7 @@ cdef class Device:
411411
412412 def clock (self , clock_type: ClockType ) -> ClockInfo:
413413 """
414- Get information about and manage a specific clock on a device.
414+ :obj:`~_device.ClockInfo` object to get information about and manage a specific clock on a device.
415415 """
416416 return ClockInfo(self._handle , clock_type )
417417
@@ -442,7 +442,7 @@ cdef class Device:
442442
443443 def get_current_clock_event_reasons(self ) -> list[ClocksEventReasons]:
444444 """
445- Retrieves the current clocks event reasons .
445+ Retrieves the current :obj:`~ClocksEventReasons` .
446446
447447 For all fully supported products.
448448 """
@@ -452,7 +452,7 @@ cdef class Device:
452452
453453 def get_supported_clock_event_reasons(self ) -> list[ClocksEventReasons]:
454454 """
455- Retrieves supported clocks event reasons that can be returned by
455+ Retrieves supported :obj:`~ClocksEventReasons` that can be returned by
456456 :meth:`get_current_clock_event_reasons`.
457457
458458 For all fully supported products.
@@ -470,7 +470,7 @@ cdef class Device:
470470 @property
471471 def cooler(self ) -> CoolerInfo:
472472 """
473- Get information about cooler on a device.
473+ :obj:`~_device.CoolerInfo` object with cooler information for the device.
474474 """
475475 return CoolerInfo(nvml.device_get_cooler_info(self._handle ))
476476
@@ -481,7 +481,7 @@ cdef class Device:
481481 @property
482482 def attributes(self ) -> DeviceAttributes:
483483 """
484- Get various device attributes.
484+ :obj:`~_device.DeviceAttributes` object with various device attributes.
485485
486486 For Ampere™ or newer fully supported devices. Only available on Linux
487487 systems.
@@ -549,9 +549,9 @@ cdef class Device:
549549
550550 Returns
551551 -------
552- :class :` DeviceEvents`
552+ :obj:` ~ _device. DeviceEvents`
553553 An object representing the registered events. Call
554- :meth:`DeviceEvents.wait` on this object to wait for events.
554+ :meth:`~ _device. DeviceEvents.wait` on this object to wait for events.
555555
556556 Raises
557557 ------
@@ -582,7 +582,7 @@ cdef class Device:
582582
583583 def fan(self, fan: int = 0) -> FanInfo:
584584 """
585- Get information and manage a specific fan on a device.
585+ :obj:` ~ _device.FanInfo` object to get information and manage a specific fan on a device.
586586 """
587587 if fan < 0 or fan >= self.num_fans:
588588 raise ValueError(f"Fan index {fan} is out of range [0, {self.num_fans})")
@@ -605,22 +605,22 @@ cdef class Device:
605605
606606 Each value specified can raise its own exception. That exception will
607607 be raised when attempting to access the corresponding ``value`` from the
608- returned :class :` FieldValues` container.
608+ returned :obj:` ~ _device. FieldValues` container.
609609
610610 To confirm that there are no exceptions in the entire container, call
611- :meth:`FieldValues.validate`.
611+ :meth:`~ _device. FieldValues.validate`.
612612
613613 Parameters
614614 ----------
615- field_ids: list of int or tuple of ( int , int )
615+ field_ids: list [ int | tuple [ int , int ]]
616616 List of field IDs to query.
617617
618618 Each item may be either a single value from the :class :`FieldId`
619619 enum , or a pair of (:class :`FieldId`, scope ID).
620620
621621 Returns
622622 -------
623- :class :` FieldValues`
623+ :obj:` ~ _device. FieldValues`
624624 Container of field values corresponding to the requested field IDs.
625625 """
626626 return FieldValues(nvml.device_get_field_values(self._handle, field_ids))
@@ -631,7 +631,7 @@ cdef class Device:
631631
632632 Parameters
633633 ----------
634- field_ids: list of int or tuple of ( int , int )
634+ field_ids: list [ int | tuple [ int , int ]]
635635 List of field IDs to clear.
636636
637637 Each item may be either a single value from the :class :`FieldId`
@@ -646,7 +646,7 @@ cdef class Device:
646646 @property
647647 def inforom(self) -> InforomInfo:
648648 """
649- Accessor for InfoROM information.
649+ :obj:` ~ _device.InforomInfo` object with InfoROM information.
650650
651651 For all products with an InfoROM.
652652 """
@@ -659,7 +659,7 @@ cdef class Device:
659659 @property
660660 def bar1_memory_info(self) -> BAR1MemoryInfo:
661661 """
662- Get information about BAR1 memory.
662+ :obj:` ~ _device.BAR1MemoryInfo` object with BAR1 memory information .
663663
664664 BAR1 is used to map the FB (device memory) so that it can be directly
665665 accessed by the CPU or by 3 rd party devices (peer- to- peer on the PCIE
@@ -670,7 +670,7 @@ cdef class Device:
670670 @property
671671 def memory_info(self) -> MemoryInfo:
672672 """
673- Object with memory information.
673+ :obj:` ~ _device.MemoryInfo` object with memory information.
674674 """
675675 return MemoryInfo(nvml.device_get_memory_info_v2(self._handle))
676676
@@ -681,7 +681,7 @@ cdef class Device:
681681 @property
682682 def pci_info(self) -> PciInfo:
683683 """
684- The PCI attributes of this device.
684+ :obj:` ~ _device.PciInfo` object with the PCI attributes of this device.
685685 """
686686 return PciInfo(nvml.device_get_pci_info_ext(self._handle), self._handle)
687687
@@ -703,7 +703,7 @@ cdef class Device:
703703 @property
704704 def dynamic_pstates_info(self) -> GpuDynamicPstatesInfo:
705705 """
706- Retrieve performance monitor samples from the associated subdevice.
706+ :obj:` ~ _device.GpuDynamicPstatesInfo` object with performance monitor samples from the associated subdevice.
707707 """
708708 return GpuDynamicPstatesInfo(nvml.device_get_dynamic_pstates_info(self._handle))
709709
@@ -713,6 +713,11 @@ cdef class Device:
713713
714714 The returned list contains a contiguous list of valid P- States supported by
715715 the device.
716+
717+ Return
718+ ------
719+ list [Pstates]
720+ A list of supported P- States for the device.
716721 """
717722 return [Pstates(x) for x in nvml.device_get_supported_performance_states(self._handle)]
718723
@@ -723,7 +728,7 @@ cdef class Device:
723728 @property
724729 def repair_status(self) -> RepairStatus:
725730 """
726- Get the repair status for TPC/ Channel repair.
731+ :obj:` ~ _device.RepairStatus` object with TPC/ Channel repair status .
727732
728733 For Ampere™ or newer fully supported devices.
729734 """
@@ -736,7 +741,7 @@ cdef class Device:
736741 @property
737742 def temperature(self) -> Temperature:
738743 """
739- Get information about temperatures on a device.
744+ :obj:` ~ _device.Temperature` object with temperature information for the device.
740745 """
741746 return Temperature(self._handle)
742747
@@ -822,46 +827,27 @@ def get_p2p_status(device1: Device, device2: Device, index: GpuP2PCapsIndex) ->
822827__all__ = [
823828 "AddressingMode",
824829 "AffinityScope",
825- "BAR1MemoryInfo",
826830 "BrandType",
827831 "ClockId",
828- "ClockInfo",
829- "ClockOffsets",
830832 "ClocksEventReasons",
831833 "ClockType",
832834 "CoolerControl",
833- "CoolerInfo",
834835 "CoolerTarget",
835836 "Device",
836837 "DeviceArch",
837- "DeviceAttributes",
838- "DeviceEvents",
839- "EventData",
840838 "EventType",
841839 "FanControlPolicy",
842- "FanInfo",
843840 "FieldId",
844- "FieldValue",
845- "FieldValues",
846841 "get_p2p_status",
847842 "get_topology_common_ancestor",
848- "GpuDynamicPstatesInfo",
849- "GpuDynamicPstatesUtilization",
850843 "GpuP2PCapsIndex",
851844 "GpuP2PStatus",
852845 "GpuTopologyLevel",
853- "InforomInfo",
854846 "InforomObject",
855- "MemoryInfo",
856847 "PcieUtilCounter",
857- "PciInfo",
858848 "Pstates",
859- "RepairStatus",
860- "Temperature",
861849 "TemperatureSensors",
862850 "TemperatureThresholds",
863851 "ThermalController",
864- "ThermalSensor",
865- "ThermalSettings",
866852 "ThermalTarget",
867853]
0 commit comments