File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ from __future__ import annotations
44
55from libcpp .memory import shared_ptr
66
7+ p_cuDevSmResourceSplit = _get_optional_driver_fn ('cuDevSmResourceSplit' )
78ContextHandle = shared_ptr
89GreenCtxHandle = shared_ptr
910StreamHandle = shared_ptr
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments