Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can not install it #33

Open
waldolin opened this issue Oct 25, 2024 · 2 comments
Open

I can not install it #33

waldolin opened this issue Oct 25, 2024 · 2 comments

Comments

@waldolin
Copy link

waldolin commented Oct 25, 2024

🐛 Bug

can not install

Command

PS D:\github\xformers> pip install -v -U git+https://github.com/ROCm/xformers.git@main#egg=xformers

To Reproduce

Steps to reproduce the behavior:

xformers 0.0.27.post2 requires torch==2.4.0, but you have torch 2.4.1+cu118 which is incompatible.
1.pip uninstall xformers
2.pip install -v -U git+https://github.com/ROCm/xformers.git@main#egg=xformers
3.

fatal: Unable to checkout 'bbe579a9e3beb6ea6626d9227ec32d0dae119a49' in submodule path 'third_party/flash-attention/csrc/cutlass'
fatal: Failed to recurse into submodule path 'third_party/flash-attention'
error: subprocess-exited-with-error

× git submodule update --init --recursive -q did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: git submodule update --init --recursive -q
cwd: C:\Users\lin\AppData\Local\Temp\pip-install-8kizmsjd\xformers_fd0145a7272242849a57f9be3e2c0fb3
error: subprocess-exited-with-error

× git submodule update --init --recursive -q did not run successfully.
│ exit code: 1
╰─> See above for output.

full bug log to see it below:
20241025BUG.txt

note: This error originates from a subprocess, and is likely not a problem with pip.
`

Expected behavior

Environment

system: windows 23H2 22631.4317
CPU:13th Gen Intel(R) Core(TM) i5-13600K 3.50 GHz
GPU: AMD W7900 48G
RAM:128G
LM VERSION .3.5.b1
GPU Dirver Version: PRO edition 24.Q2

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):2.4.1 with torchderctml version
  • OS (e.g., Linux):windows
  • How you installed PyTorch (conda, pip, source):pip
  • Build command you used (if compiling from source):
  • Python version:3.10.6
  • CUDA/cuDNN version:118
  • GPU models and configuration:w7900
  • Any other relevant information:

Additional context

@tenpercent
Copy link
Collaborator

tenpercent commented Oct 30, 2024

xformers 0.0.27.post2 requires torch==2.4.0, but you have torch 2.4.1+cu118 which is incompatible.

@waldolin I believe you need to try installing in the environment with torch==2.4.1+rocm6.1, the easiest way to do that would be to install both torch and xformers and other platform-dependent packages using --index-url=https://download.pytorch.org/whl/rocm6.1

@qianfengz
Copy link
Collaborator

Using the rocm/pytorch-nightly:latest docker, or use the following steps to create a docker for building xfomers on ROCm

1. Get a base ubuntu 20.04 docker

2. Install python3.9
 
   #> pip install python3.9 python3.9-venv python3.9-dev

3. Enable python3.9

   #> update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9
   #> update-alternatives --install /usr/bin/python python /usr/bin/python3

4. Create venv directory

   #> python -m venv /opt/venv/
  
5. Download and install

   * from http://download.pytorch.org/whl/nightly/pytorch-triton-rocm/
     and   http://download.pytorch.org/whl/nightly/torch/
   * pytorch-triton-rocm   // wheel which required by torch
   * torch                 // wheel which support rocm6.2+pytorch2.5+py3.9

6. Save/tag and push the docker for distribution

7. When using, enter the venv by 

   #> source /opt/venv/bin/activate 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants