[PR #68] [CLOSED] Make WDDM init non-fatal so aimdo works under Hyper-V GPU-PV #100

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/68
Author: @carmethene
Created: 6/27/2026
Status: ❌ Closed

Base: master ← Head: dev/hyperv-wddm-nonfatal


📝 Commits (1)

  • 32b2a48 make aimdo_wddm_init non-fatal (fixes startup under Hyper-V GPU-PV)

📊 Changes

1 file changed (+5 additions, -2 deletions)

View changed files

📝 src/control.c (+5 -2)

📄 Description

Problem

On Windows running under Hyper-V with a paravirtualized GPU (GPU-PV), aimdo fails to initialize. aimdo_wddm_init() can't resolve a usable DXGI adapter (adapter enumeration / LUID match fails on the paravirtualized device), and because init() treated it as a hard requirement, the whole init aborted via goto fail.

Fix

Treat aimdo_wddm_init() as best-effort. It already sets g_wddm_adapter = NULL on every failure path, and poll_budget_deficit():

  • guards the WDDM QueryVideoMemoryInfo call with if (g_wddm_adapter), and
  • always runs the cuMemGetInfo path regardless,

so with no WDDM adapter, budget tracking falls back to CUDA's cuMemGetInfo, which is adequate. No behavior change on systems where WDDM init succeeds.

Testing

Confirmed aimdo now starts and runs on Windows under Hyper-V GPU-PV, where it previously failed at init.
System is a Windows 11 Pro Host/Guest with an RTX 5090.

Contribution Agreement

  • I agree that my contributions are licensed under the GPLv3.
  • I grant Comfy Org the rights to relicense these contributions as outlined in CONTRIBUTING.md.

🔄 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/68 **Author:** [@carmethene](https://github.com/carmethene) **Created:** 6/27/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dev/hyperv-wddm-nonfatal` --- ### 📝 Commits (1) - [`32b2a48`](https://github.com/Comfy-Org/comfy-aimdo/commit/32b2a48d2090f0f3197b7dae3765f0cb8ee1f852) make aimdo_wddm_init non-fatal (fixes startup under Hyper-V GPU-PV) ### 📊 Changes **1 file changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/control.c` (+5 -2) </details> ### 📄 Description ## Problem On Windows running under Hyper-V with a paravirtualized GPU (GPU-PV), aimdo fails to initialize. `aimdo_wddm_init()` can't resolve a usable DXGI adapter (adapter enumeration / LUID match fails on the paravirtualized device), and because `init()` treated it as a hard requirement, the whole init aborted via `goto fail`. ## Fix Treat `aimdo_wddm_init()` as best-effort. It already sets `g_wddm_adapter = NULL` on every failure path, and `poll_budget_deficit()`: - guards the WDDM `QueryVideoMemoryInfo` call with `if (g_wddm_adapter)`, and - always runs the `cuMemGetInfo` path regardless, so with no WDDM adapter, budget tracking falls back to CUDA's `cuMemGetInfo`, which is adequate. No behavior change on systems where WDDM init succeeds. ## Testing Confirmed aimdo now starts and runs on Windows under Hyper-V GPU-PV, where it previously failed at init. System is a Windows 11 Pro Host/Guest with an RTX 5090. ### Contribution Agreement - [X] I agree that my contributions are licensed under the GPLv3. - [X] I grant **Comfy Org** the rights to relicense these contributions as outlined in [CONTRIBUTING.md](./CONTRIBUTING.md). --- <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#100
No description provided.