Pinned mem also seems to work on AMD.

This commit is contained in:
comfyanonymous 2025-11-05 19:06:41 -05:00 committed by GitHub
parent 1d69245981
commit 6c8a4fbcd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1087,7 +1087,7 @@ PINNED_MEMORY = {}
TOTAL_PINNED_MEMORY = 0
MAX_PINNED_MEMORY = -1
if not args.disable_pinned_memory:
if is_nvidia():
if is_nvidia() or is_amd():
if WINDOWS:
MAX_PINNED_MEMORY = get_total_memory(torch.device("cpu")) * 0.45 # Windows limit is apparently 50%
else: