You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/19 23:50:03 UTC

[GitHub] wenyangchu opened a new issue #11339: compiling error when USE_CUDA=1 and USE_CUDNN=0 with make command

wenyangchu opened a new issue #11339: compiling error when USE_CUDA=1  and USE_CUDNN=0 with make command
URL: https://github.com/apache/incubator-mxnet/issues/11339
 
 
   ## Description
   compiling error when USE_CUDA=1  and USE_CUDNN=0 with make command
   
   ## Environment info (Required)
   ```
   Ubuntu 16.04 
   
   ```
   ## Build info (Required if built from source)
   Compiler g++/gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
   
   ## Error Message:
   src/operator/nn/convolution.cu(93): error: identifier "param_" is undefined
   src/operator/nn/convolution.cu(171): error: identifier "param_" is undefined
   
   and fix it in the code, get more errors:
   
   build/src/engine/naive_engine.o: In function `mxnet::engine::NaiveEngine::~NaiveEngine()':
   naive_engine.cc:(.text._ZN5mxnet6engine11NaiveEngineD2Ev[_ZN5mxnet6engine11NaiveEngineD5Ev]+0xd35): undefined reference to `cudnnDestroy'
   ## Minimum reproducible example
   Use the latest master branch
   
   ## Steps to reproduce
   (Paste the commands you ran that produced the error.)
   1. checkout latest master branch
   2.  run 
   make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=0
   
   ## What have you tried to solve it?
   
   1.  By changing the following:
   diff --git a/src/operator/nn/convolution.cu b/src/operator/nn/convolution.cu
   index 9f61212..9f573f1 100644
   --- a/src/operator/nn/convolution.cu
   +++ b/src/operator/nn/convolution.cu
   @@ -89,7 +89,7 @@ void ConvolutionCompute<gpu>(const nnvm::NodeAttrs& attrs,
      const ConvolutionParam& param = nnvm::get<ConvolutionParam>(attrs.parsed);
      int dtype = inputs[conv::kData].type_flag_;
   
   -#if CUDNN_MAJOR < 5
   +#if MXNET_USE_CUDNN ==1 && CUDNN_MAJOR < 5
      if (param_.layout.value() != kNCW &&
          param_.layout.value() != kNCHW &&
          param_.layout.value() != kNCDHW) {
   @@ -167,7 +167,7 @@ void ConvolutionGradCompute<gpu>(const nnvm::NodeAttrs& attrs,
      const std::vector<TBlob> &in_grad = outputs;
      int dtype = out_grad.type_flag_;
   
   -#if CUDNN_MAJOR < 5
   +#if MXNET_USE_CUDNN ==1 && CUDNN_MAJOR < 5
      if (param_.layout.value() != kNCW &&
          param_.layout.value() != kNCHW &&
          param_.layout.value() != kNCDHW) {
   
   I can continue compiling but get another error below:
   
   build/src/engine/naive_engine.o: In function `mxnet::engine::NaiveEngine::~NaiveEngine()':
   naive_engine.cc:(.text._ZN5mxnet6engine11NaiveEngineD2Ev[_ZN5mxnet6engine11NaiveEngineD5Ev]+0xd35): undefined reference to `cudnnDestroy'
   naive_engine.cc:(.text._ZN5mxnet6engine11NaiveEngineD2Ev[_ZN5mxnet6engine11NaiveEngineD5Ev]+0x1ce4): undefined reference to `cudnnGetErrorString'
   build/src/engine/naive_engine.o: In function `void mshadow::DeleteStream<mshadow::gpu>(mshadow::Stream<mshadow::gpu>*)':
   naive_engine.cc:(.text._ZN7mshadow12DeleteStreamINS_3gpuEEEvPNS_6StreamIT_EE[_ZN7mshadow12DeleteStreamINS_3gpuEEEvPNS_6StreamIT_EE]+0x12a): undefined reference to `cudnnDestroy'
   ....
   
   The cudnn flag is set mshadow I suppose but I haven't found out what makes the cudnn flag is true
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services