dnn: cleanup of halide backend for 5.x#24231
Conversation
|
|
||
| testing::internal::ParamGenerator< tuple<Backend, Target> > dnnBackendsAndTargets( | ||
| bool withInferenceEngine = true, | ||
| bool withHalide = false, |
There was a problem hiding this comment.
Might break the tests. Can we just check for CV_Assert(!withHalide)?
There was a problem hiding this comment.
I can review every location where dnnBackendsAndTargets is used, and make changes if needed. Let me try.
There was a problem hiding this comment.
All dnnBackendsAndTargets called with parameters should be taken well care now.
There was a problem hiding this comment.
I can review every location
This is not one time activity.
In case of parameter change we need to review each of "(5.x) Merge 4.x" PRs.
It is much safer to rename this parameter to bool obsolete_withHalide = false.
There was a problem hiding this comment.
Again, fixing it here will not resolve merging 4.x->5.x issues (no errors would be raised in the most part of cases) which would lead to mistakes.
There was a problem hiding this comment.
So how about removing the parameter from 4.x like what we want to do with modules/dnn/test/test_halide_layers.cpp? Does this address your concern?
There was a problem hiding this comment.
So how do we do for this issue?
There was a problem hiding this comment.
Series of boolean parameters is anti-pattern, especially in form with optional default values.
Any obvious refactoring is dangerous here, especially in case of regular merges between branches.
It is much safer to rename this parameter to
bool obsolete_withHalide = false
There was a problem hiding this comment.
It is much safer to rename this parameter to bool obsolete_withHalide = false
Okay, I will do this. I guess we can safely remove this legacy once our main dev branch switches to 5.x, right?
|
@fengyuentau There are merge conflicts after 4.x->5.x merge. Please take a look. |
4797e80 to
51660b1
Compare
|
Thank you for the notification. Conflicts are resolved. |
|
Wait, I am doing the merge. Shouldn't we merge |
|
@fengyuentau, that would be great, please do. |
opencv-alalek
left a comment
There was a problem hiding this comment.
On tech meeting there were an agreement on these steps:
- on 4.x branch refactor modules/dnn/test/test_halide_layers.cpp to extract "generic layers tests"
- merge 4.x to 5.x
- update PR with halide drop from 5.x
Such backport is necessary to avoid future 4.x->5.x merge conflicts.
/cc @asmorkalov
Just submitted a pr for this #24283 |
dnn: merge tests from test_halide_layers to test_backends #24283 Context: #24231 (review) ### 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
|
Waiting for a 4.x -> 5.x merge containing #24283. |
|
@fengyuentau I merged 4x->5x and Halide related part has been merged. |
4a97f64 to
f64a11c
Compare
dnn: merge tests from test_halide_layers to test_backends opencv#24283 Context: opencv#24231 (review) ### 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
|
@dkurt @opencv-alalek Friendly reminder. |
| platform details. | ||
| - More than Halide: | ||
| - Kernels can be written in unconstrained platform-native code; | ||
| - Halide can serve as a backend (one of many). |
There was a problem hiding this comment.
Please keep this reference. Not related to Halide in dnn.
There was a problem hiding this comment.
BTW, @dmatveev, does G-API even support Halide? If not, only some statements are actual:
- Similar to Halide -- separates logic from
platform details.
- More than Halide:
- Kernels can be written in unconstrained platform-native code;
There was a problem hiding this comment.
I basically revert every gapi doc change about halide.
|
@opencv-alalek Please take a look again. |
dnn: merge tests from test_halide_layers to test_backends opencv#24283 Context: opencv#24231 (review) ### 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
dnn: merge tests from test_halide_layers to test_backends opencv#24283 Context: opencv#24231 (review) ### 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
Merge with opencv/opencv_extra#1092.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.