Skip to content

Error in compiling math_function.cu  #1

@ashishmishraiitm

Description

@ashishmishraiitm

Issue summary

While compiling the code for ADaPTION, I am getting below errors in 'math_functions.cu'-

62 errors detected in the compilation of "/tmp/tmpxft_00009c1c_00000000-16_math_functions.compute_52.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1

Since I am able to successfully install caffe on my system I think the issue is with the code. Please Guide.

Please find below error logs-

NVCC src/caffe/util/math_functions.cu
src/caffe/util/math_functions.cu(42): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(50): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(58): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(58): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(59): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(74): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(74): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(75): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(90): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(90): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(100): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(100): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(110): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(116): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(123): error: identifier "CUDA_CHECK" is undefined

src/caffe/util/math_functions.cu(128): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(133): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(138): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(145): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(152): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(158): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(164): error: caffe_gpu_asum is not a templWhile compiling the code for ADaPTION, I am getting below errors in 'math_functions.cu'-

NVCC src/caffe/util/math_functions.cu
src/caffe/util/math_functions.cu(42): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(50): error: "caffe_gpu_round_fp" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(58): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(58): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(59): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(74): error: caffe_gpu_gemm is not a template

src/caffe/util/math_functions.cu(74): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(75): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(90): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(90): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(100): error: caffe_gpu_gemv is not a template

src/caffe/util/math_functions.cu(100): error: identifier "CBLAS_TRANSPOSE" is undefined

src/caffe/util/math_functions.cu(110): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(116): error: caffe_gpu_axpy is not a template

src/caffe/util/math_functions.cu(123): error: identifier "CUDA_CHECK" is undefined

src/caffe/util/math_functions.cu(128): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(133): error: caffe_gpu_scal is not a template

src/caffe/util/math_functions.cu(138): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(145): error: caffe_gpu_axpby is not a template

src/caffe/util/math_functions.cu(152): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(158): error: caffe_gpu_dot is not a template

src/caffe/util/math_functions.cu(164): error: caffe_gpu_asum is not a template

src/caffe/util/math_functions.cu(169): error: caffe_gpu_asum is not a template

src/caffe/util/math_functions.cu(174): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(181): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(217): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(224): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(239): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(247): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(263): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(271): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(287): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(295): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(311): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(319): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(334): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(341): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(356): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(363): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(377): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(384): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(399): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(407): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(414): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(414): error: identifier "sign" is undefined

src/caffe/util/math_functions.cu(414): error: expected a ")"

src/caffe/util/math_functions.cu(416): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(416): error: variable "caffe::DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC" has already been defined

src/caffe/util/math_functions.cu(416): error: identifier "sgnbit" is undefined

src/caffe/util/math_functions.cu(416): error: expected a ")"

src/caffe/util/math_functions.cu(419): error: name followed by "::" must be a class or namespace name

src/caffe/util/math_functions.cu(419): error: identifier "curandGenerate" is undefined

src/caffe/util/math_functions.cu(419): error: identifier "CURAND_CHECK" is undefined

src/caffe/util/math_functions.cu(423): error: "void caffe::caffe_gpu_rng_uniform(int, unsigned int *)" is not an entity that can be explicitly specialized

src/caffe/util/math_functions.cu(423): error: expected a ";"

src/caffe/util/math_functions.cu(462): warning: parsing restarts here after previous syntax error

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_GET_BLOCKS" is undefined

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_CUDA_NUM_THREADS" is undefined

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: identifier "CUDA_KERNEL_LOOP" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: expected a ";"
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(192): warning: parsing restarts here after previous syntax error
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=float]"
(206): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=double]"
(207): here

62 errors detected in the compilation of "/tmp/tmpxft_00009c1c_00000000-16_math_functions.compute_52.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1ate

src/caffe/util/math_functions.cu(169): error: caffe_gpu_asum is not a template

src/caffe/util/math_functions.cu(174): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(181): error: caffe_gpu_scale is not a template

src/caffe/util/math_functions.cu(217): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(224): error: "caffe_gpu_add_scalar" is not a class or function template name in the current scope

src/caffe/util/math_functions.cu(239): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(247): error: caffe_gpu_add is not a template

src/caffe/util/math_functions.cu(263): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(271): error: caffe_gpu_sub is not a template

src/caffe/util/math_functions.cu(287): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(295): error: caffe_gpu_mul is not a template

src/caffe/util/math_functions.cu(311): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(319): error: caffe_gpu_div is not a template

src/caffe/util/math_functions.cu(334): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(341): error: caffe_gpu_abs is not a template

src/caffe/util/math_functions.cu(356): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(363): error: caffe_gpu_exp is not a template

src/caffe/util/math_functions.cu(377): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(384): error: caffe_gpu_log is not a template

src/caffe/util/math_functions.cu(399): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(407): error: caffe_gpu_powx is not a template

src/caffe/util/math_functions.cu(414): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(414): error: identifier "sign" is undefined

src/caffe/util/math_functions.cu(414): error: expected a ")"

src/caffe/util/math_functions.cu(416): error: this declaration has no storage class or type specifier

src/caffe/util/math_functions.cu(416): error: variable "caffe::DEFINE_AND_INSTANTIATE_GPU_UNARY_FUNC" has already been defined

src/caffe/util/math_functions.cu(416): error: identifier "sgnbit" is undefined

src/caffe/util/math_functions.cu(416): error: expected a ")"

src/caffe/util/math_functions.cu(419): error: name followed by "::" must be a class or namespace name

src/caffe/util/math_functions.cu(419): error: identifier "curandGenerate" is undefined

src/caffe/util/math_functions.cu(419): error: identifier "CURAND_CHECK" is undefined

src/caffe/util/math_functions.cu(423): error: "void caffe::caffe_gpu_rng_uniform(int, unsigned int *)" is not an entity that can be explicitly specialized

src/caffe/util/math_functions.cu(423): error: expected a ";"

src/caffe/util/math_functions.cu(462): warning: parsing restarts here after previous syntax error

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_GET_BLOCKS" is undefined

src/caffe/util/math_functions.cu(201): error: identifier "CAFFE_CUDA_NUM_THREADS" is undefined

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: identifier "CUDA_KERNEL_LOOP" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(189): error: expected a ";"
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(192): warning: parsing restarts here after previous syntax error
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=int]"
(205): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=float]"
(206): here

src/caffe/util/math_functions.cu(197): error: identifier "CUDA_CHECK" is undefined
detected during instantiation of "void caffe::caffe_gpu_set(int, Dtype, Dtype *) [with Dtype=double]"
(207): here

62 errors detected in the compilation of "/tmp/tmpxft_00009c1c_00000000-16_math_functions.compute_52.cpp1.ii".
make: *** [.build_release/cuda/src/caffe/util/math_functions.o] Error 1

system configuration

Operating system: Ubuntu 14.04.5 LTS
Compiler: gcc version 4.8.5
CUDA version: cuda-7.5
Python or MATLAB version (for pycaffe and matcaffe respectively): Python 2.7.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions