davisking/dlib

[Bug]: dlib.DLIB_USE_CUDA is true, but uses CPU inference

ingale726 opened this issue · 5 comments

What Operating System(s) are you seeing this problem on?

Linux (x86-64)

dlib version

19.24.99

Python version

3.9

Compiler

gcc 10.2.1

Expected Behavior

Load the dlib using the GPU and reason

Current Behavior

I installed the cuda version of dlib, but it uses CPU inference

Steps to Reproduce

I used the following statement to install dlib

git clone https://github.com/davisking/dlib.git
cd dlib
mkdir build
cd build
cmake .. -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1
cmake --build .
cd ..
python setup.py install --set USE_AVX_INSTRUCTIONS=yes --set DLIB_USE_CUDA=yes

test:
python import dlib print(dlib.DLIB_USE_CUDA) print(dlib.cuda.get_num_devices())
The result is true and 4

But when I used DLIB to detect faces, I found that it wasn't using Gpus, none of the Gpus were being used, and I had 4 cards

Anything else?

no

We need more details:

  • which detector are you using? dlib ships with two, but only one of them uses the GPU.
  • during the build, did you see the message DLIB WILL USE CUDA? If you didn't, there's something wrong with your CUDA installation.

We need more details:

  • which detector are you using? dlib ships with two, but only one of them uses the GPU.
  • during the build, did you see the message DLIB WILL USE CUDA? If you didn't, there's something wrong with your CUDA installation.

We need more details:

  • which detector are you using? dlib ships with two, but only one of them uses the GPU.
  • during the build, did you see the message DLIB WILL USE CUDA? If you didn't, there's something wrong with your CUDA installation.

I'm the second reason. It's been taken care of. Thank you

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

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

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

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

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