[Bugfix] Use is_integrated to detect UMA GPUs for memory reporting (#35356)

Signed-off-by: haosdent <haosdent@gmail.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
haosdent
2026-04-13 11:07:40 -07:00
committed by GitHub
co-authored by DarkLight1337
parent 739e5945dc
commit 995e9a209e
4 changed files with 83 additions and 16 deletions
+4
View File
@@ -548,6 +548,10 @@ class CudaPlatformBase(Platform):
"""Currently, only Hopper and Blackwell GPUs are supported."""
return cls.is_device_capability(90) or cls.is_device_capability_family(100)
@classmethod
def is_integrated_gpu(cls, device_id: int = 0) -> bool:
return bool(torch.cuda.get_device_properties(device_id).is_integrated)
@classmethod
def num_compute_units(cls, device_id: int = 0) -> int:
return torch.cuda.get_device_properties(device_id).multi_processor_count