Dlib: Running dlib with cuda support.

Created on 25 Oct 2017  路  6Comments  路  Source: davisking/dlib

How do I enable dlib with cuda support? I installed dlib through pip. Thank you!

inactive

Most helpful comment

@smitshilu ,
Help!
First, thank you for your post.
I looked all over for the install with CUDA command

I got the build files written.
I ran 'make'
I ran 'sudo make install'
But I'm not sure my application using dlib is running on the GPU. Actually, mostly sure it's not.
When I run 'nvidia-smi' while my process is running it displays that the GPU is NOT being used by the process.

Are there other steps to take after the steps I took that I am missing?

All 6 comments

Try installing the latest dlib from github. It should print out more detailed messages about CUDA usage than the copy of dlib in pip. That will help you get it working with CUDA.

I tried installing dlib with cuda support but encountering OpenMP missing error while installing:

Operating System: Mac 10.11
Xcode(command line tools): 8.2.1

User:build User$ cmake .. -DOpenMP_C_FLAGS=-fopenmp -DDLIB_USE_CUDA=1
-- Enabling AVX instructions
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
--   No package 'cblas' found
-- Checking for module 'lapack'
--   No package 'lapack' found
-- Found OpenBLAS library
-- Found LAPACK library
-- Looking for cuDNN install...
-- Found cuDNN: /usr/local/cuda/lib/libcudnn.dylib
-- Could NOT find OpenMP_C (missing: OpenMP_C_LIB_NAMES) (found version "1.0")
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) (found version "1.0")
-- *** Didn't find OpenMP, which is required to use CUDA. ***
-- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
-- Building a C++11 test project to see if your compiler supports C++11
-- C++11 activated.
-- Building a C++11 test project to see if your compiler supports C++11
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/smitshilu/DevelopmentGit/dlib-compile/build

I fixed this exact error by running
brew install llvm

Apparently OpenMP is installed alongside llvm.

@smitshilu ,
Help!
First, thank you for your post.
I looked all over for the install with CUDA command

I got the build files written.
I ran 'make'
I ran 'sudo make install'
But I'm not sure my application using dlib is running on the GPU. Actually, mostly sure it's not.
When I run 'nvidia-smi' while my process is running it displays that the GPU is NOT being used by the process.

Are there other steps to take after the steps I took that I am missing?

Warning: this issue has been inactive for 215 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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

srikanthreddybethi picture srikanthreddybethi  路  4Comments

alison-carrera-pegasus picture alison-carrera-pegasus  路  3Comments

lvella picture lvella  路  4Comments

maromcik picture maromcik  路  4Comments

jackweiwang picture jackweiwang  路  4Comments