mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
Autodetect IPEX
This commit is contained in:
+1
-1
@@ -605,7 +605,7 @@ class Api:
|
||||
ram = { 'error': f'{err}' }
|
||||
try:
|
||||
import torch
|
||||
if shared.cmd_opts.use_ipex:
|
||||
if devices.backend == 'ipex':
|
||||
system = { 'free': (torch.xpu.get_device_properties(shared.device).total_memory - torch.xpu.memory_allocated()), 'used': torch.xpu.memory_allocated(), 'total': torch.xpu.get_device_properties(shared.device).total_memory }
|
||||
s = dict(torch.xpu.memory_stats())
|
||||
allocated = { 'current': s['allocated_bytes.all.current'], 'peak': s['allocated_bytes.all.peak'] }
|
||||
|
||||
Reference in New Issue
Block a user