hughperkins / coriander

Build NVIDIA® CUDA™ code for OpenCL™ 1.2 devices
Apache License 2.0
842 stars 88 forks source link

Issue installing on MacOS10.15.5 #93

Open muunetheus opened 4 years ago

muunetheus commented 4 years ago

Attempted to install on MacOS10.15.5 using Python2. Received following error: Traceback (most recent call last): File "install_Distro.py", line 222, in main(**args.dict) File "install_Distro.py", line 206, in main maybe_install_llvm(install_dir=install_dir) File "install_Distro.py", line 166, in maybe_install_llvm install_llvm(install_dir) File "install_Distro.py", line 145, in install_llvm run(['mv', unzip_name, 'llvm-4.0']) File "install_Distro.py", line 88, in run assert p.returncode == 0 AssertionError

timkartar commented 4 years ago

I encountered the same issue. I recently started using Mac, coming from linux. Not much of a pro on Mac. But could not make it work. The install_distro.py script seems poorly designed and haven't been updated in quite a while. llvm current version is 10. 4 is too old. check out some other alternatives ? I am going to do the same.

If you are using pytorch probably try this https://github.com/hughperkins/pytorch-coriander ?

dokipen3d commented 3 years ago

I think its because the http in the python install file needs to be changed to https. It worked for me then.

Also, I had to add export CPATH=/usr/local/include:/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include to my .zshrc file to get the custom llvm to see system headers.

Now I'm dealing with errors to do with free and malloc being called from what it thinks is device functions...

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/cuda_wrappers/new:58:7: error: 
      reference to __host__ function 'free' in __device__ function
    ::free(ptr);
      ^

This is just the cuda example file that I am trying to compile.