xformers icon indicating copy to clipboard operation
xformers copied to clipboard

C++/CUDA extensions. xFormers was built for: PyTorch 2.1.2+cu121 with CUDA 1201 (you have 2.1.0+cpu)

Open reponum8 opened this issue 5 months ago • 2 comments

🐛 Bug

Command

To Reproduce

Steps to reproduce the behavior:

Theres a issue everytime i delete my folder, and start fresh the python numner changes, from 3.9.13, 10.6, 10.11, then back to 3.9, i have added all my environmentveriables in a external drive, at first no problems, i instored cuda tool kit 3 times, installed different pythons, spent almost a long time trying to solve it. tried a variety of xformer installs, kinda giving up, sad the easiest parts now just a pain.

1.python -m xformers.info WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.1.2+cu121 with CUDA 1201 (you have 2.1.0+cpu) Python 3.9.13 (you have 3.9.13) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details Unable to find python bindings at /usr/local/dcgm/bindings/python3. No data will be captured. xFormers 0.0.23.post1 memory_efficient_attention.cutlassF: unavailable memory_efficient_attention.cutlassB: unavailable memory_efficient_attention.decoderF: unavailable [email protected]: unavailable [email protected]: unavailable memory_efficient_attention.smallkF: unavailable memory_efficient_attention.smallkB: unavailable memory_efficient_attention.tritonflashattF: unavailable memory_efficient_attention.tritonflashattB: unavailable memory_efficient_attention.triton_splitKF: unavailable indexing.scaled_index_addF: unavailable indexing.scaled_index_addB: unavailable indexing.index_select: unavailable swiglu.dual_gemm_silu: unavailable swiglu.gemm_fused_operand_sum: unavailable swiglu.fused.p.cpp: not built is_triton_available: False pytorch.version: 2.1.0+cpu pytorch.cuda: not available dcgm_profiler: unavailable build.info: available build.cuda_version: 1201 build.python_version: 3.9.13 build.torch_version: 2.1.2+cu121 build.env.TORCH_CUDA_ARCH_LIST: 5.0+PTX 6.0 6.1 7.0 7.5 8.0+PTX 9.0 build.env.XFORMERS_BUILD_TYPE: Release build.env.XFORMERS_ENABLE_DEBUG_ASSERTIONS: None build.env.NVCC_FLAGS: None build.env.XFORMERS_PACKAGE_FROM: wheel-v0.0.23.post1 source.privacy: open source

Expected behavior

Environment

Please copy and paste the output from the environment collection script from PyTorch (or fill out the checklist below manually).

You can run the script with:

# For security purposes, please check the contents of collect_env.py before running it.
python -m torch.utils.collect_env
  • PyTorch Version (e.g., 1.0):
  • OS (e.g., Linux):
  • How you installed PyTorch (conda, pip, source):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

Additional context

reponum8 avatar Jan 28 '24 09:01 reponum8

It's pretty obvious, you have pytorch 2.1.0 installed and a version of xformers built for 2.1.2.
pip uninstall torch torchaudio and torchvision xformers ...
then follow the instructions on the pytorch page to install the CUDA version and xformers for your OS, assuming you have an NVidia card. You didn't really imply that let alone state it, you just said xformers gave the error that it couldn't use CUDA which can mean any number of things. Macs or AMD cards for example. Anything older than ampere isn't compatible with flash-attention2 (or triton now) so there may be enough incompatibilities that you need to find an old xformers build. Since you didn't fill out that whole section at the bottom asking about system info, I can't help there either.

Theres a issue everytime i delete my folder, and start fresh the python numner changes, from 3.9.13, 10.6, 10.11, then back to 3.9

The issue is that you keep deleting your folder and "starting fresh", then installing a different python. Or maybe the OS is restoring it because it uses it for something. Maybe it's a weird python-based OS your friend installed. I don't know.

NeedsMoar avatar Jan 31 '24 19:01 NeedsMoar

Hi, What GPU / cuda version do you have? We recommend that you install xformers and PyTorch at the same time with a command like that:

# cuda 11
pip3 install -U xformers torch --index-url https://download.pytorch.org/whl/cu118
# cuda 12
pip3 install -U xformers torch --index-url https://download.pytorch.org/whl/cu121

danthe3rd avatar Feb 01 '24 09:02 danthe3rd