--- license: apache-2.0 tags: - sageattention - flash-attention - flash-attn - blackwell - sm_120 - rtx-pro-6000 - rtx-5090 - cuda-13 - pytorch-2.11 - python-3.12 - wheels - prebuilt - comfyui language: - en --- # SageAttention 2.2 + FlashAttention 2.8.3 — Linux wheels for Blackwell (sm_120) on PyTorch 2.11 / CUDA 13.0 Community-built `.whl` files for a combo that, as of June 2026, isn't shipped by upstream: - **SageAttention 2.2.0** — only Windows wheels in upstream releases; Linux requires source build - **FlashAttention 2.8.3.post1** — Dao-AILab releases don't cover cu130 + torch 2.11 yet If your hardware/software matches the table below, these install in seconds instead of 5–40 minutes of source compilation. --- ## Compatibility | Requirement | Value | Why it matters | |---|---|---| | Python | **3.12.x** (built on 3.12.3) | `cp312` ABI tag — won't load on 3.11 or 3.13 | | PyTorch | **2.11.0+cu130** | C++ ABI must match — won't load with `cu126` torch | | CUDA toolkit | 13.0 (driver compatible with cu130) | required for runtime | | GPU compute capability | **12.0 (Blackwell)** — RTX PRO 6000 Blackwell, RTX 5090/5080/5070 Ti, B100/B200, etc. | wheels compiled with `arch=compute_120,code=sm_120` natively (no PTX-JIT fallback) | | OS | Linux x86_64 | `manylinux` not applied — built on Ubuntu, untested elsewhere | If **any** row doesn't match — these wheels probably won't load and you'll need to build from source. --- ## Files & hashes | File | Size | SHA256 | |---|---|---| | `sageattention-2.2.0-cp312-cp312-linux_x86_64.whl` | 14.8 MB | `4a47a462059bf09b7d10be68f93a0a462dd6184068298fc6ff10e94751fa6dd4` | | `flash_attn-2.8.3.post1-cp312-cp312-linux_x86_64.whl` | 65.8 MB | `a77fe499d1c7244e0549d9d2700def0c1c82a1b629d993204e9be78debd96cb8` | Verify before installing: ```bash sha256sum sageattention-2.2.0-cp312-cp312-linux_x86_64.whl sha256sum flash_attn-2.8.3.post1-cp312-cp312-linux_x86_64.whl ``` --- ## Install ```bash pip install sageattention-2.2.0-cp312-cp312-linux_x86_64.whl pip install flash_attn-2.8.3.post1-cp312-cp312-linux_x86_64.whl ``` Smoke test: ```python import torch import sageattention from sageattention import sageattn from flash_attn import flash_attn_func q = torch.randn(2, 8, 256, 64, dtype=torch.float16, device='cuda') k = torch.randn(2, 8, 256, 64, dtype=torch.float16, device='cuda') v = torch.randn(2, 8, 256, 64, dtype=torch.float16, device='cuda') # sageattention expects (B, H, S, D) by default with tensor_layout='HND' out_sage = sageattn(q, k, v, tensor_layout='HND', is_causal=False) # flash_attn_func expects (B, S, H, D) q2 = q.transpose(1, 2).contiguous() k2 = k.transpose(1, 2).contiguous() v2 = v.transpose(1, 2).contiguous() out_flash = flash_attn_func(q2, k2, v2, causal=False) print('sageattention:', out_sage.shape, '— OK') print('flash_attn: ', out_flash.shape, '— OK') ``` --- ## Build environment (exactly what produced these wheels) ``` OS: Ubuntu 24.04 (kernel 6.14.0-1010-oem) Python: 3.12.3 PyTorch: 2.11.0+cu130 CUDA: 13.0.r13.0 / V13.0.88 (apt cuda-toolkit-13-0) ninja: 1.11.1.4 setuptools: 81.0.0 GPU: NVIDIA RTX PRO 6000 Blackwell Workstation Edition (sm_120) ``` Build flags: **sageattention:** ```bash TORCH_CUDA_ARCH_LIST="12.0" MAX_JOBS=4 NVCC_THREADS=2 \ pip install . --no-build-isolation ``` **flash-attn:** ```bash TORCH_CUDA_ARCH_LIST="12.0" FLASH_ATTN_CUDA_ARCHS="120" MAX_JOBS=2 NVCC_THREADS=1 \ pip install flash-attn==2.8.3.post1 --no-build-isolation ``` Backward kernels are **included** in flash-attn — training works, not just inference. --- ## Licenses Both upstream projects allow redistribution; redistributing these binary builds preserves their license terms: - **SageAttention** — [Apache License 2.0](https://github.com/thu-ml/SageAttention/blob/main/LICENSE) - **FlashAttention** — [BSD 3-Clause](https://github.com/Dao-AILab/flash-attention/blob/main/LICENSE) The wheels contain copies of `LICENSE` files in their `*.dist-info/licenses/` directories. Originals are at: - https://github.com/thu-ml/SageAttention - https://github.com/Dao-AILab/flash-attention --- ## Disclaimers (read these) - **Not official.** This is a community build. Authors of upstream packages have no involvement. - **Smoke-tested only.** Each wheel was verified to: (1) import without errors, (2) execute a small forward pass on a Blackwell GPU and return a tensor of expected shape and dtype. No accuracy benchmarks, no model-level integration tests were run. - **No warranty.** If these wheels misbehave on your system — wrong results, crashes, performance regressions — that's on you to verify against a source build before relying on them. - **Reproducible-ish.** Wheel SHA-256 may differ slightly between rebuilds due to embedded timestamps even when binary kernel content is identical. --- ## Attribution These wheels were built by **JahJedi** with assistance from **Claude Code** (Anthropic) — the diagnosis of an earlier system freeze under unbounded `ninja`, the choice of safe build parameters (`MAX_JOBS`, `NVCC_THREADS`, single-arch targeting), and this README itself were Claude-assisted. Verification commands were run by the human; final responsibility for the published artifacts is the human's. If anything in these wheels turns out to be wrong, ping the human first — they can't claim AI ignorance.