Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dnn cann backend: add hardswish, layernorm and instasnce norm for cann and bug fix#24462

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vpisarev merged 10 commits intoopencv:4.xfromfengyuentau:cann_support_hardswish
Nov 15, 2023

Conversation

@fengyuentau
Copy link
Member

@fengyuentaufengyuentau commentedOct 27, 2023
edited
Loading

Resolves#24154
Resolvesopencv/ci-gha-workflow#120 (comment)

New CANN operator added in this PR:

Pull Request Readiness Checklist

See details athttps://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

@fengyuentaufengyuentau added the category:dnn_cannCANN backend related issues in DNN module labelOct 27, 2023
@fengyuentaufengyuentau added this to the4.9.0 milestoneOct 27, 2023
@fengyuentau
Copy link
MemberAuthor

Will finalize this PR after the merge of#24409.

@fengyuentaufengyuentau mentioned this pull requestNov 3, 2023
12 tasks
asmorkalov pushed a commit that referenced this pull requestNov 7, 2023
dnn onnx: add instance norm layer#24378Resolves#24377Relates#24092 (comment)| Perf | multi-thread | single-thread || - | - | - || x: [2, 64, 180, 240] | 3.95ms | 11.12ms |Todo:- [x] speed up by multi-threading- [x] add perf- [x] add backend: OpenVINO- [x] add backend: CUDA- [x] add backend: OpenCL (no fp16)- [ ] add backend: CANN (will be done via#24462)### Pull Request Readiness ChecklistSee details athttps://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```force_builders=Linux OpenCL,Win64 OpenCL,Custombuildworker:Custom=linux-4build_image:Custom=ubuntu:18.04modules_filter:Custom=nonedisable_ipp:Custom=ON```
@fengyuentau
Copy link
MemberAuthor

Will test this PR next week.

asmorkalov reacted with thumbs up emoji

@fengyuentaufengyuentau marked this pull request as ready for reviewNovember 10, 2023 11:02
@fengyuentau
Copy link
MemberAuthor

fengyuentau commentedNov 13, 2023
edited
Loading

Tests on Hardswish and LayerNormalization are passed with threshold 1e-3. However, due to the 1D mat shape problem, LayerNormalization with axis=-1 on CANN backend produces incorrect results, and InstanceNormalization on CANN backend leads to incorrect shape inference when building graph. So they are turned off for CANN backend for now.

I think this PR can be merged and we leave the 1d mat shape problem to the future.

@fengyuentaufengyuentau changed the titlednn cann backend: add hardswish for cann and bug fixdnn cann backend: add hardswish, layernorm and instasnce norm for cann and bug fixNov 15, 2023
@vpisarevvpisarev merged commit024dfd5 intoopencv:4.xNov 15, 2023
@fengyuentaufengyuentau deleted the cann_support_hardswish branchNovember 15, 2023 15:07
@jimmylaw21jimmylaw21 mentioned this pull requestDec 17, 2023
12 tasks
IskXCr pushed a commit to Haosonn/opencv that referenced this pull requestDec 20, 2023
dnn onnx: add instance norm layeropencv#24378Resolvesopencv#24377Relatesopencv#24092 (comment)| Perf | multi-thread | single-thread || - | - | - || x: [2, 64, 180, 240] | 3.95ms | 11.12ms |Todo:- [x] speed up by multi-threading- [x] add perf- [x] add backend: OpenVINO- [x] add backend: CUDA- [x] add backend: OpenCL (no fp16)- [ ] add backend: CANN (will be done viaopencv#24462)### Pull Request Readiness ChecklistSee details athttps://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```force_builders=Linux OpenCL,Win64 OpenCL,Custombuildworker:Custom=linux-4build_image:Custom=ubuntu:18.04modules_filter:Custom=nonedisable_ipp:Custom=ON```
IskXCr pushed a commit to Haosonn/opencv that referenced this pull requestDec 20, 2023
…n and bug fix (opencv#24462)* add hardswish for cann* gemm cann bug fix* fix indentation* cann: add layer norm* cann: add instance norm* add supportBackend* cann: layer norm does not support axis=-1 due to 1d mat issue* disable instance norm for now* fix doc* remove tensor desc initialization for 1D tensor
thewoz pushed a commit to thewoz/opencv that referenced this pull requestJan 4, 2024
dnn onnx: add instance norm layeropencv#24378Resolvesopencv#24377Relatesopencv#24092 (comment)| Perf | multi-thread | single-thread || - | - | - || x: [2, 64, 180, 240] | 3.95ms | 11.12ms |Todo:- [x] speed up by multi-threading- [x] add perf- [x] add backend: OpenVINO- [x] add backend: CUDA- [x] add backend: OpenCL (no fp16)- [ ] add backend: CANN (will be done viaopencv#24462)### Pull Request Readiness ChecklistSee details athttps://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```force_builders=Linux OpenCL,Win64 OpenCL,Custombuildworker:Custom=linux-4build_image:Custom=ubuntu:18.04modules_filter:Custom=nonedisable_ipp:Custom=ON```
thewoz pushed a commit to thewoz/opencv that referenced this pull requestJan 4, 2024
…n and bug fix (opencv#24462)* add hardswish for cann* gemm cann bug fix* fix indentation* cann: add layer norm* cann: add instance norm* add supportBackend* cann: layer norm does not support axis=-1 due to 1d mat issue* disable instance norm for now* fix doc* remove tensor desc initialization for 1D tensor
@asmorkalovasmorkalov mentioned this pull requestJan 19, 2024
thewoz pushed a commit to thewoz/opencv that referenced this pull requestMay 29, 2024
dnn onnx: add instance norm layeropencv#24378Resolvesopencv#24377Relatesopencv#24092 (comment)| Perf | multi-thread | single-thread || - | - | - || x: [2, 64, 180, 240] | 3.95ms | 11.12ms |Todo:- [x] speed up by multi-threading- [x] add perf- [x] add backend: OpenVINO- [x] add backend: CUDA- [x] add backend: OpenCL (no fp16)- [ ] add backend: CANN (will be done viaopencv#24462)### Pull Request Readiness ChecklistSee details athttps://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```force_builders=Linux OpenCL,Win64 OpenCL,Custombuildworker:Custom=linux-4build_image:Custom=ubuntu:18.04modules_filter:Custom=nonedisable_ipp:Custom=ON```
thewoz pushed a commit to thewoz/opencv that referenced this pull requestMay 29, 2024
…n and bug fix (opencv#24462)* add hardswish for cann* gemm cann bug fix* fix indentation* cann: add layer norm* cann: add instance norm* add supportBackend* cann: layer norm does not support axis=-1 due to 1d mat issue* disable instance norm for now* fix doc* remove tensor desc initialization for 1D tensor
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vpisarevvpisarevvpisarev approved these changes

Assignees

@vpisarevvpisarev

Labels

bugcategory:dnn_cannCANN backend related issues in DNN modulefeature

Projects

None yet

Milestone

4.9.0

Development

Successfully merging this pull request may close these issues.

HardSwish is not supported by CANN backend

2 participants

@fengyuentau@vpisarev

[8]ページ先頭

©2009-2025 Movatter.jp