Incubator-mxnet: No CMAKE_CUDA_COMPILER could be found

Created on 9 Jul 2019  ·  8Comments  ·  Source: apache/incubator-mxnet

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.

For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io

Description

(Brief description of the problem in no more than 2 sentences.)
The CUDA compiler identification is unknown .
CMake Error at CMakeLists.txt:73 (project): No CMAKE_CUDA_COMPILER could be found.

Environment info (Required)

win10+vs2015+cuda10.1+cmake3.15.0-rc3
gpu:rtx2080ti

D:\dev>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:11:20_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.168

What to do:
1. Download the diagnosis script from https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py
2. Run the script using `python diagnose.py` and paste its output here.

----------Python Info----------
Version : 3.6.3
Compiler : MSC v.1900 64 bit (AMD64)
Build : ('default', 'Oct 15 2017 03:27:45')
Arch : ('64bit', 'WindowsPE')
------------Pip Info-----------
Version : 19.1.1
Directory : C:\ProgramData\Anaconda3lib\site-packages\pip
----------MXNet Info-----------
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform : Windows-10-10.0.17763-SP0
system : Windows
node : DESKTOP-LI615VE
release : 10
version : 10.0.17763
----------Hardware Info----------
machine : AMD64
processor : Intel64 Family 6 Model 79 Stepping 1, GenuineIntel
Name
Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz
Intel(R) Xeon(R) CPU E5-2640 v4 @ 2.40GHz

----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0600 sec, LOAD: 1.4430 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.3461 sec, LOAD: 2.7975 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 1.2440 sec, LOAD: 2.9702 sec.
Error open FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0030 sec, LOAD: 4.7989 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0281 sec, LOAD: 2.9924 sec.

#

Package used (Python/R/Scala/Julia):
(I'm using ...)

For Scala user, please provide:

  1. Java version: (java -version)
  2. Maven version: (mvn -version)
  3. Scala runtime if applicable: (scala -version)

For R user, please provide R sessionInfo():

Build info (Required if built from source)

Compiler (gcc/clang/mingw/visual studio):

MXNet commit hash:
(Paste the output of git rev-parse HEAD here.)
CMakeError.log
CMakeOutput.log

Build config:
(Paste the content of config.mk, or the build command.)

Error Message:

(Paste the complete error message, including stack trace.)
Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.17763.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working C compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
Check for working CXX compiler: D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMAKE_CROSSCOMPILING FALSE
CMAKE_HOST_SYSTEM_PROCESSOR AMD64
CMAKE_SYSTEM_PROCESSOR AMD64
CMAKE_SYSTEM_NAME Windows
CMake version '3.15.0-rc3' using generator 'Visual Studio 14 2015'
The CUDA compiler identification is unknown
CMake Error at CMakeLists.txt:73 (project):
No CMAKE_CUDA_COMPILER could be found.

Minimum reproducible example

(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)

Steps to reproduce

(Paste the commands you ran that produced the error.)

1.
2.

What have you tried to solve it?

1.
2.

Build CMake CUDA

Most helpful comment

@SpaceView on ubuntu, I add

set(CMAKE_CUDA_COMPILER "/usr/local/cuda-9.0/bin/nvcc")

solved this pro ! thanks

All 8 comments

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Cuda, Installation, Build

@mxnet-label-bot add [build, cmake, cuda]

I got the same error

Not sure this is gonna help, just my experience.
Tried various CMake versions, got the same error, I suppose this is a cuda version problem, and I checked that visual studio 2019 supports only cuda 10.1 (I didn't check a lot on old versions), as below,
https://developer.nvidia.com/gameworksdownload#?dn=nsight-visual-studio-edition-2019-3

and I checked my build folder, only cuda10.1 exists, as below,
C:\Program Files (x86)\Microsoft Visual Studio2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations

I don't have visual studio 2017 installed, so have no idea about older versions.
I add
set(CMAKE_CUDA_COMPILER "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe")
before the line 73 project(mxnet C CXX CUDA), and other errors popped up as below
The CUDA compiler
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/bin/nvcc.exe"
is not able to compile a simple test program.

I tested with visual studio 2019 + cuda 10.1, and solved the problem.

@SpaceView on ubuntu, I add

set(CMAKE_CUDA_COMPILER "/usr/local/cuda-9.0/bin/nvcc")

solved this pro ! thanks

yes nvcc should be in the path seems.

with cuda 9.2 as in the CI environment this is not a problem as nvcc is added to the path.

Let's add a note about CMAKE_CUDA_COMPILER to the install instructions.

Was this page helpful?
0 / 5 - 0 ratings