[PR #35] [MERGED] AMD Support #74

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

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-aimdo/pull/35
Author: @rattus128
Created: 4/20/2026
Status: ✅ Merged
Merged: 4/21/2026
Merged by: @rattus128

Base: master ← Head: dev/linkless-hip


📝 Commits (10+)

  • 639124d Add platform-specific defines to enable compilation with HIP
  • 659b3dc HIP async support needs access to the original functions on Linux
  • 3bff535 Simultaneous cuda+rocm support
  • d53839b Assume nvidia if autodetection fails
  • 34557d9 ROCm build script
  • a81e95f HIP: Windows support
  • 349e73b Add Windows ROCm build script
  • 7421008 Safely handle lib cleanup in model_vbar
  • c6b8f27 Improve validation and error handling in Windows ROCm build script
  • faea564 Fix windows build script

📊 Changes

19 files changed (+688 additions, -94 deletions)

View changed files

📝 .github/workflows/build-wheels.yml (+11 -20)
📝 comfy_aimdo/control.py (+45 -6)
📝 docker/cuda-on-manylinux.Dockerfile (+1 -11)
📝 scripts/build-linux-aimdo.sh (+16 -9)
➕ src-cuda/dispatch.c (+124 -0)
➕ src-hip/dispatch.c (+133 -0)
📝 src-posix/cuda-funchooks.c (+7 -19)
➕ src-posix/module-load.c (+43 -0)
📝 src-win/cuda-detour.c (+9 -15)
➕ src-win/module-load.c (+16 -0)
📝 src-win/shmem-detect.c (+48 -3)
📝 src/control.c (+14 -1)
📝 src/control.h (+1 -1)
📝 src/cuda-hooks-shared.h (+7 -6)
➕ src/gpu_abi.h (+90 -0)
➕ src/gpu_dispatch.h (+77 -0)
📝 src/model-vbar.c (+1 -0)
📝 src/plat.h (+39 -2)
📝 src/vrambuf.c (+6 -1)

📄 Description

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.

Refactor Nvidia to link everything at runtime via libdl (and windows equivalents, and then implement AMD support via HIP the same way.

PR #2 is merged in with a conflict resolution and the basic rework for the runtime linkage.


🔄 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/35 **Author:** [@rattus128](https://github.com/rattus128) **Created:** 4/20/2026 **Status:** ✅ Merged **Merged:** 4/21/2026 **Merged by:** [@rattus128](https://github.com/rattus128) **Base:** `master` ← **Head:** `dev/linkless-hip` --- ### 📝 Commits (10+) - [`639124d`](https://github.com/Comfy-Org/comfy-aimdo/commit/639124d64ed490568dfeb3f5243f9c458d21f525) Add platform-specific defines to enable compilation with HIP - [`659b3dc`](https://github.com/Comfy-Org/comfy-aimdo/commit/659b3dcc32c5b9a4c9a07148be375cf5000d1f3c) HIP async support needs access to the original functions on Linux - [`3bff535`](https://github.com/Comfy-Org/comfy-aimdo/commit/3bff53543ded7c09b321114b361998e3b1a86f07) Simultaneous cuda+rocm support - [`d53839b`](https://github.com/Comfy-Org/comfy-aimdo/commit/d53839b9a089dcc9728be01eb9f835b846b38bdd) Assume nvidia if autodetection fails - [`34557d9`](https://github.com/Comfy-Org/comfy-aimdo/commit/34557d977d1507f90e2aebd9bbbcf2c69464d66a) ROCm build script - [`a81e95f`](https://github.com/Comfy-Org/comfy-aimdo/commit/a81e95f94b9bcf40f0a78e7322b1c024f186c553) HIP: Windows support - [`349e73b`](https://github.com/Comfy-Org/comfy-aimdo/commit/349e73b93d2cbbf9b64d6e7fffb4dcb11f4b3649) Add Windows ROCm build script - [`7421008`](https://github.com/Comfy-Org/comfy-aimdo/commit/742100801c98caf2531f3347dc28c6d76f70f71b) Safely handle lib cleanup in model_vbar - [`c6b8f27`](https://github.com/Comfy-Org/comfy-aimdo/commit/c6b8f27b67fe214b6edc530597f7dd546613a22a) Improve validation and error handling in Windows ROCm build script - [`faea564`](https://github.com/Comfy-Org/comfy-aimdo/commit/faea564d2317de2f5414b4b222d4f0605a384923) Fix windows build script ### 📊 Changes **19 files changed** (+688 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build-wheels.yml` (+11 -20) 📝 `comfy_aimdo/control.py` (+45 -6) 📝 `docker/cuda-on-manylinux.Dockerfile` (+1 -11) 📝 `scripts/build-linux-aimdo.sh` (+16 -9) ➕ `src-cuda/dispatch.c` (+124 -0) ➕ `src-hip/dispatch.c` (+133 -0) 📝 `src-posix/cuda-funchooks.c` (+7 -19) ➕ `src-posix/module-load.c` (+43 -0) 📝 `src-win/cuda-detour.c` (+9 -15) ➕ `src-win/module-load.c` (+16 -0) 📝 `src-win/shmem-detect.c` (+48 -3) 📝 `src/control.c` (+14 -1) 📝 `src/control.h` (+1 -1) 📝 `src/cuda-hooks-shared.h` (+7 -6) ➕ `src/gpu_abi.h` (+90 -0) ➕ `src/gpu_dispatch.h` (+77 -0) 📝 `src/model-vbar.c` (+1 -0) 📝 `src/plat.h` (+39 -2) 📝 `src/vrambuf.c` (+6 -1) </details> ### 📄 Description ### 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). Refactor Nvidia to link everything at runtime via libdl (and windows equivalents, and then implement AMD support via HIP the same way. PR #2 is merged in with a conflict resolution and the basic rework for the runtime linkage. --- <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:20 +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#74
No description provided.