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
Mac OSX 10.13, CUDA 9.0, got nvcc error #3047
Comments
You either need to install a newer toolkit (@ngimel does the newest support apple clang 9.0?), or downgrade your command line tools. It's not a PyTorch problem |
Thanks @apaszke
Then install PyTorch again. |
With the same setup as you I get |
Hi @zhanghang1989, |
@mtv3673crawlab you only need to download the CLT |
I got that, thanks. |
@ulfaslak did you manage to solve this? I'm stuck at this error. |
I have High Sierra OS with Xcode 9.2 and cuda 9, and the following worked:
I did try to install with Important TIP |
Why was this ticket closed? It's a serious issue leaving an entire platform (OS X) out of the support map and the solution above was not fully validated. I have tried all plausible downgrades of the CLI and none work; this "fix" was probably not a fix at all, e.g. not what made the code eventually build for the test case. This is a seriously overlooked nvidia/xcode compatibility issue I've seen in other related repos, claiming the "fix" to be in another CLI version which doesn't actually work either. clang --version Errors: Additionally, why the 10.9 target? Where was that inherited from? Should we take that as a hint as to how long ago has this code been actually tested for OS X? |
the ticket was closed because there's literally nothing we can actually do about this problem. |
We test on OS X, see https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-macos-10.13-py3-build-test/ Arguably we should detect OS X and set 10.9 in our scripts... OS X is weird and gives you a broken C++ toolchain if you don't set this correctly. |
10.9 just means use stdlib that can run atleast on 10.9. the default is 10.6, which doesn't have c++11 |
10.9 just means use stdlib that can run atleast on 10.9. the default is 10.6, which doesn't have c++11 -> ambiguous, don't you think? We test on OS X, see https://ci.pytorch.org/jenkins/job/pytorch-builds/job/pytorch-macos-10.13-py3-build-test/ -> Why aren't the specs for that successful built released? There's a lot of people in lots of forums experiencing problems with this. Please give us a ground truth build test to start from. I take that anaconda was not involved, btw? |
@datascienceteam01 Referenced an issue where I had similar problems. (#5244) I had issues getting macOS to build PyTorch, it seemed to fail randomly, and only by trying repeatedly (with the same options, literally just re-running the same command over and over again was I able to successfully build). It would be nice if a binary distribution with CUDA support was available, so users don't have to build it themselves. I'm not blaming PyTorch in any way, I think my problem may have been with NVCC. But, it seems like most people are unable to use PyTorch on macOS. Unfortunately, I'm afraid to help debug, because I don't want to lose my working build. It took me a couple days of fiddling to get it setup. #5244 walks through everything I tried, maybe it will help @datascienceteam01. I use fish shell so the commands I reference will be slightly different if you're using bash. |
@rudedogg I'm afraid that rolled binary distributions might not solve the issue. Pytorch is successfully becoming a dependency to critical cutting edge libraries in data science. NVIDIA has had issues with Apple for a while now. There's a lack of priority in CUDA support for Mac computers. |
@datascienceteam01 I am happy to flag it to the nvidia engineers. cc: @ngimel @csarofeen would you mind reporting this to the cuda team :) |
I was having the same issue when trying to set up CUDA, your solution solved the problem for me. However now I get the following error, did anyone come across the same problem? I don't seem to find a way to fix it xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance |
For posterity I'd like to add my successful build specs: I followed this tutorial but used the following versions. I also macOS 10.13.4 Sadly the console of an app I was testing told me
|
Built successfully with: Python 3.6.4 I used Previously, I've had several unsuccessful builds using I used side note – I didn't use Anaconda; I used venv (installing the dependencies with pip), and pointed to the virtual environment root directory (e.g. .virtualenvs/DL/) instead of the anaconda root. |
Please keep this ticket open until the proposed solution is properly tested. macOS CUDA support has not improved |
I have very similar configs to what @yordun specified, but the following step keeps failing:
I've confirmed that the directory /Library/Frameworks/cuda.framework exists, but am not sure why this is happening. Would appreciate any advice. |
wow - same issue here when build starts - it prints:
this should be
|
I have the same issue
MacOS 10.13.3 + MacOS 10.13.4 |
Trying to build from scratch on Mac OS X 10.13.4 (17E202)
-> So what version am I supposed to get if not the latest that is shipped with Miniconda? Furthermore it looks like the CC/CXX environment variables are totally ignored. Pointed them to the Apple's |
Well, reading the above - it did work for others at some time - I checked some revisions and in fact With an activated conda environment :
Mac OS X 10.13.4 (17E202) Some updates in caffe2 seem to mess things up with the Cuda library path in MacOs. |
I understand they're reworking a lot of stuff before going |
I had an issue with
Also sometimes if you still have such problem - it's better to download XCode 8.3.3 from https://developer.apple.com/download/more/ and temporarily replace XCode 9.X for pytorch build. At least it also helped me :) |
So each version of CUDA requires a specific version of Xcode. You'll have to check which version of CUDA you have installed and which version of Xcode it requires, then download and select the command line tools of that version. Step by Step:Check your version of CUDA:
In my case that was CUDA 9.2. Check here for the documentation of your version and go to the Installation Guide for Mac OS X, there under System Requirements you'll find a table with the supported Xcode version(s). For CUDA 9.1 and 9.2 that is Xcode 9.2. Check your version of Xcode:
If it matches the one required by CUDA, you're good to go! Otherwise go to the Apple Developer Downloads Page and download the Command Line Tools matching the Xcode version required by CUDA and install them. Activate the command line tools:
Build and install Pytorch:
After the installation completed successfully, you might to want to reset the command line tools to the latest version of Xcode:
|
Hello I have an error with the command I’m using macOS 10.13.4
I installed pytorch with the following command: running install
--
|
Hello @soumith sorry for the duplicate. Do you have any idea on what going wrong with my post |
This is still a problem. I know Apple doesn't ship with NVidia boards any more but users can still use the boards in expansion chasis and in older machines. NVidia should support modern OS build environment if they ever hope to be taken seriously on the platform that most modern developers work on. The latest 10.2 CUDA still fails and requires an older mac OS to even install. I was able to get the compilers in place but they refuse to run against the host compiler version. That's on NVidia to fix. This is an embarrassment for NVidia in my opinion. This reflects very poorly. You make a critical technology with CUDA. You should be supporting it on all graphics boards -- even AMD. |
Hello, For the macOS Big Sur (11.4), I tried to install CUDA with pytorch but I encountered the same issue:
I tried previous threads but it won't work. I wonder is there a solution? Any help will be appreciated. Best, |
nvcc fatal : The version ('90000') of the host compiler ('Apple clang') is not supported
The text was updated successfully, but these errors were encountered: