@@ -215,23 +215,23 @@ cdef class Device:
215215 return nvml.device_get_minor_number(self._handle )
216216
217217 @property
218- def is_c2c_mode_enabled (self ) -> bool:
218+ def is_c2c_enabled (self ) -> bool:
219219 """
220220 Whether the C2C (Chip-to-Chip ) mode is enabled for this device.
221221 """
222222 return bool(nvml.device_get_c2c_mode_info_v(self._handle ).is_c2c_enabled )
223223
224224 @property
225- def persistence_mode_enabled (self ) -> bool:
225+ def persistence_mode (self ) -> bool:
226226 """
227227 Whether persistence mode is enabled for this device.
228228
229229 For Linux only.
230230 """
231231 return nvml.device_get_persistence_mode(self._handle ) == nvml.EnableState.FEATURE_ENABLED
232232
233- @persistence_mode_enabled .setter
234- def persistence_mode_enabled (self , enabled: bool ) -> None:
233+ @persistence_mode .setter
234+ def persistence_mode (self , enabled: bool ) -> None:
235235 nvml.device_set_persistence_mode(
236236 self._handle ,
237237 nvml.EnableState.FEATURE_ENABLED if enabled else nvml.EnableState.FEATURE_DISABLED
@@ -409,13 +409,14 @@ cdef class Device:
409409 # CLOCK
410410 # See external class definitions in _clock.pxi
411411
412- def clock (self , clock_type: ClockType ) -> ClockInfo:
412+ def get_clock (self , clock_type: ClockType ) -> ClockInfo:
413413 """
414414 Get information about and manage a specific clock on a device.
415415 """
416416 return ClockInfo(self._handle , clock_type )
417417
418- def get_auto_boosted_clocks_enabled(self ) -> tuple[bool , bool]:
418+ @property
419+ def is_auto_boosted_clocks_enabled(self ) -> tuple[bool , bool]:
419420 """
420421 Retrieve the current state of auto boosted clocks on a device.
421422
@@ -440,7 +441,8 @@ cdef class Device:
440441 current , default = nvml.device_get_auto_boosted_clocks_enabled(self ._handle)
441442 return current == nvml.EnableState.FEATURE_ENABLED , default == nvml.EnableState.FEATURE_ENABLED
442443
443- def get_current_clock_event_reasons(self ) -> list[ClocksEventReasons]:
444+ @property
445+ def current_clock_event_reasons(self ) -> list[ClocksEventReasons]:
444446 """
445447 Retrieves the current clocks event reasons.
446448
@@ -450,7 +452,8 @@ cdef class Device:
450452 reasons[0] = nvml.device_get_current_clocks_event_reasons(self._handle )
451453 return [ClocksEventReasons(1 << reason ) for reason in _unpack_bitmask(reasons )]
452454
453- def get_supported_clock_event_reasons(self ) -> list[ClocksEventReasons]:
455+ @property
456+ def supported_clock_event_reasons(self ) -> list[ClocksEventReasons]:
454457 """
455458 Retrieves supported clocks event reasons that can be returned by
456459 :meth:`get_current_clock_event_reasons`.
@@ -492,17 +495,17 @@ cdef class Device:
492495 # DISPLAY
493496
494497 @property
495- def display_mode (self ) -> bool:
498+ def is_display_connected (self ) -> bool:
496499 """
497500 The display mode for this device.
498501
499502 Indicates whether a physical display (e.g. monitor ) is currently connected to
500503 any of the device's connectors.
501504 """
502- return True if nvml.device_get_display_mode(self._handle ) == nvml.EnableState.FEATURE_ENABLED else False
505+ return nvml.device_get_display_mode(self._handle ) == nvml.EnableState.FEATURE_ENABLED
503506
504507 @property
505- def display_active (self ) -> bool:
508+ def is_display_active (self ) -> bool:
506509 """
507510 The display active status for this device.
508511
@@ -512,7 +515,7 @@ cdef class Device:
512515
513516 Display can be active even when no monitor is physically attached.
514517 """
515- return True if nvml.device_get_display_active(self._handle ) == nvml.EnableState.FEATURE_ENABLED else False
518+ return nvml.device_get_display_active(self._handle ) == nvml.EnableState.FEATURE_ENABLED
516519
517520 ##########################################################################
518521 # EVENTS
@@ -580,7 +583,7 @@ cdef class Device:
580583 # FAN
581584 # See external class definitions in _fan.pxi
582585
583- def fan (self, fan: int = 0) -> FanInfo:
586+ def get_fan (self, fan: int = 0) -> FanInfo:
584587 """
585588 Get information and manage a specific fan on a device.
586589 """
@@ -707,7 +710,8 @@ cdef class Device:
707710 """
708711 return GpuDynamicPstatesInfo(nvml.device_get_dynamic_pstates_info(self._handle))
709712
710- def get_supported_pstates(self) -> list[Pstates]:
713+ @property
714+ def supported_pstates(self) -> list[Pstates]:
711715 """
712716 Get all supported Performance States (P- States) for the device.
713717
0 commit comments