Hello,
I am getting an error message when trying to build for Mac with CUDA support.
I setup a clean VM with macOS 10.12.6 installed.
-Xcode 8.3.3 (since newer version will not work with CUDA 9)
-CUDA Toolkit 9.0.176
-Homebrew for cmake
Here is the output I am getting:
$ cmake --build .
Scanning dependencies of target BuildInfo.h
Files "/Users/
[ 0%] Built target BuildInfo.h
Scanning dependencies of target devcore
[ 3%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 6%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 10%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 13%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RLP.cpp.o
[ 16%] Building CXX object libdevcore/CMakeFiles/devcore.dir/SHA3.cpp.o
[ 20%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 23%] Linking CXX static library libdevcore.a
[ 23%] Built target devcore
Scanning dependencies of target ethash
[ 26%] Building C object libethash/CMakeFiles/ethash.dir/internal.c.o
[ 30%] Building C object libethash/CMakeFiles/ethash.dir/sha3.c.o
[ 33%] Linking C static library libethash.a
[ 33%] Built target ethash
Scanning dependencies of target hwmon
[ 36%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapnvml.cpp.o
/Users/
platform: need NVML DLL path for this platform..." [-W#warnings]
^
1 warning generated.
[ 40%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
/Users/
platform: need ADL DLL path for this platform..." [-W#warnings]
^
1 warning generated.
[ 43%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o
[ 46%] Linking CXX static library libhwmon.a
[ 46%] Built target hwmon
Scanning dependencies of target ethcore
[ 50%] Building CXX object libethcore/CMakeFiles/ethcore.dir/BlockHeader.cpp.o
[ 53%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o
[ 56%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Miner.cpp.o
[ 60%] Linking CXX static library libethcore.a
[ 60%] Built target ethcore
[ 63%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_70'
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:219 (message):
Error generating
/Users/
make[2]: * [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
make: ** [all] Error 2
Any ideas on how to get past this issue?
Thanks!
looks like a cuda toolkit issue
Here's how I fixed it:
I ran "cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF"
I then went into the folder "build/libethash-cuda/CMakeFiles/ethash-cuda.dir"
I modified the file "ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake"
-I modified the only line of code in that file that referenced 'compute_70'
-New code looks like this:
set(CUDA_NVCC_FLAGS --disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo;-gencode arch=compute_30,code=sm_30;-gencode arch=compute_35,code=sm_35;-gencode arch=compute_50,code=sm_50;-gencode arch=compute_52,code=sm_52;-gencode arch=compute_53,code=sm_53;-gencode arch=compute_60,code=sm_60;-gencode arch=compute_61,code=sm_61;-gencode arch=compute_62,code=sm_62 ;; ) # list
The output file is working well on my Mac with a GTX 1070 running macOS 10.13.2
Latest master compiled for MacOS with CUDA support.
Editing the /libethash-cuda/CMakeLists.txt file to remove the offending compute_70 line before compiling worked in my case...
What cuda version is available for osx? And where to get it? I love to update CI server config to support cuda
Most helpful comment
Here's how I fixed it:
I ran "cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF"
I then went into the folder "build/libethash-cuda/CMakeFiles/ethash-cuda.dir"
I modified the file "ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake"
-I modified the only line of code in that file that referenced 'compute_70'
-New code looks like this:
set(CUDA_NVCC_FLAGS --disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo;-gencode arch=compute_30,code=sm_30;-gencode arch=compute_35,code=sm_35;-gencode arch=compute_50,code=sm_50;-gencode arch=compute_52,code=sm_52;-gencode arch=compute_53,code=sm_53;-gencode arch=compute_60,code=sm_60;-gencode arch=compute_61,code=sm_61;-gencode arch=compute_62,code=sm_62 ;; ) # list
The output file is working well on my Mac with a GTX 1070 running macOS 10.13.2