adding runtime metrics / system info additional accelerator support, etc.
This commit is contained in:
@@ -298,15 +298,13 @@ class TelemetryManager:
|
|||||||
elif hasattr(torch, "npu") and torch.npu.is_available():
|
elif hasattr(torch, "npu") and torch.npu.is_available():
|
||||||
accelerator_type = "npu"
|
accelerator_type = "npu"
|
||||||
for i in range(torch.npu.device_count()):
|
for i in range(torch.npu.device_count()):
|
||||||
name = getattr(torch.npu, "get_device_name", lambda x: "NPU")(i)
|
|
||||||
|
|
||||||
memory = None
|
memory = None
|
||||||
if hasattr(torch.npu, "get_device_properties"):
|
if hasattr(torch.npu, "get_device_properties"):
|
||||||
memory = torch.npu.get_device_properties(i).total_memory
|
memory = torch.npu.get_device_properties(i).total_memory
|
||||||
|
|
||||||
gpu_info.append(
|
gpu_info.append(
|
||||||
{
|
{
|
||||||
"name": name,
|
"name": torch.npu.get_device_name(i),
|
||||||
"memory": memory,
|
"memory": memory,
|
||||||
"type": "npu",
|
"type": "npu",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user