Skip to content

Provide official prebuilt CUDA-compatible wheels and fix common build/install failures for xFormers #1372

Description

@Shaheer66

xformers often fails to build wheels and/or install with CUDA support on typical setups (PyTorch+CUDA), causing errors and missing extensions. Users report repeated build failures and wheel problems across platforms

Observed Issues (with examples):

pip install xformers fails:

ERROR: Failed building wheel for xformers
ERROR: Failed to install project due to wheel build failure

Even in some cases it says install successfully but the other librariess like torch and cuda kernel start giving errors, even the purely working scripts stop working, but if we recreate the venv and install all the packages other than xformer it works fine
reported by multiple users on PyTorch+CUDA setups.

Build from source fails with CUDA extension errors on Windows even with Visual Studio/CUDA updates.

Wheels are not available/published for key PyTorch/CUDA combos, forcing source builds or manual compatibility hacks.

Lack of reliable prebuilt wheels can lead to xFormers loading but missing C++/CUDA extensions, making optimized attention unavailable unless correctly matched.

Impact

Users cannot use optimized CUDA operators when xFormers fails to install properly.

Manual source builds are fragile and error-prone.

Windows support and prebuilt wheels are missing or removed.

Requested Actions

Publish official prebuilt wheels for major PyTorch/CUDA versions (e.g., PyTorch 2.6+ with CUDA 12.1, 12.4, 12.6).

Ensure wheels include C++/CUDA extensions, not fallback CPU-only builds.

Fix build/install scripts so pip install succeeds reliably across platforms (Windows, Linux).

Add a compatibility table documenting supported combinations of PyTorch, CUDA, and Python.

Why this matters

Improves developer experience and usability in ML pipelines.

Reduces dependency conflicts and build errors for local GPU projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions