-
Notifications
You must be signed in to change notification settings - Fork 14
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
Possible to update PyTorch build to support Torch 1.13.1 Rocm5.2? #27
Comments
You can build by yourself. |
I've run stable-diffusion-webui with ROCm on Ubuntu 22.04.2 LTS successfully with unpatched rocm-5.4.3, pytorch built with |
Good job, I think I will give a try SD on gfx803 again. |
I am failing to build pytorch myself on Fedora with an endless stream of c errors. No idea what it going wrong. Would be much appreciated if you could give it another try on your Ubuntu system. Thanks! |
Here is my build process on Ubuntu 22.04.2 for Pytorch 2.0.1-rc2 and Vision 0.15.2-rc2, both seem to work fine with the latest ROCm 5.5.0. All the steps are based on tsl0922 repository: https://github.com/tsl0922/pytorch-gfx803 Note that I'm not building MAGMA so UniPC sampler will fail to run. Install cmake, sccache (on snapstore, use the store app)Install dependencies
Install ROCm
Build MAGMA if you need, I'm skipping this
Build Torch
Build Vision
Activate your venv environment in Automatic1111's webui and reinstall torch, torchvision with the built wheels after. |
gpu not detected in rocm sudo /opt/rocm-5.5.0/bin/rocm-smi ======================= ROCm System Management Interface =======================
|
@WeirdWood thanks for your build process! Therefore I tried with exactly your version (5.5.0) and this finally worked. For others who want to do same build process: Many thanks @WeirdWood ! |
@fidgety520 If you can describe your issue, would be great. Is your GPU a gfx803 generation? What OS are you using? What are you experiencing? Any information would be useful CPU rendering will always work, but takes several minutes when GPU takes usually seconds. |
@fidgety520 which linux is running under your docker (I'm not familiar with docker installations) |
@fidgety520 here is what I have done, but at one's own risk....
during compilation you have to agree some steps... PS: xxxxxx in the path stands for your account name of home directory. If you compile it in another folder, you have to change this |
Are there any other errors except those warnings during the compilation process. On my computer the compilation needed a very long time. |
In your /pytorch/dist/ folder. The whl file - is this from date after compilation or from date at (or before) download time |
Only difference I'm aware is the deinstallation of rocm/amdgpu and the installation of libraries I missed during the process under linux mint. The download path of amd is also another, but with the "old" one there should happen an error at download - because file isn't anymore available in this folder on server. |
here is an update for GFX803 - e.g. RX580 with pytorch v2.1.2 and automatic sd webui 1.7
see also: https://github.com/viebrix/pytorch-gfx803/tree/main |
@viebrix I needed to update my server to 22.04 (was on 20.04) but was able to follow your guide and get it working on my RX580 successfully! |
didnt worked for me, i got unrecognized comamnd line option for cc1plus
|
is it possible that maybe can also be a problem with docker? I'm not familiar with docker. |
not sure about docker, i passed throught all my hardware and its rocm docker, but yes i did had to run it like third time for it to clone correctly, but do i have to run it from scratch all the time? git submodule update would do similar thing ? |
frankly speaking I don't know. I restarted every time the whole Did you reboot after the line # Reboot after this ? |
Docker Rocm- it's necessary that you use the specific rocm version I did with the line: |
I followed the exact steps in #27 (comment) |
Excuse me friend, I replicated your process. Testing, I discovered that you can update the GPU driver for more stability. ejem: echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amdgpu/6.2.3/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/amdgpu.list Update driver more stability sudo apt-get update && sudo apt fuul-upgrade ALL ok linux mint 21.2 mate low use ram |
I gave up trying to make ROCm work with my 5700 XT. Instead, I'm using projects that support Vulkan as a backend such as https://github.com/ggml-org/llama.cpp which work out of the box. |
Not sure how difficult it is, but is there a chance we might be able to get an updated build of PyTorch for Rocm5.2 with GFX803 enabled?
Currently the Rocm5.2 pytorch has gfx803 left out. and attempting to use xuhuisheng's build results in compatibility errors as other libraries are expecting the torch version to be 1.13.1 and torchvision 0.14.1.
Xuhuisheng's version is built on Torch 1.11.1 and Torchvision 0.12.0.
I'm certainly willing to willing to try and build it myself if anyone has a good guild on how to compile both Torch with Rocm (so far only found guides for Cuda) and TorchVision
The text was updated successfully, but these errors were encountered: