Developer Referencegpu_stats
GPUStat
One GPU's live reading in the units the stats collectors serialize.
Attributes
attribute__slots__= ('id', 'load', 'memoryTotal', 'memoryUsed', 'pci', 'vendor')attributeid= gpu_idPosition of this GPU in the merged detection list.
attributeload= loadUtilization as a 0..1 fraction.
attributememoryTotal= memory_totalTotal device memory in MiB.
attributememoryUsed= memory_usedUsed device memory in MiB.
attributepci= pciNormalized PCI address (lowercase, 4-hex-digit domain), or None when the source cannot name one.
attributevendor= vendorVendor keyword (nvidia/amd/intel/apple), or None.
Functions
func__init__(self, gpu_id, load, memory_total, memory_used, pci=None, vendor=None) -> NoneSource Code
def __init__(
self,
gpu_id: int,
load: float,
memory_total: float,
memory_used: float,
pci: Optional[str] = None,
vendor: Optional[str] = None,
) -> None:
self.id = gpu_id
self.load = load
self.memoryTotal = memory_total
self.memoryUsed = memory_used
self.pci = pci
self.vendor = vendorparamselfparamgpu_idintparamloadfloatparammemory_totalfloatparammemory_usedfloatparampciOptional[str]= NoneparamvendorOptional[str]= NoneReturns
None