mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix
This commit is contained in:
@@ -202,7 +202,7 @@ def einsum_op_cuda(q, k, v):
|
||||
return einsum_op_tensor_mem(q, k, v, mem_free_total / 3.3 / (1 << 20))
|
||||
|
||||
def einsum_op_dml(q, k, v):
|
||||
mem_total, mem_active = devices.adl.memory_stats()
|
||||
mem_total, mem_active = torch.dml.memory_stats(q.device)
|
||||
mem_reserved = mem_total / (1 << 20) * 0.7
|
||||
return einsum_op_tensor_mem(q, k, v, (mem_reserved - mem_active) if mem_reserved > mem_active else 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user