Incubator-mxnet: Compile lastest MXNet failed with cude 8.0

Created on 14 May 2017  ·  10Comments  ·  Source: apache/incubator-mxnet

For bugs or installation issues, please provide the following information.
The more information you provide, the more likely people will be able to help you.

Environment info

Operating System: Ubuntu 14.04

Compiler: gcc 4.8

Package used (Python/R/Scala/Julia):

MXNet version: 0.9.5

Or if installed from source: yes

MXNet commit hash (git rev-parse HEAD): 38f7c5584016e92ba1e0ee1b00ea6632740f67ce

If you are using python package, please provide

Python version and distribution:

If you are using R package, please provide

R sessionInfo():

Error Message:

Please paste the full error message, including stack trace.

g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/ -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/dmlc-core/include -fPIC -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_PROFILER=1 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv   -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_DIST_KVSTORE -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/ps-lite/include -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/deps/include -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/cub -DMXNET_USE_NVRTC=1 -MMD -c src/operator/contrib/dequantize.cc -o build/src/operator/contrib/dequantize.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/ -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/dmlc-core/include -fPIC -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/nnvm/include -Iinclude -funroll-loops -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_PROFILER=1 -DMXNET_USE_OPENCV=1 -I/usr/include/opencv   -fopenmp -DMSHADOW_USE_CUDNN=1  -DMXNET_USE_DIST_KVSTORE -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/ps-lite/include -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/deps/include -I/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/cub -DMXNET_USE_NVRTC=1 -MMD -c src/operator/contrib/fft.cc -o build/src/operator/contrib/fft.o
In file included from /home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/tensor.h:16:0,
                 from include/mxnet/./base.h:13,
                 from include/mxnet/operator_util.h:24,
                 from src/operator/contrib/./dequantize-inl.h:9,
                 from src/operator/contrib/dequantize.cc:6:
/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/./base.h:359:43: error: ‘CUDA_R_32I’ was not declared in this scope
   static const cudaDataType_t kCudaFlag = CUDA_R_32I;
                                           ^
In file included from /home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/tensor.h:16:0,
                 from include/mxnet/./base.h:13,
                 from include/mxnet/operator.h:19,
                 from src/operator/contrib/./ctc_loss-inl.h:13,
                 from src/operator/contrib/ctc_loss.cc:8:
/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/./base.h:359:43: error: ‘CUDA_R_32I’ was not declared in this scope
   static const cudaDataType_t kCudaFlag = CUDA_R_32I;
                                           ^
In file included from /home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/tensor.h:16:0,
                 from include/mxnet/./base.h:13,
                 from include/mxnet/operator.h:19,
                 from src/operator/contrib/./count_sketch-inl.h:11,
                 from src/operator/contrib/count_sketch.cc:7:
/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/./base.h:359:43: error: ‘CUDA_R_32I’ was not declared in this scope
   static const cudaDataType_t kCudaFlag = CUDA_R_32I;
                                           ^
In file included from /home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/tensor.h:16:0,
                 from include/mxnet/./base.h:13,
                 from include/mxnet/operator.h:19,
                 from src/operator/contrib/./../operator_common.h:13,
                 from src/operator/contrib/./fft-inl.h:16,
                 from src/operator/contrib/fft.cc:7:
/home/ldpe2g/Mxnet/mxnet_Scala/mxnet/mshadow/mshadow/./base.h:359:43: error: ‘CUDA_R_32I’ was not declared in this scope
   static const cudaDataType_t kCudaFlag = CUDA_R_32I;
                                           ^
make: *** [build/src/operator/contrib/count_sketch.o] 错误 1
make: *** 正在等待未完成的任务....
make: *** [build/src/operator/contrib/ctc_loss.o] 错误 1
make: *** [build/src/operator/contrib/fft.o] 错误 1
make: *** [build/src/operator/contrib/dequantize.o] 错误 1

What have you tried to solve it?

  1. set USE_CUDA_PATH to use cude 7.5 problem solved

Most helpful comment

I also met the same problem , my cuda is 8.0.27 , and I found all files but could not find the definition of CUDA_R_32I,

so I replaced all the CUDA_R_32I as CUDA_R_32F in the base.h, then it worked.

All 10 comments

Hi, i have met the same problem. And how to install CUDA7.5 and CUDA8.0 in same computer or just uninstall CUDA8.0 then install CUDA7.5???

You should use the lastest cuda 8, I update cuda 8 from 8.0.27 to cuda 8.0.61 and problem solved.
You can install both cuda 7.5 and cuda 8 on the same computer. I install driver and cuda using the run file.

Thanks a lot !!

Is anyone else getting this issue with cuda 8.0.61?

Upon further inspection, it seems that CUDA_R_32I is literally not defined in /usr/local/cuda/include/library_types.h, hence the error.

I'm getting the same error with cuda 8.0.61. Have you solved it?

@xinario I replaced every instance of CUDA_R_32I in MXNet with a type that was defined in the library_type.h header file. It was probably something along the line of CUDA_R_32F. Obviously not the best workaround... but the build passed.

my way is to set USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda/targets/x86_64-linux

I also met the same problem , my cuda is 8.0.27 , and I found all files but could not find the definition of CUDA_R_32I,

so I replaced all the CUDA_R_32I as CUDA_R_32F in the base.h, then it worked.

Just change the /Mxnet/3rdparty/mshadow/mshadow/base.h, I also can work it out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dushoufu picture dushoufu  ·  3Comments

Zhaoyang-XU picture Zhaoyang-XU  ·  3Comments

phunterlau picture phunterlau  ·  3Comments

realbns2008 picture realbns2008  ·  3Comments

JonBoyleCoding picture JonBoyleCoding  ·  3Comments