Support CPU again.

This commit is contained in:
Nicolas Patry 2024-05-06 20:00:56 +02:00
parent c56df3b167
commit 361263afbf

View File

@ -39,3 +39,12 @@ elif is_xpu_available():
empty_cache = torch.xpu.empty_cache
synchronize = torch.xpu.synchronize
get_free_memory = get_xpu_free_memory
else:
SYSTEM = "cpu"
def noop(*args, **kwargs):
pass
empty_cache = noop
synchronize = noop
get_free_memory = noop