Skip to content

Commit 32dff8e

Browse files
committed
Make properties
1 parent b97924a commit 32dff8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cuda_core/cuda/core/system/_mig.pxi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ cdef class MigInfo:
9595
_, pending = nvml.device_get_mig_mode(self._device._handle)
9696
return pending == nvml.EnableState.FEATURE_ENABLED
9797

98-
def get_device_count(self) -> int:
98+
@property
99+
def device_count(self) -> int:
99100
"""
100101
Get the maximum number of MIG devices that can exist under this device.
101102

@@ -110,7 +111,8 @@ cdef class MigInfo:
110111
"""
111112
return nvml.device_get_max_mig_device_count(self._device._handle)
112113

113-
def get_parent_device(self) -> Device:
114+
@property
115+
def parent(self) -> Device:
114116
"""
115117
For MIG devices, get the parent GPU device.
116118

0 commit comments

Comments
 (0)