Skip to content

Commit bbcd825

Browse files
[pre-commit.ci] auto code formatting
1 parent 1aeb0f9 commit bbcd825

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

cuda_core/cuda/core/_resource_handles.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ from __future__ import annotations
44

55
from libcpp.memory import shared_ptr
66

7+
p_cuDevSmResourceSplit = _get_optional_driver_fn('cuDevSmResourceSplit')
78
ContextHandle = shared_ptr
89
GreenCtxHandle = shared_ptr
910
StreamHandle = shared_ptr

cuda_core/cuda/core/system/_device.pyi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,15 @@ class Device:
13731373
-------
13741374
cuda.core.Device
13751375
The corresponding CUDA device.
1376+
1377+
Raises
1378+
------
1379+
RuntimeError
1380+
No corresponding CUDA device is found for this NVML device.
1381+
1382+
For example, on a MIG system, the physical GPU will not have an
1383+
available CUDA device, since it can not be used directly, even
1384+
though it can be enumerated from NVML.
13761385
"""
13771386

13781387
@classmethod
@@ -1721,6 +1730,9 @@ class Device:
17211730
def pci_info(self) -> PciInfo:
17221731
"""
17231732
:obj:`~_device.PciInfo` object with the PCI attributes of this device.
1733+
1734+
Non-physical devices, such as MIG devices, may not have PCI attributes.
1735+
In that case, this property will raise a `RuntimeError`.
17241736
"""
17251737

17261738
@property

0 commit comments

Comments
 (0)