xformers icon indicating copy to clipboard operation
xformers copied to clipboard

error when building from source

Open Shaistrong opened this issue 7 months ago • 3 comments

Command

pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers

To Reproduce

attempt to install from source

Environment

  • PyTorch Version (e.g., 1.0): 2.1.0+cu121
  • OS (e.g., Linux): Microsoft Windows 11 Home
  • How you installed PyTorch (conda, pip, source): conda
  • Build command you used (if compiling from source): pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
  • Python version: 3.10.9
  • CUDA/cuDNN version: 12.1
  • GPU models and configuration: 4070ti
  • Any other relevant information:
  • the error I'm getting is: ninja: error: Stat(C:/Users/joker/AppData/Local/Temp/pip-install-0um11ta2/xformers_7bae8db5c8e145569eac020431c758f0/build/temp.win-amd64-cpython-310/Release/Users/joker/AppData/Local/Temp/pip-install-0um11ta2/xformers_7bae8db5c8e145569eac020431c758f0/third_party/flash-attention/csrc/flash_attn/flash_api.obj): Filename longer than 260 characters during building process

Shaistrong avatar Nov 18 '23 16:11 Shaistrong

Hi @Shaistrong Windows has a limitation on the maximum path length - that's quite annoying, but it's not related to xFormers. I'm not sure how to work around this... Can't you install a binary wheel from xFormers with this directly?

pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121

danthe3rd avatar Nov 19 '23 10:11 danthe3rd

I think I have a fix here: https://github.com/facebookresearch/xformers/pull/935

arvindsun avatar Nov 25 '23 01:11 arvindsun

try https://github.com/facebookresearch/xformers/issues/960

soulteary avatar Jan 12 '24 09:01 soulteary