-
Notifications
You must be signed in to change notification settings - Fork 611
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
pip install broken on OSX and Ubuntu 20.04 (container w/ CUDA) python 3.9 #157
Comments
If you build from source that should fix the issue. This is happening because the files for building extensions aren't there. Will look into improving this. |
Thanks for the quick response @dianaml0.
|
this could be a path issue, MacOS ships its own clang. Have you tried conda by any chance ?
This is the very definition of -e, it means "editable" if I remember correctly, if you install with that and modify the library code then this modified code will be used. |
Sure I can give this a shot. Ideally I’m sure folks are mainly prototyping on OSX and only need
Ah yes derp! Thanks, |
+1, thanks for the feedback, we're working on that ! to explain a little the issue is with the cuda kernels, which need to be pre-compiled in a gazillion number of configurations for ´pip install xformers´ to just work, work in progress ! |
Hi @jramapuram , In order to install on OSX, you need to pass the following:
This will tell the gcc to use the right options for the compiler. @blefaudeux @dianaml0 I'll update the installation instructions to take this into account |
Improvements to installation instructions sent to #159 For the original issue you were facing, we just need to include the |
@blefaudeux : appreciate the complexity of getting all the CUDA kernels compiling. How does PyTorch resolve this? Guessing something like build all (valid) CUDA archs and couple with a pinned cudatoolkit? Maybe that would be the cleanest? Adding the sources as suggested by @fmassa would be great as it removes the git coupling at least :) @fmassa: thanks! That was it. I missed the CXX export. The following worked for me: brew install llvm libomp # not sure if libomp was necessary, did not ablate.
MACOSX_DEPLOYMENT_TARGET=10.9 CC=/opt/homebrew/opt/llvm/bin/clang \
CXX=/opt/homebrew/opt/llvm/bin/clang++ \
pip install -e . |
@jramapuram great that this is working! FYI I don't think installing Indeed, starting from XCode 4.2, clang is the default compiler for OSX, so just setting |
Just adding two cents here, for clarity: not needed for triton either, it ships with the wheels so on our side there's nothing to be done beyond |
Didn't work for me on OSX 12.1 on an M1 Max 😬 . I had to install LLVM. Triton installed fine without the above change though 🤷 . |
Same issue building 'xformers' from source on MacOS Monterey 12.5.1
|
I had to add '-Xclang' to setup.py
|
Do you guys get
for triton? I could run the benchmark on M1 up to 100% ( Note |
triton is not released on windows I think (edit: lost context: not available on some macs either :D), but it s a soft dependency for xformers, the error message is a bit misleading. you can have mem efficient attention without triton, no worries |
@Any-Winter-4079 Yup.. see this issue I just opened:
|
For me (MacOS 12.5.1):
Done. |
On MacOs 14.3:
|
Hi, we don't support MacOS anymore, as there is no recent CUDA release available on Mac. |
Thanks! It works! |
Error occurred on 14.6.1
|
Did you skip |
Not sure if there are any specific requirements or why this particular error occurs, but I see the same error on both:
Error is also quite non-descriptive:
assert len(sources) > 0
Full gist.
The text was updated successfully, but these errors were encountered: