Ask Your Question
0

CUDA backend for DNN module requires CC 5.3 or higher

asked 2019-11-29 05:17:42 -0600

Vytau gravatar image

I have GeForce GTX 970 (guess that's 5.2 architecture). Does this mean I cannot compile opencv with CUDA support?

edit retag flag offensive close merge delete

Comments

You can compile OpenCV with CUDA support.You will have to disable the CUDA backend in the DNN module by unmarking OPENCV_DNN_CUDA in CMake.

Yashas gravatar imageYashas ( 2019-12-02 05:56:44 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2019-11-29 06:03:06 -0600

updated 2019-12-04 07:24:03 -0600

You can compile with CUDA support by including -DCUDA_ARCH_BIN=X with X>=5.3, however you won't be able to run the resulting DNN CUDA binary unless your card has compute capability X.

It looks like it relies on half precision (I thought this was CC 6.0 and above), see this post by the author.

edit flag offensive delete link more

Comments

It's 5.3 according to this table.

Yashas gravatar imageYashas ( 2019-12-21 07:53:07 -0600 )edit

Thank you for the link. Does that mean that CUDA DNN inference is all performed in half precision?

cudawarped gravatar imagecudawarped ( 2019-12-22 04:41:40 -0600 )edit

@cudawarped No, it provides both options separately. There is an open PR which makes half-precision optional so that it can build on older GPUs.

Yashas gravatar imageYashas ( 2019-12-22 05:51:24 -0600 )edit

That's great, thank you for all your work on this, I look forward to experimenting with this next week.

cudawarped gravatar imagecudawarped ( 2019-12-22 08:50:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-11-29 05:17:42 -0600

Seen: 1,937 times

Last updated: Dec 04 '19