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.59k stars 3.38k forks source link

CUDA exception in "wait_for_transfer_to_finish()" #1711

Closed mgilge closed 5 years ago

mgilge commented 5 years ago

Hi Davis, I am having an issue with "wait_for_transfer_to_finish()" in gpu_data.cpp, which is timing out. Does dlib need to be the exclusive user of CUDA? Is there a way to restrict dlib to 1 of my 2 multiprocessors?

There is a restriction for CUDA in Jetson:

Concurrent access is not supported on Jetson. That means you need to follow below rule or a bus error/segmentation fault will occur. process_1 > Sync > process_2 > sync > process_1 > ...

BR Michael

Version: dlib 19.17 Platform: NVIDIA Jetson TX2 Toolchain: gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

davisking commented 5 years ago

Dlib does not need any special access to the GPU. You control which GPUs dlib uses just as you would any CUDA code, by calling cudaSetDevice or using the CUDA_VISIBLE_DEVICES environment variable.

mgilge commented 5 years ago

If dlib is configured to use CUDA, in your example dnn_face_recognition_ex.cpp does the pose detector full_object_detection shape = sp(cimg, r); actually use CUDA or is the call to the neural net the only user of CUDA?

davisking commented 5 years ago

Only the neural network stuff uses cuda.

mgilge commented 5 years ago

Hi Davis, is there a possibility to accelerate the neural network using NEON on ARM platforms lacking CUDA?

Am 03.04.2019 um 16:06 schrieb Davis E. King notifications@github.com:

Only the neural network stuff uses cuda. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

davisking commented 5 years ago

That’s not a current dlib feature.

dlib-issue-bot commented 5 years ago

Warning: this issue has been inactive for 35 days and will be automatically closed on 2019-05-25 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.

dlib-issue-bot commented 5 years ago

Warning: this issue has been inactive for 43 days and will be automatically closed on 2019-05-25 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.

dlib-issue-bot commented 5 years ago

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.