mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-11 14:02:37 +08:00
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:
parent
2abd2b5c20
commit
bff719976e
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user