mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
Show device information log for DirectML.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user