# cuDNN Test did not pass

**URL:** <https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675>\
**Category:** cuDNN\
**Created:** [October 30, 2017, 9:13pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675 "2017-10-30T21:13:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter\_cz](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@peter\_cz](https://forums.developer.nvidia.com/u/peter_cz)\
**Post date:** [October 30, 2017, 9:13pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/1 "2017-10-30T21:13:18Z")

</div>

Hi All,

I followed the installation guide to install cuDNN but I end up with

```auto
ubuntu@ubuntu:~/cudnn_samples_v7/mnistCUDNN$ make clean && make
rm -rf *o
rm -rf mnistCUDNN
/usr/local/cuda/bin/nvcc -ccbin g++ -I/usr/local/cuda/include -IFreeImage/include -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o fp16_dev.o -c fp16_dev.cu
g++ -I/usr/local/cuda/include -IFreeImage/include -o fp16_emu.o -c fp16_emu.cpp
g++ -I/usr/local/cuda/include -IFreeImage/include -o mnistCUDNN.o -c mnistCUDNN.cpp
In file included from /usr/local/cuda/include/channel_descriptor.h:62:0,
                 from /usr/local/cuda/include/cuda_runtime.h:90,
                 from /usr/include/cudnn.h:64,
                 from mnistCUDNN.cpp:30:
/usr/local/cuda/include/cuda_runtime_api.h:1683:101: error: use of enum ‘cudaDeviceP2PAttr’ without previous declaration
 extern __host__  __cudart_builtin__ cudaError_t CUDARTAPI cudaDeviceGetP2PAttribute(int *value, enum cudaDeviceP2PAttr attr, int srcDevice, int dstDevice);
                                                                                                     ^
/usr/local/cuda/include/cuda_runtime_api.h:2930:102: error: use of enum ‘cudaFuncAttribute’ without previous declaration
 extern __host__  __cudart_builtin__ cudaError_t CUDARTAPI cudaFuncSetAttribute(const void *func, enum cudaFuncAttribute attr, int value);
                                                                                                      ^
In file included from /usr/local/cuda/include/channel_descriptor.h:62:0,
                 from /usr/local/cuda/include/cuda_runtime.h:90,
                 from /usr/include/cudnn.h:64,
                 from mnistCUDNN.cpp:30:
/usr/local/cuda/include/cuda_runtime_api.h:5770:92: error: use of enum ‘cudaMemoryAdvise’ without previous declaration
 extern __host__ cudaError_t CUDARTAPI cudaMemAdvise(const void *devPtr, size_t count, enum cudaMemoryAdvise advice, int device);
                                                                                            ^
/usr/local/cuda/include/cuda_runtime_api.h:5827:98: error: use of enum ‘cudaMemRangeAttribute’ without previous declaration
 extern __host__ cudaError_t CUDARTAPI cudaMemRangeGetAttribute(void *data, size_t dataSize, enum cudaMemRangeAttribute attribute, const void *devPtr, size_t count);
                                                                                                  ^
/usr/local/cuda/include/cuda_runtime_api.h:5864:102: error: use of enum ‘cudaMemRangeAttribute’ without previous declaration
 extern __host__ cudaError_t CUDARTAPI cudaMemRangeGetAttributes(void **data, size_t *dataSizes, enum cudaMemRangeAttribute *attributes, size_t numAttributes, const void *devPtr, size_t count);
                                                                                                      ^
Makefile:200: recipe for target 'mnistCUDNN.o' failed
make: *** [mnistCUDNN.o] Error 1

```

I have installed CUDA-9.0

```auto
ubuntu@ubuntu:~/NVIDIA_CUDA-9.0_Samples/bin/x86_64/linux/release$ ./deviceQuery
./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 560 Ti"
  CUDA Driver Version / Runtime Version 9.0 / 9.0
  CUDA Capability Major/Minor version number: 2.1
  Total amount of global memory: 957 MBytes (1003159552 bytes)
MapSMtoCores for SM 2.1 is undefined. Default to use 64 Cores/SM
MapSMtoCores for SM 2.1 is undefined. Default to use 64 Cores/SM
  ( 8) Multiprocessors, ( 64) CUDA Cores/MP: 512 CUDA Cores
  GPU Max Clock rate: 1645 MHz (1.64 GHz)
  Memory Clock rate: 2004 Mhz
  Memory Bus Width: 256-bit
  L2 Cache Size: 524288 bytes
  Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65535), 3D=(2048, 2048, 2048)
  Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
  Total amount of constant memory: 65536 bytes
  Total amount of shared memory per block: 49152 bytes
  Total number of registers available per block: 32768
  Warp size: 32
  Maximum number of threads per multiprocessor: 1536
  Maximum number of threads per block: 1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size (x,y,z): (65535, 65535, 65535)
  Maximum memory pitch: 2147483647 bytes
  Texture alignment: 512 bytes
  Concurrent copy and kernel execution: Yes with 1 copy engine(s)
  Run time limit on kernels: Yes
  Integrated GPU sharing Host Memory: No
  Support host page-locked memory mapping: Yes
  Alignment requirement for Surfaces: Yes
  Device has ECC support: Disabled
  Device supports Unified Addressing (UVA): Yes
  Supports Cooperative Kernel Launch: No
  Supports MultiDevice Co-op Kernel Launch: No
  Device PCI Domain ID / Bus ID / location ID: 0 / 3 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.0, CUDA Runtime Version = 9.0, NumDevs = 1
Result = PASS

```

---

<div class="post-metadata">

**Author:** ![peter\_cz](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@peter\_cz](https://forums.developer.nvidia.com/u/peter_cz)\
**Post date:** [October 31, 2017, 7:21am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/2 "2017-10-31T07:21:39Z")

</div>

I open the file:  
/usr/include/cudnn.h

And I changed the line:  
#include “driver\_types.h”

to:  
#include \<driver\_types.h\>

and now it can compile…

---

<div class="post-metadata">

**Author:** ![astrom](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@astrom](https://forums.developer.nvidia.com/u/astrom)\
**Post date:** [November 4, 2017, 12:47am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/3 "2017-11-04T00:47:35Z")

</div>

Thanks @peter_cz!

your solution worked for me as well.

Had the same issue, with 2 x 1080ti + CUDA 9 + cudnn 7

---

<div class="post-metadata">

**Author:** ![hannes.vasyura-bathke](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@hannes.vasyura-bathke](https://forums.developer.nvidia.com/u/hannes.vasyura-bathke)\
**Post date:** [November 4, 2017, 3:00pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/4 "2017-11-04T15:00:42Z")

</div>

Have the same issue here with CUDA9 + cudnn7 + GTX 1050ti

I would be very interested how such an error can happen undetected?

Also thx to @peter_cz your solution worked for me!

---

<div class="post-metadata">

**Author:** ![finlay.macrae](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/finlay.macrae/32/99345_2.png) [@finlay.macrae](https://forums.developer.nvidia.com/u/finlay.macrae)\
**Post date:** [January 10, 2018, 10:02pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/5 "2018-01-10T22:02:27Z")

</div>

Your fix worked for me too on cud-9.1 / cudnn7.0.5.15 when upgrading a Google Cloud instance.

Thanks a bunch, but you’d think nvidia would fix an obvious typo like this between releases.

---

<div class="post-metadata">

**Author:** ![guilhermelcs](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@guilhermelcs](https://forums.developer.nvidia.com/u/guilhermelcs)\
**Post date:** [February 5, 2018, 1:56am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/6 "2018-02-05T01:56:30Z")

</div>

@peter_cz your solution worked for me too on cuda-9.1 and cudnn7.0.5

---

<div class="post-metadata">

**Author:** ![waschbaer00](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@waschbaer00](https://forums.developer.nvidia.com/u/waschbaer00)\
**Post date:** [March 7, 2018, 7:43pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/7 "2018-03-07T19:43:19Z")

</div>

I have the same issue here. I have CUDA 9.1 + cuDNN 7.1 + GTX 1080 Ti + nvidia driver 387.34

Works too.

---

<div class="post-metadata">

**Author:** ![dotple0124](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dotple0124](https://forums.developer.nvidia.com/u/dotple0124)\
**Post date:** [March 18, 2018, 5:12pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/8 "2018-03-18T17:12:52Z")

</div>

Thanks. Works too.

I have CUDA 9.1 + cuDNN 7.1 + GTX 1050 Ti + nvidia driver 387.26 (included CUDA 9.1) + Ubuntu 16.04.4

---

<div class="post-metadata">

**Author:** ![jack-jubo](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jack-jubo](https://forums.developer.nvidia.com/u/jack-jubo)\
**Post date:** [March 22, 2018, 1:59pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/9 "2018-03-22T13:59:41Z")

</div>

That just solved my problem, bro! Thanks!

---

<div class="post-metadata">

**Author:** ![yudong.yu135](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yudong.yu135](https://forums.developer.nvidia.com/u/yudong.yu135)\
**Post date:** [March 25, 2018, 1:34am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/10 "2018-03-25T01:34:19Z")

</div>

Thanks a lot! It works!

---

<div class="post-metadata">

**Author:** ![joseph.townsend](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@joseph.townsend](https://forums.developer.nvidia.com/u/joseph.townsend)\
**Post date:** [April 12, 2018, 8:28am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/11 "2018-04-12T08:28:03Z")

</div>

This worked for me also, thanks.

---

<div class="post-metadata">

**Author:** ![podila.aditya](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@podila.aditya](https://forums.developer.nvidia.com/u/podila.aditya)\
**Post date:** [April 22, 2018, 5:59pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/12 "2018-04-22T17:59:09Z")

</div>

this works for me as well cuda 8 and cudnn7.1.3 , nvidia390 driver ,  
ubuntu 16.04 ryzen 1700x, 1070 8gb

---

<div class="post-metadata">

**Author:** ![srbn.ghosh99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@srbn.ghosh99](https://forums.developer.nvidia.com/u/srbn.ghosh99)\
**Post date:** [April 30, 2018, 2:44am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/13 "2018-04-30T02:44:08Z")

</div>

I am getting this error.

cudnnGetVersion() : 7103 , CUDNN\_VERSION from cudnn.h : 7103 (7.1.3)  
Cuda failurer version : GCC 5.4.0  
Error: unknown error  
error\_util.h:93  
Aborting…

---

<div class="post-metadata">

**Author:** ![surya.raj22](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@surya.raj22](https://forums.developer.nvidia.com/u/surya.raj22)\
**Post date:** [May 9, 2018, 4:10pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/14 "2018-05-09T16:10:08Z")

</div>

Thanks it worked for me.

---

<div class="post-metadata">

**Author:** ![jesus.coyotzi.18](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jesus.coyotzi.18](https://forums.developer.nvidia.com/u/jesus.coyotzi.18)\
**Post date:** [June 1, 2018, 4:29pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/15 "2018-06-01T16:29:15Z")

</div>

Same here cuda 9.1 cudnn 7.1.4 driver 390.30  
ubuntu 16.04 geforce gtx 1050

Suggested solution worked!

---

<div class="post-metadata">

**Author:** ![lucaslovercio](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lucaslovercio](https://forums.developer.nvidia.com/u/lucaslovercio)\
**Post date:** [June 9, 2018, 7:24pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/16 "2018-06-09T19:24:02Z")

</div>

I think that updating gcc and g++ to version 6 fix this error

---

<div class="post-metadata">

**Author:** ![awangenh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/awangenh/32/28226_2.png) [@awangenh](https://forums.developer.nvidia.com/u/awangenh)\
**Post date:** [September 2, 2018, 2:35pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/17 "2018-09-02T14:35:43Z")

</div>

CUDA 9.2, cudnn 7.2 ubuntu 16.04 geforce gtx 1050  
Suggested solution worked!  
Why is this still bugged???

---

<div class="post-metadata">

**Author:** ![soylis.k](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@soylis.k](https://forums.developer.nvidia.com/u/soylis.k)\
**Post date:** [November 29, 2018, 1:09am UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/18 "2018-11-29T01:09:14Z")

</div>

This worked for me also using ubuntu18.04 cuda10.0 cudnn7.4.1.5

---

<div class="post-metadata">

**Author:** ![orong13](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@orong13](https://forums.developer.nvidia.com/u/orong13)\
**Post date:** [December 2, 2018, 12:46pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/19 "2018-12-02T12:46:23Z")

</div>

Same with cuda 9.0 and cudnn 7.3.1.  
The solution works for me also!

---

<div class="post-metadata">

**Author:** ![kulpsin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kulpsin](https://forums.developer.nvidia.com/u/kulpsin)\
**Post date:** [December 3, 2018, 5:31pm UTC](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675/20 "2018-12-03T17:31:50Z")

</div>

Thanks a lot, fix still works for Cuda 10.0 and cuDNN 7.4.1.5. Using Ubuntu 18.04.

Didn’t test with any other compiler than default c++ 7.3

[Next page](https://forums.developer.nvidia.com/t/cudnn-test-did-not-pass/54675.md?page=2)
