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

try to enable Winograd by default in FP32 mode and disable it by default in FP16 mode #24709

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

vpisarev
Copy link
Contributor

Hopefully, it will resolve regressions since 4.8.1 (see also #24587)

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

@zihaomu
Copy link
Member

zihaomu commented Dec 18, 2023

Hi @vpisarev, the default of useWinograd may not work. And I propose to add one more line code change like: https://github.com/opencv/opencv/pull/24587/files#r1403795553.

From:

useWinograd = params.get<bool>("use_winograd", true);

to

useWinograd = params.get<bool>("use_winograd", useWinograd);

So that, we could use the default of useWinograd to control the computation branch.

@vpisarev
Copy link
Contributor Author

Hi @vpisarev, the default of useWinograd may not work. And I propose to add one more line code change like: https://github.com/opencv/opencv/pull/24587/files#r1403795553.

From:

useWinograd = params.get<bool>("use_winograd", true);

to

useWinograd = params.get<bool>("use_winograd", useWinograd);

So that, we could use the default of useWinograd to control the computation branch.

done

Copy link
Member

@zihaomu zihaomu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@asmorkalov asmorkalov added optimization platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc labels Dec 18, 2023
@asmorkalov asmorkalov added this to the 4.9.0 milestone Dec 18, 2023
@asmorkalov asmorkalov self-assigned this Dec 22, 2023
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov merged commit 853e5df into opencv:4.x Dec 22, 2023
24 of 26 checks passed
@asmorkalov asmorkalov mentioned this pull request Jan 19, 2024
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Try to enable Winograd by default in FP32 mode and disable it by default in FP16 mode opencv#24709

Hopefully, it will resolve regressions since 4.8.1 (see also opencv#24587)

### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants