Github Actions: automated xformers builds for all platforms! #3876
Replies: 8 comments 20 replies
-
nice build.yml and they started compiling their code https://anaconda.org/xformers/xformers |
Beta Was this translation helpful? Give feedback.
-
I'm too busy right now. If nobody else is interested, I'll work on this in a week or two. |
Beta Was this translation helpful? Give feedback.
-
anecdotal, n = 1, but in my specific situation (ubuntu, 3090) I spent a week trying to make xformers work, and could not. A working wheel 'out of the box' (too stupid to do that kind of work myself) would make at least one person very, very happy. Happy to spend some time with tests etc if that is helpful . Am a git(hub) noob though ... |
Beta Was this translation helpful? Give feedback.
-
Okay, so currently we provide four wheels for different configurations and they seem to work:
All can be downloaded from this job: https://github.com/ninele7/xfromers_builds/actions/runs/3351726935 @anwac, if you want to help, you can try version for linux. Assuming you have python 3.10 and cuda 11.3, all you need to do is to download xformers-wheel-ubuntu-latest-3.10-11.3.1 archive, unpack it somewhere (but don't rename .whl file or it will raise an error during pip install) and do the following:
|
Beta Was this translation helpful? Give feedback.
-
Now you can download wheels in releases tab. It's still WIP, next things to do are:
All releases will follow this rule for now:
|
Beta Was this translation helpful? Give feedback.
-
xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl worked perfectly. Looks like what the result of print(torch.version) would be (1.12.1+cu113) in the fielname is the python version (for me 3.10.6) again. With 512x512 and a super simple prompt I see 20% better speed and around 10% memory footprint reduction. (3090 ubuntu 22.04) <ramble_since_happy> This wheel makes me therefor S U P E R happy. Thank you. thanks!! |
Beta Was this translation helpful? Give feedback.
-
I made repo fork specially for colab builds. @camenduru, can you check if it's working. There was a problem with colab glibc version (blame google for not updating their service). You can download whl from https://github.com/pamparamm/xfromers_builds_colab/releases/download/3355664210/xformers-0.0.14.dev0-cp37-cp37m-linux_x86_64.whl |
Beta Was this translation helpful? Give feedback.
-
I've spent some time on this. A blocker is we need to support Lovelace and PyTorch currently hardblocks anything not in I failed to find anyway to modify library files in Github Actions (editing cpp_extension.py would solve this) and I doubt it's possible. Setting a variable alias inside PTX is an option, but it would slow down xformers for Lovelace. |
Beta Was this translation helpful? Give feedback.
-
Problem
There are several problems with
xformers
build process and distribution:python
,torch
orCUDA
versions, both prebuilt and manually builtxformers
wheels may become incompatible, meaning manual compilation for any platform.Solution
I think instead of manually compiling
xformers
, we can use GitHub actions to make python wheels.This approach has multiple benefits:
xformers
update will trigger action to build wheels for all configurations.Example
Job with compiled xformers artifact (RTX 20xx, Python 3.10, CUDA 11.3.1, torch 1.12.1)
Workflow file
What can be improved or changed
Based on feedback, we can:
xformers
distribution using our artifacts.Also instead of artifacts we can make releases tied to commits in original xformers repo, but this IMHO will not fit in main WebUI repo.
Beta Was this translation helpful? Give feedback.
All reactions