[GH-ISSUE #147] Build managed SageAttention 2 wheels for Windows and Linux #47

Closed
opened 2026-10-26 22:19:40 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Kosinkadink on GitHub (Sep 1, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/147

Goal

Publish official SageAttention 2.2.0 as prebuilt Windows and Linux wheels from Comfy-Org infrastructure so ComfyUI users do not compile or hand-install it.

Scope

  • Build a companion comfy-kitchen-sageattention distribution that provides the upstream sageattention import namespace without coupling Torch ABI-sensitive extensions to the stable-ABI comfy-kitchen wheel.
  • Pin upstream tag v2.2.0 at commit eb615cf6cf4d221338033340ee2de1c37fbdba4a and verify the source archive sha256 2c8232be47d35d20f095b1e38a052c6aa7b79dfd8ae4ab733d4df99c301ca7d0 before building.
  • Inventory and ship the Apache-2.0 license and attribution. Record that the pinned upstream source has no NOTICE file.
  • Build Python 3.12 binary wheels for manylinux x86_64 and win_amd64 against Torch 2.13.0 + CUDA 13.0, covering upstream SM80, SM86, SM89, SM90, and SM120 dispatch.
  • Declare the matching Triton dependency on Linux and triton-windows dependency on Windows.
  • Verify wheel tags, package metadata, compiled members, external linkage, source identity, and import behavior in clean environments.
  • Publish only from a dedicated SageAttention release tag after the wheel jobs pass.

Acceptance criteria

  • pip install comfy-kitchen-sageattention selects a binary wheel on supported Windows and Linux hosts and never invokes a local compiler.
  • from sageattention import sageattn succeeds with the pinned Torch/CUDA/Triton line.
  • Every published wheel is traceable to the exact upstream commit, source digest, build toolchain, and packaging revision.
  • No unsupported architecture is advertised as executable, and consumers can authenticate the companion distribution separately from an unmanaged upstream install.
Originally created by @Kosinkadink on GitHub (Sep 1, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/147 ## Goal Publish official SageAttention 2.2.0 as prebuilt Windows and Linux wheels from Comfy-Org infrastructure so ComfyUI users do not compile or hand-install it. ## Scope - Build a companion `comfy-kitchen-sageattention` distribution that provides the upstream `sageattention` import namespace without coupling Torch ABI-sensitive extensions to the stable-ABI `comfy-kitchen` wheel. - Pin upstream tag `v2.2.0` at commit `eb615cf6cf4d221338033340ee2de1c37fbdba4a` and verify the source archive sha256 `2c8232be47d35d20f095b1e38a052c6aa7b79dfd8ae4ab733d4df99c301ca7d0` before building. - Inventory and ship the Apache-2.0 license and attribution. Record that the pinned upstream source has no NOTICE file. - Build Python 3.12 binary wheels for manylinux x86_64 and win_amd64 against Torch 2.13.0 + CUDA 13.0, covering upstream SM80, SM86, SM89, SM90, and SM120 dispatch. - Declare the matching Triton dependency on Linux and `triton-windows` dependency on Windows. - Verify wheel tags, package metadata, compiled members, external linkage, source identity, and import behavior in clean environments. - Publish only from a dedicated SageAttention release tag after the wheel jobs pass. ## Acceptance criteria - `pip install comfy-kitchen-sageattention` selects a binary wheel on supported Windows and Linux hosts and never invokes a local compiler. - `from sageattention import sageattn` succeeds with the pinned Torch/CUDA/Triton line. - Every published wheel is traceable to the exact upstream commit, source digest, build toolchain, and packaging revision. - No unsupported architecture is advertised as executable, and consumers can authenticate the companion distribution separately from an unmanaged upstream install.
Author
Owner

@Kosinkadink commented on GitHub (Sep 1, 2026):

Implementation is in #148. The branch pins SageAttention v2.2.0 source and license provenance, builds Python 3.12 / Torch 2.13 / CUDA 13 binary wheels for Linux and Windows, and verifies package metadata plus each extension's cubin coverage.

Local evidence on RipperPC:

  • final Linux wheel: 38,397,300 bytes, sha256 004ad09adb225ec0971a90608b05de807a706acb0e2755f7776e9cf3b70ca132
  • _fused: SM80/86/89/90/120
  • _qattn_sm80: SM80/86/89/90/120
  • _qattn_sm89: SM89/90/120
  • _qattn_sm90: SM90
  • locked RTX PRO 6000 Blackwell SM120 causal and non-causal smoke passed
  • 521 CPU tests passed, 1361 skipped; Ruff clean
  • exact final diff independently reviewed with no remaining blocker

Free GitHub manylinux and Windows artifact builds are running. No publication tag has been created.

<!-- gh-comment-id:5489477051 --> @Kosinkadink commented on GitHub (Sep 1, 2026): Implementation is in #148. The branch pins SageAttention v2.2.0 source and license provenance, builds Python 3.12 / Torch 2.13 / CUDA 13 binary wheels for Linux and Windows, and verifies package metadata plus each extension's cubin coverage. Local evidence on RipperPC: - final Linux wheel: 38,397,300 bytes, sha256 `004ad09adb225ec0971a90608b05de807a706acb0e2755f7776e9cf3b70ca132` - `_fused`: SM80/86/89/90/120 - `_qattn_sm80`: SM80/86/89/90/120 - `_qattn_sm89`: SM89/90/120 - `_qattn_sm90`: SM90 - locked RTX PRO 6000 Blackwell SM120 causal and non-causal smoke passed - 521 CPU tests passed, 1361 skipped; Ruff clean - exact final diff independently reviewed with no remaining blocker Free GitHub manylinux and Windows artifact builds are running. No publication tag has been created.
Author
Owner

@Kosinkadink commented on GitHub (Sep 1, 2026):

Owner update at PR head bf64ba6:

  • Windows now completes the full CUDA build with C++20. Its first verification exposed that Windows cuobjdump names Hopper cubins as sm_90a; the verifier now accepts that architecture-specific suffix while preserving exact architecture-set checks.
  • Linux source/wheel/cubin verification and SM120 execution pass locally. Two hosted Linux builds were terminated with exit 143 at MAX_JOBS=8, so Linux compiler concurrency is now limited to 2 to fit runner memory.
  • Local validation: Ruff clean; 521 passed, 1361 skipped; all five managed architecture arms verified; managed wheel Sage and masked-SDPA adapter execution passed on SM120.

Exact-head Windows and Linux CI is running.

<!-- gh-comment-id:5491109904 --> @Kosinkadink commented on GitHub (Sep 1, 2026): Owner update at PR head `bf64ba6`: - Windows now completes the full CUDA build with C++20. Its first verification exposed that Windows `cuobjdump` names Hopper cubins as `sm_90a`; the verifier now accepts that architecture-specific suffix while preserving exact architecture-set checks. - Linux source/wheel/cubin verification and SM120 execution pass locally. Two hosted Linux builds were terminated with exit 143 at `MAX_JOBS=8`, so Linux compiler concurrency is now limited to 2 to fit runner memory. - Local validation: Ruff clean; 521 passed, 1361 skipped; all five managed architecture arms verified; managed wheel Sage and masked-SDPA adapter execution passed on SM120. Exact-head Windows and Linux CI is running.
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-kitchen#47
No description provided.