Skip to content

HAL: aligned behavior of normDiff 32s kernels in hal_rvv in 4.x#27249

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
fengyuentau:4x/hal_rvv/bugfix-norm2-int
Apr 22, 2025
Merged

HAL: aligned behavior of normDiff 32s kernels in hal_rvv in 4.x#27249
asmorkalov merged 1 commit intoopencv:4.xfrom
fengyuentau:4x/hal_rvv/bugfix-norm2-int

Conversation

@fengyuentau
Copy link
Copy Markdown
Member

@fengyuentau fengyuentau commented Apr 22, 2025

This patch is intended for 4.x to fix sanity checks in performance testings.

Do not port to 5.x.

Reproducer:

  1. Build latest 4.x.
  2. Run on QEMU or SpaceMIT K1:
export OPENCV_TEST_DATA_PATH=/path/to/opencv_extra/test_data
./opencv_perf_core --gtest_filter="*norm2*" --perf_force_samples=1

Issue:

Details
[  FAILED  ] 32 tests, listed below:
[  FAILED  ] Size_MatType_NormType_norm2.norm2/30, where GetParam() = (640x480, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/31, where GetParam() = (640x480, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/33, where GetParam() = (640x480, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/34, where GetParam() = (640x480, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/78, where GetParam() = (1280x720, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/79, where GetParam() = (1280x720, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/81, where GetParam() = (1280x720, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/82, where GetParam() = (1280x720, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/126, where GetParam() = (1920x1080, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/127, where GetParam() = (1920x1080, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/129, where GetParam() = (1920x1080, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/130, where GetParam() = (1920x1080, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/174, where GetParam() = (127x61, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/175, where GetParam() = (127x61, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/177, where GetParam() = (127x61, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2.norm2/178, where GetParam() = (127x61, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/30, where GetParam() = (640x480, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/31, where GetParam() = (640x480, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/33, where GetParam() = (640x480, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/34, where GetParam() = (640x480, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/78, where GetParam() = (1280x720, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/79, where GetParam() = (1280x720, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/81, where GetParam() = (1280x720, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/82, where GetParam() = (1280x720, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/126, where GetParam() = (1920x1080, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/127, where GetParam() = (1920x1080, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/129, where GetParam() = (1920x1080, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/130, where GetParam() = (1920x1080, 32SC1, NORM_L1|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/174, where GetParam() = (127x61, 32SC1, NORM_INF)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/175, where GetParam() = (127x61, 32SC1, NORM_L1)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/177, where GetParam() = (127x61, 32SC1, NORM_INF|NORM_RELATIVE)
[  FAILED  ] Size_MatType_NormType_norm2_mask.norm2_mask/178, where GetParam() = (127x61, 32SC1, NORM_L1|NORM_RELATIVE)

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

@fengyuentau fengyuentau added this to the 4.12.0 milestone Apr 22, 2025
@fengyuentau fengyuentau requested a review from asmorkalov April 22, 2025 07:01
@asmorkalov asmorkalov self-assigned this Apr 22, 2025
@asmorkalov
Copy link
Copy Markdown
Contributor

Tested manually with MusePi v30.

@asmorkalov asmorkalov merged commit cd5a636 into opencv:4.x Apr 22, 2025
27 of 28 checks passed
@fengyuentau fengyuentau deleted the 4x/hal_rvv/bugfix-norm2-int branch April 22, 2025 08:03
@asmorkalov asmorkalov mentioned this pull request Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants