Repository navigation
v0.1.0
First release.
A drop-in sageattention build for AMD Radeon RX 9070 / RX 9070 XT (gfx1201) on Windows. fp16 attention with head_dim 128 runs on a hand-written fp8 HIP kernel; everything else uses the gfx12 kernels from SageAttention PR #368.
Requirements: Windows 10/11, Python 3.12, PyTorch 2.13.0+rocm10.0.0, an RX 9070 or RX 9070 XT.
python -m pip install --no-deps sageattention-2.2.0+amd.gfx12.1-cp312-cp312-win_amd64.whl
Speed against PR #368's kernel (full call, quantization included; ratios below 1.0 are faster):
- causal: 0.51 – 0.65
- non-causal: 0.77 – 0.94
In ComfyUI (Krea2, fp16, 8 steps, stock --use-sage-attention call): 5.4 % faster per step than PyTorch SDPA at 1 MP and 13.7 % faster at 2 MP.
Notes
smooth_kis on by default; it improved accuracy on every real capture measured.- Set
SAGEATTN_SK1_BACKEND=0to disable the hand-written kernel, or=1to require it. - The compiled extensions match this exact PyTorch version; build from source for any other.
See the README for results and accuracy, and docs/ for the full write-up.
sha256 64c7e235ee683c549e68e9af307b38cc60710efd375586841cd3ad188cd3e25a