DNN: Let part of the operators in nary_eltwise support CUDA#22478
DNN: Let part of the operators in nary_eltwise support CUDA#22478asmorkalov merged 1 commit intoopencv:4.xfrom
Conversation
|
@WanliZhong Thanks for the contribution. Please enable related tests for CuDNN backend too. They are skipped for now. |
|
This work is incomplete, the input of different shapes cannot be handled yet. |
|
@WanliZhong Friendly reminder about tests. |
|
@fengyuentau @rogday please take a look. |
|
@WanliZhong The PR fails a lot of tests with CUDA. For example for my 1080 with CUDA 10.2 I see: In particular:
|
|
@WanliZhong friendly reminder. |
1 similar comment
|
@WanliZhong friendly reminder. |
|
Also please rebase your PR brunch to current 4.x. You'll get automated CuDNN branch testing with CI (new Github Actions job). |
|
OK, I will continue this PR tomorrow.
|
b78b76e to
00d75d6
Compare
|
I don't know if there is some way to get the shape of the input in |
| Ptr<BackendNode> initCUDA( | ||
| void *context_, | ||
| const std::vector<Ptr<BackendWrapper>>& inputs, | ||
| const std::vector<Ptr<BackendWrapper>>& outputs | ||
| ) override | ||
| { |
There was a problem hiding this comment.
I don't know if there is some way to get the shape of the input in supportBackend().
You can do this check in initCUDA. Take a look at CudaBackendWrapper, it should have the host mat and you can get the shape of input from the host mat.
There was a problem hiding this comment.
I do use it, but initCUDA is called after supportBackend so it doesn't fallback to the cpu backend.
0534d7a to
11d492b
Compare
|
Sorry for late updating. |
This PR lets
MAX,MIN,SUM,PRODUCTandDIVoperators without broadcast support CUDA.Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.