xformers
xformers copied to clipboard
Compatibility With CUDA 12
❓ Questions and Help
Is there a way to install Xformers with CUDA 12?
I'm trying to use Xformers on a Singularity image that employs, as a base, an image from the Nvidia PyTorch catalog, which are all optimized for the GPUs I'm using.
However, the more up-to-date versions of those PyTorch images all come with CUDA 12 installed. Because of that, when I install Xformers, PyTorch is rebuilt with CUDA version 11.7. This, in turn, causes an incompatibility between the versions of NVCC (which remains 12) and the CUDA of PyTorch (which reverts to 11.7), and I suspect some bugs I'm encountering when training models are related to this disparity.
Hi, xFormers is compatible with CUDA 12, but you need to build it from source
Oh, I was trying to build it from source with CUDA 12 yesterday and I was bumping into a bizarre obscure error. After a good-old Google search I was led to believe it just wasn't compatible with CUDA 12.
It only seems to appear when I use CUDA 12. With CUDA 11 I don't get this error. Does anyone know what it could be?
ERROR: Could not find a version that satisfies the requirement xformers (unavailable) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.16rc424, 0.0.16rc425, 0.0.16, 0.0.17rc481, 0.0.17rc482, 0.0.17, 0.0.18, 0.0.19, 0.0.20, 0.0.21, 0.0.22.dev591, 0.0.22.dev594, 0.0.22.dev595, 0.0.22.dev596, 0.0.22.dev597, 0.0.22.dev598) ERROR: No matching distribution found for xformers (unavailable) WARNING: You are using pip version 21.2.4; however, version 23.2.1 is available. You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
Hi, xFormers is compatible with CUDA 12, but you need to build it from source
is there any info out there on how someone might do this? both automatic1111 and sdnext have moved up to cuda 12.1, and although I'm told the performance of sdp is nearly the same as xformers, I would much rather prefer to see it myself.
Hi, We have some instructions in the readme to build from source https://github.com/facebookresearch/xformers#installing-xformers
Still no luck here.
Has anyone successfully built xformers from source using the Nvidia PyTorch image as a base?
For reference, this is the Dockerfile I'm using:
FROM nvcr.io/nvidia/pytorch:23.05-py3
RUN git config --global http.sslVerify false
RUN pip install ninja
RUN pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
What is the error you have?
Have you tried setting MAX_JOBS=2
for instance?
Setting MAX_JOBS didn't solve it.
This is the error.
ERROR: Could not find a version that satisfies the requirement xformers (unavailable) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.16rc424, 0.0.16rc425, 0.0.16, 0.0.17rc481, 0.0.17rc482, 0.0.17, 0.0.18, 0.0.19, 0.0.20, 0.0.21, 0.0.22.dev591, 0.0.22.dev594, 0.0.22.dev595, 0.0.22.dev596, 0.0.22.dev597, 0.0.22.dev598) ERROR: No matching distribution found for xformers (unavailable) WARNING: You are using pip version 21.2.4; however, version 23.2.1 is available. You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
Hi, We have some instructions in the readme to build from source https://github.com/facebookresearch/xformers#installing-xformers
i see "install from source", nothing on building it for 12.1 cuda
just use https://github.com/facebookresearch/xformers/issues/960
hey bro.i have the same issue,how you solved this problem?
xFormers now provides official builds for CUDA 12, hence this issue should no longer be relevant.
xFormers now provides official builds for CUDA 12, hence this issue should no longer be relevant.
can tell me where to get the official builds?
Thanks.
Check out the README: https://github.com/facebookresearch/xformers#installing-xformers