[BugFix][ROCm] Fix get_cu_count missing variable error (#28608)

Signed-off-by: ganyi <ygan@amd.com>
This commit is contained in:
Pleaplusone 2025-11-13 13:18:56 +08:00 committed by GitHub
parent 1a0b157a2e
commit 7dca0c90cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ def xpu_is_initialized() -> bool:
return torch.xpu.is_initialized()
def get_cu_count(cls, device_id: int = 0) -> int:
def get_cu_count(device_id: int = 0) -> int:
"""Returns the total number of compute units (CU) on single GPU."""
return torch.cuda.get_device_properties(device_id).multi_processor_count