Unverified Commit 7dca0c90 authored by Pleaplusone's avatar Pleaplusone Committed by GitHub
Browse files

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


Signed-off-by: default avatarganyi <ygan@amd.com>
parent 1a0b157a
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment