Skip to content

dnn: Support more operators in CANN backend#23401

Merged
asmorkalov merged 7 commits intoopencv:4.xfrom
fengyuentau:fix_cann_layer_support
Apr 20, 2023
Merged

dnn: Support more operators in CANN backend#23401
asmorkalov merged 7 commits intoopencv:4.xfrom
fengyuentau:fix_cann_layer_support

Conversation

@fengyuentau
Copy link
Copy Markdown
Member

@fengyuentau fengyuentau commented Mar 24, 2023

This PR adds the support of following layers:

  • Sub
  • PRelu
  • DeConv
  • Also warn users if backend is switched back to default if some of the layers are not supported.
  • [Dropped] LSTM: some hacks (adding layers) were introduced which makes it even harder to build the graph for CANN backend.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@fengyuentau fengyuentau added feature category:dnn_cann CANN backend related issues in DNN module labels Mar 24, 2023
@fengyuentau fengyuentau changed the title Fix cann layer support dnn: Support more operators in CANN backend Mar 29, 2023
@fengyuentau fengyuentau requested a review from vpisarev March 29, 2023 07:49
@fengyuentau fengyuentau marked this pull request as ready for review March 29, 2023 07:49
@asmorkalov
Copy link
Copy Markdown
Contributor

Buildbot reports documentation warning:

/build/precommit_docs/4.x/opencv/modules/dnn/include/opencv2/dnn/dnn.hpp:353: warning: The following parameters of cv::dnn::Layer::initCann(const std::vector< Ptr< BackendWrapper > > &inputsWrapper, const std::vector< Ptr< BackendWrapper > > &outputsWrapper, const std::vector< Ptr< BackendNode > > &nodes) are not documented:

@fengyuentau
Copy link
Copy Markdown
Member Author

Buildbot reports documentation warning:

Thank you for the reminder. I will add the documentation in the next commit.

@fengyuentau
Copy link
Copy Markdown
Member Author

Buildbot reports documentation warning:

/build/precommit_docs/4.x/opencv/modules/dnn/include/opencv2/dnn/dnn.hpp:353: warning: The following parameters of cv::dnn::Layer::initCann(const std::vector< Ptr< BackendWrapper > > &inputsWrapper, const std::vector< Ptr< BackendWrapper > > &outputsWrapper, const std::vector< Ptr< BackendNode > > &nodes) are not documented:

Resolved.

@asmorkalov asmorkalov added this to the 4.8.0 milestone Apr 12, 2023
@asmorkalov asmorkalov merged commit 3c1fcd5 into opencv:4.x Apr 20, 2023
@asmorkalov asmorkalov mentioned this pull request May 31, 2023
@fengyuentau fengyuentau deleted the fix_cann_layer_support branch June 24, 2023 05:16
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
dnn: Support more operators in CANN backend opencv#23401

This PR adds the support of following layers:

- [x] Sub
- [x] PRelu
- [x] DeConv
- [x] Also warn users if backend is switched back to default if some of the layers are not supported.
- [ ] [Dropped] LSTM: some hacks (adding layers) were introduced which makes it even harder to build the graph for CANN backend.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
dnn: Support more operators in CANN backend opencv#23401

This PR adds the support of following layers:

- [x] Sub
- [x] PRelu
- [x] DeConv
- [x] Also warn users if backend is switched back to default if some of the layers are not supported.
- [ ] [Dropped] LSTM: some hacks (adding layers) were introduced which makes it even harder to build the graph for CANN backend.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:dnn_cann CANN backend related issues in DNN module feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants