CoolFace
Modelpublic

Veetance/sageattention-2.2.0-win_amd64-py312-torch2.10.0_cu128-turing7.5

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
Model Card

SageAttention 2.2.0 Native Windows Build

This repository hosts a natively compiled .whl artifact for SageAttention 2.2.0, circumventing several critical C++ ABI and archiving faults on modern Windows environments.

Environment Matrix Requirements

To install this artifact, the host machine must strictly match the following architectural baseline:

  • —OS: Windows 10/11 (x64)
  • —Python: 3.12 (cp312)
  • —PyTorch: 2.10.0 Nightly (torch2.10.0+cu128)
  • —CUDA Toolkit: 12.8
  • —GPU Compute: Turing CC 7.5 (RTX 20-series GPUs)

If any of these vectors misalign (e.g., using an Ampere RTX 30-series card or a stable PyTorch release like 2.4.1), the CUDA kernels will panic, resulting in an immediate initialization failure.

The Compilation Trajectory & Bug Bypasses

We performed a deep surgical strike to achieve this build after standard installation vectors collapsed:

1. Bypassing WinError 127 (ABI Mismatch)

The generic pre-compiled Hugging Face wheels triggered WinError 127: The specified procedure could not be found. This occurred because PyTorch 2.10.0 nightly builds rapidly rotate their C++ ABI function signatures. The generic wheels were compiled against an older (or future) nightly header block, causing dynamic linkage failures upon loading _fused.pyd.

  • —Fix: We forcefully cloned the raw SageAttention repository and compiled the _fused kernels manually against the active PyTorch environment utilizing MSVC 2022 and nvcc.

2. Overriding DISTUTILS_USE_SDK

PyTorch extension builds routinely fail on Windows when launched outside a pristine VS Command Prompt.

  • —Fix: We injected set DISTUTILS_USE_SDK=1 and set MSSdk=1 into the execution stream before triggering the pip compiler, ensuring multiple VC environment loads did not cross-contaminate.

3. Evading WinError 87 (The Python DOS-Epoch Bug)

During wheel packaging, the standard bdist_wheel process fatally crashed with error: [WinError 87] The parameter is incorrect. The Python zipfile module sets a deterministic 1980-01-01 timestamp (SOURCEDATEEPOCH) on all archived files to guarantee reproducible builds. On specific Windows configurations, local time offsets push this back before 1980, completely shattering the MS-DOS zip format specifications.

  • —Fix: We manipulated the POSIX timestamps of the entire source directory to the current time, skipped the wheel module packager entirely, and manually deflated the raw build artifacts into this standalone .whl file.

Installation

powershell
pip install sageattention-2.2.0-cp312-cp312-win_amd64.whl