Do not pin memory on Intel devices

AFAIK, Intel currently has no equivalent for cudaHost(Un)register. Even if it does, there is no cudaHostUnregister literally and it errors out, so this is good enough to at least make ComfyUI work again.
This commit is contained in:
a-One-Fan 2025-11-09 23:15:06 +02:00
parent 2abd2b5c20
commit bff719976e

View File

@ -1100,7 +1100,7 @@ def pin_memory(tensor):
if MAX_PINNED_MEMORY <= 0:
return False
if not is_device_cpu(tensor.device):
if not is_device_cpu(tensor.device) or is_intel_xpu():
return False
if tensor.is_pinned():
@ -1126,7 +1126,7 @@ def unpin_memory(tensor):
if MAX_PINNED_MEMORY <= 0:
return False
if not is_device_cpu(tensor.device):
if not is_device_cpu(tensor.device) or is_intel_xpu():
return False
ptr = tensor.data_ptr()