mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-09 05:40:49 +08:00
Add some warnings for pin and unpin errors.
This commit is contained in:
parent
9ca7e143af
commit
1261718746
@ -1169,6 +1169,7 @@ def pin_memory(tensor):
|
||||
TOTAL_PINNED_MEMORY += size
|
||||
return True
|
||||
else:
|
||||
logging.warning("Pin error.")
|
||||
discard_cuda_async_error()
|
||||
|
||||
return False
|
||||
@ -1199,6 +1200,7 @@ def unpin_memory(tensor):
|
||||
TOTAL_PINNED_MEMORY = 0
|
||||
return True
|
||||
else:
|
||||
logging.warning("Unpin error.")
|
||||
discard_cuda_async_error()
|
||||
|
||||
return False
|
||||
|
||||
Loading…
Reference in New Issue
Block a user