davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.56k stars 3.38k forks source link

Nvidia Geforce GTX 750 Ti not supported by cuDNN? #1263

Closed Kinwong1103 closed 6 years ago

Kinwong1103 commented 6 years ago

Hi everyone, I've recently tried to install dlib library with Cuda 9.0 and cuDNN 7.1 installed on my computer. The installation went smoothly, however, I ran into an error in a python script saying that 'CUDNN_STATUS_ARCH_MISMATCH: Your GPU is too old and not supported by cuDNN' as shown below.

My Graphic Card is GeForce GTX 750 Ti 2GB with a Compute Capability of 5.0 according to https://developer.nvidia.com/cuda-gpus. It should be supported by Cuda in my own opinion. I've also tried to use the "CUDA_VISIBLE_DEVICES" command but it did not make any difference.

One interesting fact is that I tried to install dlib on a different computer using Nvidia Graphic Card Geforce GT 740M with a compute capability of 3.0 but it works perfectly.

I did a lot of Google Search in this few days and it seems that I am the only one with this problem. I am kind of desperate right now. Any help would be super appreciated. Thanks in advance :)

Expected Behavior

I expected the dlib library should utilize my graphic card without any error.

Current Behavior

Traceback (most recent call last): File "D:\face_recognition-master\examples\facerec_from_webcam_faster_withknn_cn_backgroundthread.py", line 128, in classifier = train("knn_examples/train", model_save_path="trained_knn_model.clf", n_neighbors=2) File "D:\face_recognition-master\examples\facerec_from_webcam_faster_withknn_cn_backgroundthread.py", line 91, in train X.append(face_recognition.face_encodings(image, known_face_locations=face_bounding_boxes)[0]) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition\api.py", line 199, in face_encodings return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\face_recognition\api.py", line 199, in return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] RuntimeError: Error while calling cudnnCreate(&handles[new_device_id]) in file C:\dlib-master\dlib\cuda\cudnn_dlibapi.cpp:104. code: 6, reason: CUDNN_STATUS_ARCH_MISMATCH: Your GPU is too old and not supported by cuDNN

nvidia-smi

davisking commented 6 years ago

No idea. It's not dlib that issues the error. It's coming from cuDNN, so I don't know what to tell you. Maybe that card really isn't supported.

Kinwong1103 commented 6 years ago

That's sad, is there anything i can do to bypass this error?

davisking commented 6 years ago

This GPU is pretty new. I bet you have just installed the wrong nvidia drivers or something like that. In any case, this has nothing to do with dlib. You have to setup your OS and nvidia/cuda drivers correctly.

Kinwong1103 commented 6 years ago

Thanks mate. I will try install the drivers again.

cftang0827 commented 6 years ago

I also used GTX750Ti and I installed CUDA9.0 with CuDnn 7 It worked for me. However, my platform is Ubuntu16.04, so maybe you could try it.

kaisark commented 6 years ago

Is Cuda9 officially supported? I am running into a build error with the examples...

"Could NOT find CUDA: Found unsuitable version "9.0", but required is exact"


(dl4cv) ubuntu@ip-172-31-0-76:\~/cviz/dlib/examples$ mkdir build; cd build; cmake .. -DUSE_AVX_INSTRUCTIONS=1; cmake --build . -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CMake version: 3.5.1 -- Compiling dlib version: 19.13.99 -- Enabling AVX instructions -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so -- Looking for png_create_read_struct -- Looking for png_create_read_struct - found -- Looking for jpeg_read_header -- Looking for jpeg_read_header - found -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for module 'cblas' -- No package 'cblas' found -- Checking for module 'lapack' -- Found lapack, version 0.2.18 -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void -- Check size of void - done -- Found OpenBLAS library -- Looking for sgetrf_single -- Looking for sgetrf_single - found -- Using OpenBLAS's built in LAPACK -- Looking for cblas_ddot -- Looking for cblasddot - found -- Looking for sgesv -- Looking for sgesv - not found -- Looking for sgesv -- Looking for sgesv_ - not found -- Found CUDA: /usr/local/cuda (found suitable version "9.0", minimum required is "7.5") -- Looking for cuDNN install... -- Found cuDNN: /usr/local/cuda/lib64/libcudnn.so -- Building a CUDA test project to see if your compiler is compatible with CUDA... -- Checking if you have the right version of cuDNN installed. -- Enabling CUDA support for dlib. DLIB WILL USE CUDA -- C++11 activated. CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find CUDA: Found unsuitable version "9.0", but required is exact version "8.0" (found /usr/local/cuda) Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args) /home/ubuntu/opencv/build/OpenCVConfig.cmake:86 (find_package) /home/ubuntu/opencv/build/OpenCVConfig.cmake:105 (find_host_package) CMakeLists.txt:149 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/ubuntu/cviz/dlib/examples/build/CMakeFiles/CMakeOutput.log". See also "/home/ubuntu/cviz/dlib/examples/build/CMakeFiles/CMakeError.log". make: *** No targets specified and no makefile found. Stop.

davisking commented 6 years ago

Yes. That version of cuda is supported. Also, read the error message you posted. It’s from opencv, not dlib.

dlib-issue-bot commented 6 years ago

Warning: this issue has been inactive for 74 days and will be automatically closed on 2018-09-07 if there is no further activity.

If you are waiting for a response but haven't received one it's likely your question is somehow inappropriate. E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search.

kaisark commented 6 years ago

@davisking Thanks. Looks like my opencv was compiled with CUDA 8 and I was pointing to CUDA 9 for the dlib build. I pointed back to 8 and resolved...

dlib-issue-bot commented 6 years ago

Warning: this issue has been inactive for 20 days and will be automatically closed on 2018-10-12 if there is no further activity.

If you are waiting for a response but haven't received one it's likely your question is somehow inappropriate. E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search.

dlib-issue-bot commented 6 years ago

Warning: this issue has been inactive for 28 days and will be automatically closed on 2018-10-12 if there is no further activity.

If you are waiting for a response but haven't received one it's likely your question is somehow inappropriate. E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search.

dlib-issue-bot commented 6 years ago

Warning: this issue has been inactive for 35 days and will be automatically closed on 2018-10-12 if there is no further activity.

If you are waiting for a response but haven't received one it's likely your question is somehow inappropriate. E.g. you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's documentation, or a Google search.

dlib-issue-bot commented 6 years ago

Notice: this issue has been closed because it has been inactive for 37 days. You may reopen this issue if it has been closed in error.