Open BrainWWW opened 1 year ago
Hi, @BrainWWW. Can https://github.com/microsoft/unilm/issues/1253#issuecomment-1679956365 help?
yep, I tried it but got the same error.
Hi, @BrainWWW.
I run the following code to install xformers
:
pip install -v -U git+https://github.com/facebookresearch/xformers.git@82254f4b0d9c625f7efa8d6671f58144e441901d#egg=xformers
And It works:
hi, I used the same commands to install xformers
but it didn't work. @pengzhiliang
Is the flash_attention
package pre-installed in your image? The issue was caused by the installation of flash_attention
package.
@BrainWWW, the image is just from nvcr.io/nvidia/pytorch:22.10-py3.
I notice that your error info is from xformer
896a4241413344a4850e6654ebe11206
commit.
building 'xformers._C_flashattention' extension creating /tmp/pip-install-lwdzzryz/xformers_896a4241413344a4850e6654ebe11206/build/temp.linux-x86_64-3.8
But the commit I used is 82254f4b0d9c625f7efa8d6671f58144e441901d
.
Some errors are raised when flashattention v2
was merged in xformer
. So I use a previous one.
Hi @pengzhiliang,
I am trying to install kosmos-2 using the docker setup instructions. However, after downloading the mentioned image and running bash vl_setup_xl.sh
, xformers does not get installed. I tried to install xformers from the commit you mentioned here, however this also does not work. Kindly let me know if you have any suggestions.
RuntimeError: Error compiling objects for extension
Running setup.py install for xformers ... error
ERROR: Command errored out with exit status 1: /opt/conda/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0ldrt5p8/xformers_60d1f7e3288344aa8895d4b26be4916d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0ldrt5p8/xformers_60d1f7e3288344aa8895d4b26be4916d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mzfxv4zy/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.8/xformers Check the logs for full command output.
Hi, @BrainWWW. I run the following code to install
xformers
:pip install -v -U git+https://github.com/facebookresearch/xformers.git@82254f4b0d9c625f7efa8d6671f58144e441901d#egg=xformers
And It works:
I build the environment using the docker method. But when it goes to
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
, I get the below error:It seems that the issue is caused by a version mismatch between CUDA and xformers. I don't know how to solve it. Please help me.