framework cuda caffe

cuda - framework - Problemas con la compilación de Caffe con cuDNN



caffe on windows (2)

Estoy tratando de compilar caffe en ubuntu14 con 750ti geforce gpu pero no puedo. Instalé la biblioteca cudnn en / usr / local / cuda / lib64 y el archivo de encabezado cudnn.h en / usr / local / cuda / include todavía parece haber un problema. realmente creo que habilitar el cudNN = 1 en Makefile.config

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

ahí es donde está el problema ¿Qué son exactamente estos errores?

./include/caffe/util/cudnn.hpp:65:5: error: expected primary-expression before ‘int’ int n, int c, int h, int w, ^ ./include/caffe/util/cudnn.hpp:65:12: error: expected primary-expression before ‘int’ int n, int c, int h, int w, ^ ./include/caffe/util/cudnn.hpp:65:19: error: expected primary-expression before ‘int’ int n, int c, int h, int w, ^ ./include/caffe/util/cudnn.hpp:65:26: error: expected primary-expression before ‘int’ int n, int c, int h, int w, ^ ./include/caffe/util/cudnn.hpp:66:5: error: expected primary-expression before ‘int’ int stride_n, int stride_c, int stride_h, int stride_w) { ^ ./include/caffe/util/cudnn.hpp:66:19: error: expected primary-expression before ‘int’ int stride_n, int stride_c, int stride_h, int stride_w) { ^ ./include/caffe/util/cudnn.hpp:66:33: error: expected primary-expression before ‘int’ int stride_n, int stride_c, int stride_h, int stride_w) { ^ ./include/caffe/util/cudnn.hpp:66:47: error: expected primary-expression before ‘int’ int stride_n, int stride_c, int stride_h, int stride_w) { ^ ./include/caffe/util/cudnn.hpp:72:29: error: variable or field ‘setTensor4dDesc’ declared void inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc, ^ ./include/caffe/util/cudnn.hpp:72:29: error: ‘cudnnTensor4dDescriptor_t’ was not declared in this scope ./include/caffe/util/cudnn.hpp:72:56: error: ‘desc’ was not declared in this scope inline void setTensor4dDesc(cudnnTensor4dDescriptor_t* desc, ^ ./include/caffe/util/cudnn.hpp:73:5: error: expected primary-expression before ‘int’ int n, int c, int h, int w) { ^ ./include/caffe/util/cudnn.hpp:73:12: error: expected primary-expression before ‘int’ int n, int c, int h, int w) { ^ ./include/caffe/util/cudnn.hpp:73:19: error: expected primary-expression before ‘int’ int n, int c, int h, int w) { ^ ./include/caffe/util/cudnn.hpp:73:26: error: expected primary-expression before ‘int’ int n, int c, int h, int w) { ^ ./include/caffe/util/cudnn.hpp:97:5: error: ‘cudnnTensor4dDescriptor_t’ has not been declared cudnnTensor4dDescriptor_t bottom, cudnnFilterDescriptor_t filter, ^ ./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::setConvolutionDesc(cudnnConvolutionStruct**, int, cudnnFilterDescriptor_t, int, int, int, int)’: ./include/caffe/util/cudnn.hpp:100:70: error: there are no arguments to ‘cudnnSetConvolutionDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetConvolutionDescriptor’ must be available [-fpermissive] pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION)); ^ ./include/caffe/util/cudnn.hpp:11:28: note: in definition of macro ‘CUDNN_CHECK’ cudnnStatus_t status = condition; / ^ ./include/caffe/util/cudnn.hpp:100:70: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) pad_h, pad_w, stride_h, stride_w, 1, 1, CUDNN_CROSS_CORRELATION)); ^ ./include/caffe/util/cudnn.hpp:11:28: note: in definition of macro ‘CUDNN_CHECK’ cudnnStatus_t status = condition; / ^ ./include/caffe/util/cudnn.hpp: In function ‘void caffe::cudnn::createPoolingDesc(cudnnPoolingStruct**, caffe::PoolingParameter_PoolMethod, cudnnPoolingMode_t*, int, int, int, int)’: ./include/caffe/util/cudnn.hpp:119:27: error: there are no arguments to ‘cudnnSetPoolingDescriptor’ that depend on a template parameter, so a declaration of ‘cudnnSetPoolingDescriptor’ must be available [-fpermissive] stride_h, stride_w)); ^ ./include/caffe/util/cudnn.hpp:11:28: note: in definition of macro ‘CUDNN_CHECK’ cudnnStatus_t status = condition; / ^ make: *** [.build_release/src/caffe/syncedmem.o] Error 1

Probé la muestra CUDA y la GPU funciona bien con cuda. Aquí está el resultado ...

root@pbu-OptiPlex-740-Enhanced:/home/pbu/NVIDIA_CUDA-6.5_Samples/0_Simple/matrixMul# ./matrixMul [Matrix Multiply Using CUDA] - Starting... GPU Device 0: "GeForce GTX 750 Ti" with compute capability 5.0 MatrixA(320,320), MatrixB(640,320) Computing result using CUDA Kernel... done Performance= 157.82 GFlop/s, Time= 0.831 msec, Size= 131072000 Ops, WorkgroupSize= 1024 threads/block Checking computed result for correctness: Result = PASS Note: For peak performance, please refer to the matrixMulCUBLAS example.


Descargué cuDNN R1 y ahora está funcionando. Parece cudNN R2 el último no es compatible con caffe.


Una versión de Caffe que funciona con cuDNNv2 está disponible en la página github de S. Layton .

Su rama maestra Caffe trabaja con cuDNNv2. Puedes descargarlo de la página de github.

Hizo una solicitud de extracción al Caffe github oficial y la discusión completa está disponible aquí si desea los detalles.