Skip to content

python 3.13 cuda 12.9 torch 2.8 Compilation failed #1341

Open

Description

@wzgrx

Environment
window11 4090 24gb python3.13 cuda12.9

pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu129

When trying to install xFormers from source on Windows using Python 3.13, the build fails because xformers/csrc/attention/attention.cpp is missing, causing Ninja to exit with error:

🖥️ Environment
OS: Windows 11
Python: 3.13
PyTorch: 2.4+ (compiled with CUDA 12.9)
NVCC: 12.9.41
CUDA: 12.9
🐛 Bug Description
When trying to install xFormers from source on Windows using Python 3.13, the build fails because xformers/csrc/attention/attention.cpp is missing, causing Ninja to exit with error:

TEXT
ninja: error: 'E:/模型构建/xformers/xformers/csrc/attention/attention.cpp', needed by '.../attention.obj', missing and no known rule to make it
🔍 Steps to Reproduce
Clone the repository:
BASH
git clone https://github.com/facebookresearch/xformers.git
cd xformers
Initialize submodules:
BASH
git submodule update --init --recursive
Create a virtual environment with Python 3.13 and install PyTorch (e.g., torch==2.4.0+cu121)
Attempt to install in development mode:
BASH
pip install -e .

After asking AI, retesting still fails to compile

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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