Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope #2537

Open
fengyicoder opened this issue Jul 22, 2018 · 5 comments
Open

error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope #2537

fengyicoder opened this issue Jul 22, 2018 · 5 comments

Comments

@fengyicoder
Copy link

fengyicoder commented Jul 22, 2018

I had installed the caffe2 builed from source. However, when I tried to run the command "sudo make install", the error appeared.
cuda version: 8.0
cudnn version: 5.1
the error is bellow:
In file included from /home/xms/pytorch/caffe2/core/context_gpu.h:19:0,
from /home/xms/pytorch/caffe2/operators/activation_ops_cudnn.h:4,
from /home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:3:
/home/xms/pytorch/caffe2/core/common_cudnn.h:24:17: note: #pragma message: CUDNN version under 6.0 is supported at best effort.
#pragma message "CUDNN version under 6.0 is supported at best effort."
^
/home/xms/pytorch/caffe2/core/common_cudnn.h:25:17: note: #pragma message: We strongly encourage you to move to 6.0 and above.
#pragma message "We strongly encourage you to move to 6.0 and above."
^
/home/xms/pytorch/caffe2/core/common_cudnn.h:26:17: note: #pragma message: This message is intended to annoy you enough to update.
#pragma message "This message is intended to annoy you enough to update."
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:8:25: error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope
class CuDNNActivationOp<CUDNN_ACTIVATION_ELU> final
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:8:45: error: template argument 1 is invalid
class CuDNNActivationOp<CUDNN_ACTIVATION_ELU> final
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:54:33: error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope
class CuDNNActivationGradientOp<CUDNN_ACTIVATION_ELU> final
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:54:53: error: template argument 1 is invalid
class CuDNNActivationGradientOp<CUDNN_ACTIVATION_ELU> final
^
In file included from /home/xms/pytorch/caffe2/core/flags.h:23:0,
from /home/xms/pytorch/caffe2/core/logging.h:10,
from /home/xms/pytorch/caffe2/core/allocator.h:6,
from /home/xms/pytorch/caffe2/core/context.h:9,
from /home/xms/pytorch/caffe2/operators/elementwise_ops.h:10,
from /home/xms/pytorch/caffe2/operators/elu_op.h:6,
from /home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:1:
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:48: error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:180:48: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
Registerer##RegistryName::DefaultCreator<VA_ARGS>,
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:68: error: template argument 1 is invalid
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:180:48: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
Registerer##RegistryName::DefaultCreator<VA_ARGS>,
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:48: error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:181:20: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:68: error: template argument 1 is invalid
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:181:20: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:181:33: error: no matching function for call to ‘DemangleType()’
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/registry.h:210:3: note: in expansion of macro ‘CAFFE_REGISTER_TYPED_CLASS’
CAFFE_REGISTER_TYPED_CLASS(RegistryName, #key, VA_ARGS)
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
In file included from /home/xms/pytorch/caffe2/core/registry.h:21:0,
from /home/xms/pytorch/caffe2/core/flags.h:23,
from /home/xms/pytorch/caffe2/core/logging.h:10,
from /home/xms/pytorch/caffe2/core/allocator.h:6,
from /home/xms/pytorch/caffe2/core/context.h:9,
from /home/xms/pytorch/caffe2/operators/elementwise_ops.h:10,
from /home/xms/pytorch/caffe2/operators/elu_op.h:6,
from /home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:1:
/home/xms/pytorch/caffe2/core/typeid.h:76:20: note: candidate: template const char* caffe2::DemangleType()
static const char* DemangleType() {
^
/home/xms/pytorch/caffe2/core/typeid.h:76:20: note: template argument deduction/substitution failed:
In file included from /home/xms/pytorch/caffe2/core/flags.h:23:0,
from /home/xms/pytorch/caffe2/core/logging.h:10,
from /home/xms/pytorch/caffe2/core/allocator.h:6,
from /home/xms/pytorch/caffe2/core/context.h:9,
from /home/xms/pytorch/caffe2/operators/elementwise_ops.h:10,
from /home/xms/pytorch/caffe2/operators/elu_op.h:6,
from /home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:1:
/home/xms/pytorch/caffe2/core/registry.h:181:33: error: template argument 1 is invalid
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/registry.h:210:3: note: in expansion of macro ‘CAFFE_REGISTER_TYPED_CLASS’
CAFFE_REGISTER_TYPED_CLASS(RegistryName, #key, VA_ARGS)
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:104:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(Elu, CuDNNActivationOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:107:31: error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope
CuDNNActivationGradientOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:180:48: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
Registerer##RegistryName::DefaultCreator<VA_ARGS>,
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:105:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:107:51: error: template argument 1 is invalid
CuDNNActivationGradientOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:180:48: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
Registerer##RegistryName::DefaultCreator<VA_ARGS>,
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:105:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:107:31: error: ‘CUDNN_ACTIVATION_ELU’ was not declared in this scope
CuDNNActivationGradientOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:181:20: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:105:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:107:51: error: template argument 1 is invalid
CuDNNActivationGradientOp<CUDNN_ACTIVATION_ELU>);
^
/home/xms/pytorch/caffe2/core/registry.h:181:20: note: in definition of macro ‘CAFFE_REGISTER_TYPED_CLASS’
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:105:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(
^
/home/xms/pytorch/caffe2/core/registry.h:181:33: error: no matching function for call to ‘DemangleType()’
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/registry.h:210:3: note: in expansion of macro ‘CAFFE_REGISTER_TYPED_CLASS’
CAFFE_REGISTER_TYPED_CLASS(RegistryName, #key, VA_ARGS)
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:105:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(
^
In file included from /home/xms/pytorch/caffe2/core/registry.h:21:0,
from /home/xms/pytorch/caffe2/core/flags.h:23,
from /home/xms/pytorch/caffe2/core/logging.h:10,
from /home/xms/pytorch/caffe2/core/allocator.h:6,
from /home/xms/pytorch/caffe2/core/context.h:9,
from /home/xms/pytorch/caffe2/operators/elementwise_ops.h:10,
from /home/xms/pytorch/caffe2/operators/elu_op.h:6,
from /home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:1:
/home/xms/pytorch/caffe2/core/typeid.h:76:20: note: candidate: template const char* caffe2::DemangleType()
static const char* DemangleType() {
^
/home/xms/pytorch/caffe2/core/typeid.h:76:20: note: template argument deduction/substitution failed:
In file included from /home/xms/pytorch/caffe2/core/flags.h:23:0,
from /home/xms/pytorch/caffe2/core/logging.h:10,
from /home/xms/pytorch/caffe2/core/allocator.h:6,
from /home/xms/pytorch/caffe2/core/context.h:9,
from /home/xms/pytorch/caffe2/operators/elementwise_ops.h:10,
from /home/xms/pytorch/caffe2/operators/elu_op.h:6,
from /home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:1:
/home/xms/pytorch/caffe2/core/registry.h:181:33: error: template argument 1 is invalid
DemangleType<VA_ARGS>());
^
/home/xms/pytorch/caffe2/core/registry.h:210:3: note: in expansion of macro ‘CAFFE_REGISTER_TYPED_CLASS’
CAFFE_REGISTER_TYPED_CLASS(RegistryName, #key, VA_ARGS)
^
/home/xms/pytorch/caffe2/core/operator.h:848:3: note: in expansion of macro ‘CAFFE_REGISTER_CLASS’
CAFFE_REGISTER_CLASS(
^
/home/xms/pytorch/caffe2/core/operator.h:853:3: note: in expansion of macro ‘REGISTER_CUDA_OPERATOR_WITH_ENGINE’
REGISTER_CUDA_OPERATOR_WITH_ENGINE(name, CUDNN, VA_ARGS)
^
/home/xms/pytorch/caffe2/operators/elu_op_cudnn.cc:105:1: note: in expansion of macro ‘REGISTER_CUDNN_OPERATOR’
REGISTER_CUDNN_OPERATOR(
^
caffe2/CMakeFiles/caffe2_gpu.dir/build.make:67850: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/operators/elu_op_cudnn.cc.o' failed
make[2]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/operators/elu_op_cudnn.cc.o] Error 1
CMakeFiles/Makefile2:1401: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed
make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

@AkilaPemasiri
Copy link

Did you solved this problem. I have the same problem.

@dxiaosa
Copy link

dxiaosa commented Jul 25, 2018

I have the same problem... no solution is found until now.

@huynhthedang
Copy link

I have the same problem and do not now how to solve it.

@CarlosYeverino
Copy link

I have the same issue. Same problem as described in pytorch/pytorch#9921

@CarlosYeverino
Copy link

Hi all,

it seems that there are issues when compiling CUDA 8.0 and cuDNN 5.1. I fixed the errors once I switched to cuDNN 7.0.5 and kept CUDA 8.0. Make sure that you do the following in the extracted folder of cuDNN 7.0.5:

sudo cp -P include/cudnn.h /usr/local/cuda-8.0/include
sudo cp -P lib64/libcudnn* /usr/local/cuda-8.0/lib64

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants