Ask Your Question
0

How to use cuDNN from OpenCV?

asked 2019-10-01 18:50:40 -0600

I've successfully compiled OpenCV 4.1.1 with CUDA and cuDNN from sources.

For CUDA I see the corresponding module.

But what about cuDNN? How can I use it from OpenCV/Python ?

I found only one mention of cuDNN at opencv repository.

How OpenCV does use cuDNN?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-10-02 06:17:46 -0600

Hi, unless I am mistaken it looks like the changes required to use cuDNN have not yet been merged into the main branch so you would need to build from the fork, more information can be found here.

Regarding python, I am not sure if the cuDNN options to access the DNN module are fully exposed to the python bindings in the fork but python bindings for the standard CUDA functions have been available since Aug 2018. Examples of most of the API calls are in test_cuda.py, for a full example see Accelerating OpenCV with CUDA streams in python.

edit flag offensive delete link more

Comments

Thank you for the answer. The article is especially useful and interesting.

eugene1 gravatar imageeugene1 ( 2019-10-02 09:30:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-10-01 18:50:40 -0600

Seen: 1,611 times

Last updated: Oct 02 '19