mirror of
https://github.com/Comfy-Org/comfy-aimdo.git
synced 2026-11-04 23:37:21 +00:00
[GH-ISSUE #99] [ROCm multi-GPU] account_free uses the current device instead of the allocation owner #35
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-aimdo#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rusantiman on GitHub (Aug 30, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-aimdo/issues/99
Summary
On Windows ROCm with multiple GPUs visible, comfy-aimdo 0.4.15 can fail to account a free when a pointer was allocated on one GPU but another GPU is current when the pointer is freed.
The warning is:
account_free: could not account freeThis is reproducible without DynamicVRAM or VBAR.
Environment
Minimal reproduction
I tested a small allocator probe without DynamicVRAM/VBAR.
Case 1: 2 GPUs visible, mismatched current device
Result:
account_free: could not account freeThe probe produced 3 accounting misses.
The AIMDO log reported:
Total VRAM for VBARs: 0 MBso this does not require DynamicVRAM/VBAR.
Case 2: 2 GPUs visible, current device matches allocation owner
Allocate and free on the same current device.
Result:
No
account_freemisses.Case 3: 1 GPU visible
Run the same allocation/free probe with only one GPU visible.
Result:
No
account_freemisses.Diagnosis
The failure appears to occur because the free/accounting path uses the current device's allocation table rather than locating the device that actually owns the tracked allocation.
For example:
account_free: could not account freeDynamicVRAM/VBAR-heavy workflows make this easier to trigger, but VBAR is not required.
Impact
In my larger ComfyUI test workload with stock comfy-aimdo 0.4.15, this warning occurred 119 times.
The tested workflows still completed, so I am not claiming this accounting issue alone causes a crash. However, it leaves AIMDO's per-device allocation accounting inconsistent in multi-GPU use.
Local fix
I have tested a local fix that looks up the actual allocation owner and performs the free/accounting operation using that owner's device/context.