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/CUDA: Solve the bug of same shape broadcast with CUDA#23560

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
asmorkalov merged 1 commit intoopencv:4.xfromWanliZhong:eltwise_cuda_bug
May 16, 2023

Conversation

@WanliZhong
Copy link
Member

@WanliZhongWanliZhong commentedApr 28, 2023
edited
Loading

Merged after#23557

Fix yolo regression error mentioned ine3e1f70#commitcomment-110475963

After fix this bug, the brute force test mentioned in#23556 will all passed with CUDA. (different shape broadcast will fallback to cpu)

Test is added in PR#23557

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

peters reacted with thumbs up emoji
@WanliZhongWanliZhong added bug category: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contrib category: dnn labelsApr 28, 2023
@WanliZhongWanliZhong added this to the4.8.0 milestoneApr 28, 2023
@WanliZhong
Copy link
MemberAuthor

WanliZhong commentedApr 28, 2023
edited
Loading

@peters Hi, could you help to test if this pr will run yolov7-tiny correctly mentioned ine3e1f70#commitcomment-110475963? Thanks!

WanliZhong referenced this pull requestApr 28, 2023
DNN/CUDA: make 'abcd op 1b11' broadcast eltwise operator support cuda
@peters
Copy link
Contributor

@WanliZhong This PR fixes the yolov7-tiny inference problem. All tests are now green on our side! Thank you :)

WanliZhong and opencv-alalek reacted with thumbs up emoji

@WanliZhong
Copy link
MemberAuthor

@peters That's good! Thanks!

@zihaomuzihaomu added the pr: needs testNew functionality requires minimal tests set labelMay 5, 2023
Copy link
Member

@zihaomuzihaomu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM! 👍

@zihaomuzihaomu added test and removed pr: needs testNew functionality requires minimal tests set labelsMay 11, 2023
@WanliZhong
Copy link
MemberAuthor

Test results after merged PR#23557 and this PR
image

@opencv-alalek
Copy link
Contributor

Lets re-enable disabled tests. They are fine on CPU target and pass on CUDA target (but they are slow in the current implementation).

On CUDA target they could be skipped (if performance is critical) in this way:

    if (backendId == DNN_BACKEND_CUDA && ...optional conditionals to select skipped tests...)        applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA);

or

    if (backendId == DNN_BACKEND_CUDA && ...optional conditionals...)        applyTestTag(CV_TEST_TAG_VERYLONG);

To manually run "skipped" tests by tags add this option:--test_tag_enable=dnn_skip_cuda /--test_tag_force=dnn_skip_cuda (see#21088 discussions for details and#12783 for implementation)

@WanliZhong
Copy link
MemberAuthor

Thanks@opencv-alalek ! I will enable it.

opencv-alalek reacted with thumbs up emoji

@asmorkalov
Copy link
Contributor

@opencv-alalek All tests are green. Should I merge with enabled or disabled brute-force tets?

int target = get<1>(backend_target);

if (backend == DNN_BACKEND_CUDA && dim >4)
applyTestTag(CV_TEST_TAG_LONG);
Copy link
Contributor

@opencv-alalekopencv-alalekMay 16, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

BTW, Looks like no tests are skipped on CI.

CV_TEST_TAG_VERYLONG tests are skipped by default.
CV_TEST_TAG_LONG tests should be skipped on embedded platforms or coverage/valgrind build configurations (though extra parameter on CI).

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Longer than 5s but less than 20s, so it should use LONG tag

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ok, lets run all CUDA tests.

@asmorkalovasmorkalov merged commit59ca444 intoopencv:4.xMay 16, 2023
@WanliZhongWanliZhong deleted the eltwise_cuda_bug branchMay 16, 2023 12:33
@asmorkalovasmorkalov mentioned this pull requestMay 31, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@opencv-alalekopencv-alalekopencv-alalek approved these changes

@zihaomuzihaomuzihaomu approved these changes

@rogdayrogdayAwaiting requested review from rogday

Assignees

No one assigned

Labels

bugcategory: dnncategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribtest

Projects

None yet

Milestone

4.8.0

Development

Successfully merging this pull request may close these issues.

5 participants

@WanliZhong@peters@opencv-alalek@asmorkalov@zihaomu

[8]ページ先頭

©2009-2025 Movatter.jp