lltcggie / waifu2x-caffe

waifu2xのCaffe版
MIT License
8.07k stars 839 forks source link

1.2.0.3 breaks cuDNN (Windows 7 x64, Nvidia GTX 1060 6GB, deviceQuery.exe from CUDA Toolkit Result = PASS) #206

Open RadarNyan opened 4 years ago

RadarNyan commented 4 years ago

Both waifu2x-caffe 1.2.0.4 and 1.2.0.3 give me the same error:

---------------------------
Result
---------------------------
Input can not be converted by GPU

The CUDA driver may not have been installed. 

Please install the CUDA driver
---------------------------
OK   
---------------------------

I've tried to uninstall the driver completely (using DDU in safe mode) and install the driver comes with CUDA Toolkit 10.1 update 2, which is 426.00. deviceQuery.exe comes with CUDA Toolkit prints the following information:

deviceQuery.exe Starting...                                                                                                                

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

Detected 1 CUDA Capable device(s)                                                                                                          

Device 0: "GeForce GTX 1060 6GB"                                                                                                           
  CUDA Driver Version / Runtime Version          10.1 / 10.1                                                                               
  CUDA Capability Major/Minor version number:    6.1                                                                                       
  Total amount of global memory:                 6144 MBytes (6442450944 bytes)                                                            
  (10) Multiprocessors, (128) CUDA Cores/MP:     1280 CUDA Cores                                                                           
  GPU Max Clock rate:                            1734 MHz (1.73 GHz)                                                                       
  Memory Clock rate:                             4004 Mhz                                                                                  
  Memory Bus Width:                              192-bit                                                                                   
  L2 Cache Size:                                 1572864 bytes                                                                             
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)                                 
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers                                                                   
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers                                                            
  Total amount of constant memory:               zu bytes                                                                                  
  Total amount of shared memory per block:       zu bytes                                                                                  
  Total number of registers available per block: 65536                                                                                     
  Warp size:                                     32                                                                                        
  Maximum number of threads per multiprocessor:  2048                                                                                      
  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): (2147483647, 65535, 65535)                                                                 
  Maximum memory pitch:                          zu bytes                                                                                  
  Texture alignment:                             zu bytes                                                                                  
  Concurrent copy and kernel execution:          Yes with 2 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                                                                                  
  CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display Driver Model)                                                       
  Device supports Unified Addressing (UVA):      Yes                                                                                       
  Device supports Compute Preemption:            No                                                                                        
  Supports Cooperative Kernel Launch:            No                                                                                        
  Supports MultiDevice Co-op Kernel Launch:      No                                                                                        
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0                                                                                 
  Compute Mode:                                                                                                                            
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >                                              

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.1, CUDA Runtime Version = 10.1, NumDevs = 1, Device0 = GeForce GTX 1060 6GB    
Result = PASS

And bandwidthTest.exe from the same package runs without problem as well:

[CUDA Bandwidth Test] - Starting...
Running on...

 Device 0: GeForce GTX 1060 6GB
 Quick Mode

 Host to Device Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     6555.8

 Device to Host Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     6541.9

 Device to Device Bandwidth, 1 Device(s)
 PINNED Memory Transfers
   Transfer Size (Bytes)        Bandwidth(MB/s)
   33554432                     145785.9

Result = PASS

NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

I've also tried to get cuDNN for CUDA 10.1 and put it in the desired path, and have checked that system variable has CUDA_PATH set correctly.


Ok... I was too lazy before bed. After waking up today I downloaded version 1.2.0.2, and it worked. (It doesn't have cudnn64_7.dll included so I just copied cudnn64_8.dll from my Cuda Toolkit installation and renamed it, it worked just fine.)

So whatever breaks it, is with version 1.2.0.3. My best guess would be it's caused by the upgrading of CUDA Toolkit to 10.2.

What's the reason behind this upgrade? If it's not necessary I suggest stay on an older version as long as possible since newer version of CUDA Toolkit requires a newer version of Display Driver. Upgrading CUDA Toolkit to 10.2 would require driver version >= 440.33.

There're many reasons someone would like to stay on an older dirver, in my case it's for 3D Vision which nvidia removed after Release 418 branch, which limits my CUDA Toolkit version up to 10.1 Update 2. If it's not possible to stay on the old Toolkit, could you at least stay on 10.1 Update 2 instead of 10.2? Thanks.