Relax accuracy requirement on OpenCL MinEigenVal corner kernel test.#19793
Merged
opencv-pushbot merged 1 commit intoopencv:3.4from Mar 29, 2021
Merged
Conversation
alalek
approved these changes
Mar 26, 2021
alalek
reviewed
Mar 26, 2021
| OCL_ON(cv::cornerMinEigenVal(usrc_roi, udst_roi, blockSize, apertureSize, borderType)); | ||
|
|
||
| Near(1e-5, true); | ||
| Near(0.1, true); |
Member
There was a problem hiding this comment.
Is it possible to add here some check to detect your platform / OpenCL device?
I would prefer to keep original check threshold for x86 platform.
Contributor
Author
There was a problem hiding this comment.
I was thinking to base the tests on the OpenCL spec rather than a specific implementation
Member
There was a problem hiding this comment.
Not sure about what do you mean.
Does this work for you?
if (ocl::Device::getDefault().isIntel())
Near(1e-5, true);
else
Near(0.1, true); // using native_* OpenCV functions may loose accuracy
Contributor
Author
There was a problem hiding this comment.
Yeah that works, I'll change it to be like that
The MinEigenVal path through the corner.cl kernel makes use of native_sqrt, a math builtin function which has implementation defined accuracy. Partially addresses issue opencv#9821
94a0cfa to
53652a6
Compare
This was referenced Apr 1, 2021
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MinEigenVal path through the corner.cl kernel makes use of native_sqrt,
a math builtin function which has implementation defined accuracy.
Partially addresses issue #9821
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.