Add aarch64/ARM64 Linux build support#36
Conversation
| FUNCHOOK_BUILD_DIR="$BUILD_DIR/funchook-$FUNCHOOK_VERSION-distorm" | ||
| CUDA_INCLUDE_DIR="${CUDA_INCLUDE_DIR:-/usr/local/cuda-12.1/include}" | ||
| CUDA_STUB_DIR="${CUDA_STUB_DIR:-/usr/local/cuda-12.1/targets/x86_64-linux/lib/stubs}" | ||
| fi |
There was a problem hiding this comment.
I just merged #35 which is going to conflict here. That should make life easier after the rebase as we dont have cuda (or hip) as a build-time dep anymore.
|
For Is and Ts can you accept the contributor agreement by either pull description edit or reply here? We are using a dual license arrangement for Aimdo. Otherwise, I merged this to a dev/ branch, resolved conflicts and there are some wheels here: https://github.com/Comfy-Org/comfy-aimdo/actions/runs/24751946012 I'm arranging access to a DGX spark so I can test this myself, and then ill PR the dev/ branch. |
|
I'll take a look and see if I can resolve the conflicts, thanks |
Detect architecture at build time and select the appropriate funchook disassembler (capstone for aarch64, distorm for x86_64) and CUDA paths (sbsa-linux stubs for aarch64, x86_64-linux for x86_64). CUDA include and stub paths are auto-detected on aarch64 and can be overridden via CUDA_INCLUDE_DIR and CUDA_STUB_DIR environment variables. Tested on NVIDIA DGX Spark (GB10, Ubuntu 24.04 aarch64, CUDA 13.0). Resolves #33. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fc1480b to
ea2dadd
Compare
Contribution Agreement
|
|
For WIW, I'm using the version with the patched build script actively on my DGX (Gigabyte AI TOP) with no issues. Quite a few less now in fact, it has such high VRAM, I was dealing with memory issues when plenty of memory was available before implementing it. |
Summary
uname -m) and select the appropriate funchook disassembler: capstone for aarch64 (as funchook recommends), distorm for x86_64sbsa-linuxtarget), falling back to sensible defaultsCUDA_INCLUDE_DIRandCUDA_STUB_DIRenv var overrides for non-standard CUDA installationsMotivation
Resolves #33. The
aimdo.sobinary is not included in the pip wheel for aarch64, soinit_device()fails and ComfyUI falls back to the legacy ModelPatcher with unreliable VRAM estimates. This is particularly impactful on unified-memory devices like the NVIDIA DGX Spark (GB10) where the legacy patcher frequently offloads entire models to CPU despite having 120+ GB of usable VRAM.Test environment
Build and runtime output:
Test plan
init_device(0)returnsTruewith active CUDA context🤖 Generated with Claude Code