Add some warnings for pin and unpin errors.

This commit is contained in:
comfyanonymous 2025-12-29 18:21:47 -05:00 committed by GitHub
parent 9ca7e143af
commit 1261718746
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1169,6 +1169,7 @@ def pin_memory(tensor):
TOTAL_PINNED_MEMORY += size TOTAL_PINNED_MEMORY += size
return True return True
else: else:
logging.warning("Pin error.")
discard_cuda_async_error() discard_cuda_async_error()
return False return False
@ -1199,6 +1200,7 @@ def unpin_memory(tensor):
TOTAL_PINNED_MEMORY = 0 TOTAL_PINNED_MEMORY = 0
return True return True
else: else:
logging.warning("Unpin error.")
discard_cuda_async_error() discard_cuda_async_error()
return False return False