Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnn: Support more operators in CANN backend #23401

Merged
merged 7 commits into from Apr 20, 2023

Conversation

fengyuentau
Copy link
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 marked this pull request as ready for review March 29, 2023 07:49
@asmorkalov
Copy link
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
Member Author

Buildbot reports documentation warning:

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

@fengyuentau
Copy link
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
19 checks passed
@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
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.

None yet

3 participants