[PR #67] [MERGED] [ROCm][Windows] Recycle VRAMBuffer VA reservation to avoid HIP VMM crash #101

Closed
opened 2026-10-26 22:24:33 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-aimdo/pull/67
Author: @tvukovic-amd
Created: 6/23/2026
Status: ✅ Merged
Merged: 6/29/2026
Merged by: @rattus128

Base: master ← Head: dev/fix-rocm-windows-vmm-churn-crash


📝 Commits (3)

  • d031d7e recycle VRAMBuffer VA reservation to avoid HIP VMM crash
  • 2362071 Make VA pool lock initialization thread-safe on ROCm/Windows
  • c760f6a Move VA pool to per-device context on ROCm/Windows

📊 Changes

2 files changed (+33 additions, -1 deletions)

View changed files

📝 src/control.h (+6 -0)
📝 src/vrambuf.c (+27 -1)

📄 Description

Recycle HIP VA reservations on ROCm/Windows instead of freeing them every node. Fixes --enable-dynamic-vram crashes (0xE0 in amdhip64_7.dll on hipMemAddressReserve after couple of nodes).
Solution: vrambuf_destroy still unmaps/releases all physical VRAM, but parks the VA window in a pool keyed by (device, max_size). vrambuf_create reuses it instead of reserve/free each time. Linux and CUDA unchanged.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-aimdo/pull/67 **Author:** [@tvukovic-amd](https://github.com/tvukovic-amd) **Created:** 6/23/2026 **Status:** ✅ Merged **Merged:** 6/29/2026 **Merged by:** [@rattus128](https://github.com/rattus128) **Base:** `master` ← **Head:** `dev/fix-rocm-windows-vmm-churn-crash` --- ### 📝 Commits (3) - [`d031d7e`](https://github.com/Comfy-Org/comfy-aimdo/commit/d031d7e0912e7cb80389089c52a6e23540440d6f) recycle VRAMBuffer VA reservation to avoid HIP VMM crash - [`2362071`](https://github.com/Comfy-Org/comfy-aimdo/commit/2362071ff3795a3fd7f8d785a4f1bd76215c6fb2) Make VA pool lock initialization thread-safe on ROCm/Windows - [`c760f6a`](https://github.com/Comfy-Org/comfy-aimdo/commit/c760f6aef4a68cbae4070c92826dcfc64720240b) Move VA pool to per-device context on ROCm/Windows ### 📊 Changes **2 files changed** (+33 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/control.h` (+6 -0) 📝 `src/vrambuf.c` (+27 -1) </details> ### 📄 Description Recycle HIP VA reservations on ROCm/Windows instead of freeing them every node. Fixes `--enable-dynamic-vram` crashes (`0xE0` in `amdhip64_7.dll` on `hipMemAddressReserve` after couple of nodes). Solution: `vrambuf_destroy` still unmaps/releases all physical VRAM, but parks the VA window in a pool keyed by (device, max_size). `vrambuf_create` reuses it instead of reserve/free each time. Linux and CUDA unchanged. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:24:33 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-aimdo#101
No description provided.