Show device information log for DirectML.

This commit is contained in:
Seunghoon Lee
2023-10-17 12:24:27 +09:00
parent bb912c35f9
commit 36bef98cd5
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -45,6 +45,11 @@ def get_gpu_info():
'device': get_openvino_device(),
'openvino': get_package_version("openvino"),
}
elif shared.cmd_opts.use_directml:
return {
'device': f'{torch.cuda.get_device_name(torch.cuda.current_device())} n={torch.cuda.device_count()}',
'directml': get_package_version("torch-directml"),
}
else:
return {}
except Exception:
+1 -2
View File
@@ -60,10 +60,9 @@ class DirectML:
return DeviceProperties(get_device(device))
def memory_stats(device: Optional[rDevice]=None):
mem_stat_fill = "DirectMLDevice"
return {
"num_ooms": 0,
"num_alloc_retries": mem_stat_fill,
"num_alloc_retries": 0,
}
mem_get_info: Callable = mem_get_info