Open harshil-sanghvi opened 2 years ago
I'm also receiving this error when attempting to compile on windows with long paths enabled. I've set the TORCH_CUDA_ARCH_LIST environment variable to 8.6 for my RTX 3080.
I'm using Python 3.9.7 (provided with Unreal Engine) and torch 1.13.0+cu117
Same issue, on Win11.
C:\Users\marko\AppData\Local\Temp\pip-install-0ejnx_pq\xformers_d26f85c33b514e0aafd7da798d8f7637\xformers\components\attention\csrc\attention.cpp : fatal error C1083: Cannot open compiler generated file: '': Invalid argument error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe' failed with exit code 1 error: subprocess-exited-with-error
Any clues?
Might be related for having too long paths when installing via pip. Issue was solved on my machine when cloning the repo and building in a much shorter path (L:\Projects\xformers
in my case.). Setting long path support on windows does not seem to have an effect for the MSVC compiler (cl.exe
)
Absolutely, I had to set TMP
and TEMP
variables to c:\temp
and it fix it.
After 48hour of tackling with the above issue. I found out that xtransformers won't give this error with python 3.10.
When I installed 3.10 I started getting another error which said Could not build wheels due to some cuda error as xformers has a sub dependency transformers depend upon cuda.
Go to xformer git repo and install the xformer version which is compatible with your current cuda installation 12.4 for me. Latest available is 12.6
❓ Questions and Help While executing 'pip install xformers', I get the error as attached below. I already enabled longpath from regedit. Please help me in resolving the error.