Could not build with cuda10.2 and cudnn 8

1,023 views
Skip to first unread message
Assigned to mih...@gmail.com by me

mendy shun

unread,
Feb 11, 2021, 12:30:38 AM2/11/21
to Caffe Users
Hi, thank you for sharing your great code.
I'm trying to install caffe with cudnn8 and cuda10.2 using docker.

However, I got the following error...
Do anyone know a solution of this ??

My docker file, config file and error are follows:

Makefile.config

# Contributions simplifying and improving our build system are welcome!

# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1

# CPU-only switch (uncomment to build without GPU support).
# CPU_ONLY := 1

# uncomment to disable IO dependencies and corresponding data layers
# USE_OPENCV := 0
# USE_LEVELDB := 0
# USE_LMDB := 0
# USE_HDF5 := 0

# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1

# Uncomment if you're using OpenCV 3
OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++

# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda-10.2
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
# CUDA_ARCH :=
# -gencode arch=compute_20,code=sm_20 \
# -encode arch=compute_20,code=sm_21 \
CUDA_ARCH := -gencode arch=compute_30,code=sm_30 \
    -gencode arch=compute_35,code=sm_35 \
    -gencode arch=compute_50,code=sm_50 \
    -gencode arch=compute_52,code=sm_52 \
    -gencode arch=compute_60,code=sm_60 \
    -gencode arch=compute_61,code=sm_61 \
    -gencode arch=compute_61,code=compute_61

# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := atlas
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas

# Homebrew puts openblas in a directory that is not on the standard search path
# BLAS_INCLUDE := $(shell brew --prefix openblas)/include
# BLAS_LIB := $(shell brew --prefix openblas)/lib

# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app

# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
# PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/lib/python2.7/dist-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
# ANACONDA_HOME := $(HOME)/anaconda
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include

# Uncomment to use Python 3 (default is Python 2)
# PYTHON_LIBRARIES := boost_python3 python3.6m
# PYTHON_INCLUDE := /usr/include/python3.6m \
#                 /usr/lib/python3.6/dist-packages/numpy/core/include

# We need to be able to find libpythonX.X.so or .dylib.
# PYTHON_LIB := /usr/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib

# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib

# Uncomment to support layers written in Python (will link against Python libs)
# WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib

# NCCL acceleration switch (uncomment to build with NCCL)
https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)
# USE_NCCL := 1

# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1

# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute

# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1

# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0

# enable pretty build (comment to see full commands)
Q ?= @

Dockerfile

FROM nvidia/cudagl:10.2-devel-ubuntu18.04

ENV DEBIAN_FRONTEND=noninteractive

## install essential tools ####################################################

# install essential
RUN apt-get update -y && \
    apt-get install -y --no-install-recommends \
    python-pip \
    python3-pip \
    python-wheel \
    python-setuptools \
    python-dev \
    git \
    sudo \
    libopencv-dev \
    curl \
    g++ \
    make \
    git \
    snapd \
    zip \
    unzip \
    wget \
    libssl-dev \
    freeglut3-dev \
    build-essential \
    software-properties-common \
    lsb-core \
    apt-utils

# Upgrade to latest pip
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --upgrade wheel
RUN pip2 install --upgrade natsort

# install cudnn
ENV CUDNN_VERSION 8.0.5.39

RUN apt-get update && apt-get install -y --no-install-recommends \
    libcudnn8=$CUDNN_VERSION-1+cuda10.2 \
    libcudnn8-dev=$CUDNN_VERSION-1+cuda10.2 && \
    apt-mark hold libcudnn8

# set enviroment variable
ENV NVIDIA_VISIBLE_DEVICES \
    ${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
    ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
ENV NVIDIA_DRIVER_CAPABILITIES \
    ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}display,compute

# cmake install
RUN wget https://cmake.org/files/v3.19/cmake-3.19.3.tar.gz  -O cmake-3.19.3.tar.gz
RUN tar -zxvf cmake-3.19.3.tar.gz 
WORKDIR /cmake-3.19.3

RUN ./bootstrap
RUN make
RUN make install

## install opencv
WORKDIR /usr/local
RUN unzip -q 3.4.13.zip
RUN rm -rf 3.4.13.zip
WORKDIR /usr/local/opencv-3.4.13
RUN mkdir -p build && cd build
WORKDIR /usr/local/opencv-3.4.13/build
RUN cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DENABLE_CXX11=ON \
    -DBUILD_DOCS=OFF \
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_JASPER=OFF \
    -DBUILD_OPENEXR=OFF \
    -DBUILD_PERF_TESTS=OFF \
    -DBUILD_TESTS=OFF \
    -DWITH_EIGEN=ON \
    -DWITH_FFMPEG=ON \
    -DWITH_OPENMP=ON \
    ..
RUN make -j4
RUN make install

## install caffe first ########################################################

RUN apt-get install -y python3-opencv
RUN apt-get install -y python3-numpy

RUN apt-get install -y qtbase5-dev libcanberra-gtk-module libcanberra-gtk3-module

RUN apt-get update -y
RUN apt-get install build-essential -y
RUN apt-get install libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler -y
RUN apt-get install --no-install-recommends libboost-all-dev -y
RUN apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev -y

RUN apt-get install the python3-dev
RUN pip3 install protobuf

WORKDIR /usr/local

WORKDIR /usr/local/caffe
COPY ./Makefile.config /usr/local/caffe

RUN make all -j4

# Remove apt caches
RUN rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

WORKDIR /home

CMD [ "bash" ]

Error

src/caffe/layers/cudnn_deconv_layer.cpp: In member function 'virtual void caffe::CuDNNDeconvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&)':
src/caffe/layers/cudnn_deconv_layer.cpp:151:9: error: 'CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT' was not declared in this scope
         CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:151:9: note: suggested alternative: 'CUDNN_CONVOLUTION_FWD_ALGO_DIRECT'
         CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:145:17: error: there are no arguments to 'cudnnGetConvolutionForwardAlgorithm' that depend on a template parameter, so a declaration of 'cudnnGetConvolutionForwardAlgorithm' must be available [-fpermissive]
     CUDNN_CHECK(cudnnGetConvolutionForwardAlgorithm(
                 ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:145:17: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
     CUDNN_CHECK(cudnnGetConvolutionForwardAlgorithm(
                 ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:193:9: error: 'CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT' was not declared in this scope
         CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:193:9: note: suggested alternative: 'CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT'
         CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:187:17: error: there are no arguments to 'cudnnGetConvolutionBackwardFilterAlgorithm' that depend on a template parameter, so a declaration of 'cudnnGetConvolutionBackwardFilterAlgorithm' must be available [-fpermissive]
     CUDNN_CHECK(cudnnGetConvolutionBackwardFilterAlgorithm(
                 ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:214:9: error: 'CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT' was not declared in this scope
         CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:214:9: note: suggested alternative: 'CUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT'
         CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
         ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:208:17: error: there are no arguments to 'cudnnGetConvolutionBackwardDataAlgorithm' that depend on a template parameter, so a declaration of 'cudnnGetConvolutionBackwardDataAlgorithm' must be available [-fpermissive]
     CUDNN_CHECK(cudnnGetConvolutionBackwardDataAlgorithm(
                 ^
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp: In instantiation of 'void caffe::CuDNNDeconvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = float]':
src/caffe/layers/cudnn_deconv_layer.cpp:324:1:   required from here
src/caffe/layers/cudnn_deconv_layer.cpp:145:52: error: 'cudnnGetConvolutionForwardAlgorithm' was not declared in this scope
     CUDNN_CHECK(cudnnGetConvolutionForwardAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &fwd_algo_[i]));
         ~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:145:52: note: suggested alternative: 'cudnnGetConvolutionForwardAlgorithm_v7'
     CUDNN_CHECK(cudnnGetConvolutionForwardAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &fwd_algo_[i]));
         ~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:187:59: error: 'cudnnGetConvolutionBackwardFilterAlgorithm' was not declared in this scope
     CUDNN_CHECK(cudnnGetConvolutionBackwardFilterAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_filter_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:187:59: note: suggested alternative: 'cudnnGetConvolutionBackwardFilterAlgorithm_v7'
     CUDNN_CHECK(cudnnGetConvolutionBackwardFilterAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_filter_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:208:57: error: 'cudnnGetConvolutionBackwardDataAlgorithm' was not declared in this scope
     CUDNN_CHECK(cudnnGetConvolutionBackwardDataAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_data_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:208:57: note: suggested alternative: 'cudnnGetConvolutionBackwardDataAlgorithm_v7'
     CUDNN_CHECK(cudnnGetConvolutionBackwardDataAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_data_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp: In instantiation of 'void caffe::CuDNNDeconvolutionLayer<Dtype>::Reshape(const std::vector<caffe::Blob<Dtype>*>&, const std::vector<caffe::Blob<Dtype>*>&) [with Dtype = double]':
src/caffe/layers/cudnn_deconv_layer.cpp:324:1:   required from here
src/caffe/layers/cudnn_deconv_layer.cpp:145:52: error: 'cudnnGetConvolutionForwardAlgorithm' was not declared in this scope
     CUDNN_CHECK(cudnnGetConvolutionForwardAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &fwd_algo_[i]));
         ~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:145:52: note: suggested alternative: 'cudnnGetConvolutionForwardAlgorithm_v7'
     CUDNN_CHECK(cudnnGetConvolutionForwardAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &fwd_algo_[i]));
         ~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:187:59: error: 'cudnnGetConvolutionBackwardFilterAlgorithm' was not declared in this scope
     CUDNN_CHECK(cudnnGetConvolutionBackwardFilterAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_filter_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:187:59: note: suggested alternative: 'cudnnGetConvolutionBackwardFilterAlgorithm_v7'
     CUDNN_CHECK(cudnnGetConvolutionBackwardFilterAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_FILTER_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_filter_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:208:57: error: 'cudnnGetConvolutionBackwardDataAlgorithm' was not declared in this scope
     CUDNN_CHECK(cudnnGetConvolutionBackwardDataAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_data_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
src/caffe/layers/cudnn_deconv_layer.cpp:208:57: note: suggested alternative: 'cudnnGetConvolutionBackwardDataAlgorithm_v7'
     CUDNN_CHECK(cudnnGetConvolutionBackwardDataAlgorithm(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
         handle_[0],
         ~~~~~~~~~~~
         filter_desc_,
         ~~~~~~~~~~~~~
         bottom_descs_[i],
         ~~~~~~~~~~~~~~~~~
         conv_descs_[i],
         ~~~~~~~~~~~~~~~
         top_descs_[i],
         ~~~~~~~~~~~~~~
         CUDNN_CONVOLUTION_BWD_DATA_SPECIFY_WORKSPACE_LIMIT,
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         workspace_limit_bytes,
         ~~~~~~~~~~~~~~~~~~~~~~
         &bwd_data_algo_[i]));
         ~~~~~~~~~~~~~~~~~~~
./include/caffe/util/cudnn.hpp:15:28: note: in definition of macro 'CUDNN_CHECK'
     cudnnStatus_t status = condition; \
                            ^~~~~~~~~
make: *** [.build_release/src/caffe/layers/cudnn_deconv_layer.o] Error 1
make: *** Waiting for unfinished jobs....

Tamas Nemes

unread,
Feb 11, 2021, 4:43:05 AM2/11/21
to Caffe Users
Hello,
I guess I have some bad news for you. Since Caffe is a rather old framework, it uses cuDNN code which is deprecated by now. I also tried to build Caffe with cuDNN 8 and apply various fixes, but it didn't work out at the end. When I remember correctly, I even got it compiled, but the training didn't execute correctly.
So to save you the headaches, I would strongly advise you to build without cuDNN and just with CUDA. Even then the speed of training is more than enough. Caffe should build normally with CUDA version 10.2, so just give it a try.
Best of luck!

mendy shun

unread,
Feb 11, 2021, 9:26:05 AM2/11/21
to Caffe Users
Thank you for your advice!!
Honestly, it is taking a lot of time to solve this case... I feel I can not solve this...
I'll try to build caffe without cudnn!! 
Again, Thank you for your comments and advice.

2021年2月11日木曜日 18:43:05 UTC+9 Tamas Nemes:
Reply all
Reply to author
Forward
0 new messages