Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@eplankin
Copy link
Contributor

Please merge together with opencv/opencv_3rdparty#88
Supported IPP version was updated to IPP 2022.0.0 for Linux and Windows. 32-bit binaries are dropped since this release.

Previous update: #25935

@opencv-alalek opencv-alalek self-requested a review November 14, 2024 18:09
@opencv-alalek
Copy link
Contributor

Looks like there is regression in norm.
Catched by perf_core test:

[ RUN      ] Size_MatType_NormType_norm2.norm2/58, where GetParam() = (127x61, 8UC1, NORM_L1|NORM_RELATIVE)
 Expected: 
[0.6575438084615143]
 Actual:
[0.6194119943083294]
/home/ubuntu/opencv/modules/ts/src/ts_perf.cpp:580: Failure
Failed
  Relative difference (0.038131814153184895 of 3.945262850769086e-05 allowed) between argument "n" and expected value is greater than 1.0000000000000001e-05 in 1 points
params    = (127x61, 8UC1, NORM_L1|NORM_RELATIVE)
termination reason:  reached maximum number of iterations
bytesIn   =      15494
bytesOut  =          0
samples   =          1
outliers  =          0
frequency = 1000000000
min       =       3339 = 0.00ms
median    =       3339 = 0.00ms
gmean     =       3339 = 0.00ms
gstddev   = 0.00000000 = 0.00ms for 97% dispersion interval
mean      =       3339 = 0.00ms
stddev    =          0 = 0.00ms
[  FAILED  ] Size_MatType_NormType_norm2.norm2/58, where GetParam() = (127x61, 8UC1, NORM_L1|NORM_RELATIVE) (0 ms)

(both Linux / Windows)

Could you please take a look?

@eplankin
Copy link
Contributor Author

Looks like there is regression in norm. Catched by perf_core test:

[ RUN      ] Size_MatType_NormType_norm2.norm2/58, where GetParam() = (127x61, 8UC1, NORM_L1|NORM_RELATIVE)
 Expected: 
[0.6575438084615143]
 Actual:
[0.6194119943083294]
/home/ubuntu/opencv/modules/ts/src/ts_perf.cpp:580: Failure
Failed
  Relative difference (0.038131814153184895 of 3.945262850769086e-05 allowed) between argument "n" and expected value is greater than 1.0000000000000001e-05 in 1 points
params    = (127x61, 8UC1, NORM_L1|NORM_RELATIVE)
termination reason:  reached maximum number of iterations
bytesIn   =      15494
bytesOut  =          0
samples   =          1
outliers  =          0
frequency = 1000000000
min       =       3339 = 0.00ms
median    =       3339 = 0.00ms
gmean     =       3339 = 0.00ms
gstddev   = 0.00000000 = 0.00ms for 97% dispersion interval
mean      =       3339 = 0.00ms
stddev    =          0 = 0.00ms
[  FAILED  ] Size_MatType_NormType_norm2.norm2/58, where GetParam() = (127x61, 8UC1, NORM_L1|NORM_RELATIVE) (0 ms)

(both Linux / Windows)

Could you please take a look?

Yes, I'll take a look.


# Commit SHA in the opencv_3rdparty repo
set(IPPICV_COMMIT "7f55c0c26be418d494615afca15218566775c725")
set(IPPICV_COMMIT "d1cbea44d326eb0421fedcdd16de4630fd8c7ed0")

Choose a reason for hiding this comment

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

  • Shouldn't it be different for x86 and x86_64 as only x86_64 ICV packages are available since IPP 2022.0.0?

@asmorkalov
Copy link
Contributor

@eplankin Friendly reminder. We plan OpenCV 4.11 release this month. It'll be great to finish the PR this week.

@eplankin
Copy link
Contributor Author

@eplankin Friendly reminder. We plan OpenCV 4.11 release this month. It'll be great to finish the PR this week.

@asmorkalov It was confirmed that there is a bug in IPP, the fix will be available in the next release. Let's disable the call of IPP function until the next ICV update.

@asmorkalov
Copy link
Contributor

@opencv-alalek could you take a look again?

@opencv-alalek
Copy link
Contributor

Need to apply this patch to keep 32-bit archives usable as mentioned by @tizmajlo :

diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake
index 9bf90af11c..7bfcf66993 100644
--- a/3rdparty/ippicv/ippicv.cmake
+++ b/3rdparty/ippicv/ippicv.cmake
@@ -17,6 +17,7 @@ function(download_ippicv root_var)
       set(OPENCV_ICV_NAME "ippicv_2022.0.0_lnx_intel64_20240904_general.tgz")
       set(OPENCV_ICV_HASH "63717ee0f918ad72fb5a737992a206d1")
     else()
+      set(IPPICV_COMMIT "7f55c0c26be418d494615afca15218566775c725")
       set(OPENCV_ICV_NAME "ippicv_2021.12.0_lnx_ia32_20240425_general.tgz")
       set(OPENCV_ICV_HASH "85ffa2b9ed7802b93c23fa27b0097d36")
     endif()
@@ -27,6 +28,7 @@ function(download_ippicv root_var)
       set(OPENCV_ICV_NAME "ippicv_2022.0.0_win_intel64_20240904_general.zip")
       set(OPENCV_ICV_HASH "3a6eca7cc3bce7159eb1443c6fca4e31")
     else()
+      set(IPPICV_COMMIT "7f55c0c26be418d494615afca15218566775c725")
       set(OPENCV_ICV_NAME "ippicv_2021.12.0_win_ia32_20240425_general.zip")
       set(OPENCV_ICV_HASH "8b1d2a23957d57624d0de8f2a5cae5f1")
     endif()

Otherwise it triggers error (remove .cache/ippicv or get clear source repository) due to wrong commit:

-- IPPICV: Downloading ippicv_2021.12.0_win_ia32_20240425_general.zip from https://raw.githubusercontent.com/opencv/opencv_3rdparty/d1cbea44d326eb0421fedcdd16de4630fd8c7ed0/ippicv/ippicv_2021.12.0_win_ia32_20240425_general.zip
-- Try 1 failed
CMake Warning at cmake/OpenCVDownload.cmake:251 (message):
  IPPICV: Download failed: 22;"HTTP response code said error"

@opencv-alalek
Copy link
Contributor

@eplankin There are more cases with norm in OpenCL-related tests:

Linux OpenCL:

[ RUN      ] OCL_Arithm/Norm.NORM_INF_2args/4, where GetParam() = (CV_8U, Channels(3), false)
/build/precommit_opencl_linux/4.x/opencv/modules/core/test/ocl/test_arithm.cpp:1320: Failure
relativeError(cpuRes, gpuRes, 1e-6) evaluates to false, where
cpuRes evaluates to 0.98431372549019602
gpuRes evaluates to 0.98818897637795278
1e-6 evaluates to 9.9999999999999995e-07
Google Test trace:
/build/precommit_opencl_linux/4.x/opencv/modules/core/test/ocl/test_arithm.cpp:1311: NORM_RELATIVE
[ INFO:[email protected]] global ts.cpp:848 testTearDown Memory_usage (OpenCL): 5209 (base=400  current=4664)
[  FAILED  ] OCL_Arithm/Norm.NORM_INF_2args/4, where GetParam() = (CV_8U, Channels(3), false) (0 ms)
[ RUN      ] OCL_Arithm/Norm.NORM_INF_2args/5, where GetParam() = (CV_8U, Channels(3), true)
/build/precommit_opencl_linux/4.x/opencv/modules/core/test/ocl/test_arithm.cpp:1320: Failure
relativeError(cpuRes, gpuRes, 1e-6) evaluates to false, where
cpuRes evaluates to 0.98431372549019602
gpuRes evaluates to 0.98818897637795278
1e-6 evaluates to 9.9999999999999995e-07
Google Test trace:
/build/precommit_opencl_linux/4.x/opencv/modules/core/test/ocl/test_arithm.cpp:1311: NORM_RELATIVE
[ INFO:[email protected]] global ts.cpp:848 testTearDown Memory_usage (OpenCL): 618280 (base=400  current=559301)
[  FAILED  ] OCL_Arithm/Norm.NORM_INF_2args/5, where GetParam() = (CV_8U, Channels(3), true) (3 ms)

Windows OpenCL:

[ RUN      ] OCL_Arithm/Norm.NORM_INF_2args/4, where GetParam() = (CV_8U, Channels(3), false)
C:\build\precommit_opencl\4.x\opencv\modules\core\test\ocl\test_arithm.cpp(1320): error: relativeError(cpuRes, gpuRes, 1e-6) evaluates to false, where
cpuRes evaluates to 0.98431372549019602
gpuRes evaluates to 0.98818897637795278
1e-6 evaluates to 9.9999999999999995e-07
Google Test trace:
C:\build\precommit_opencl\4.x\opencv\modules\core\test\ocl\test_arithm.cpp(1311): NORM_RELATIVE
[ INFO:[email protected]] global ts.cpp:848 cvtest::testTearDown Memory_usage (OpenCL): 5209 (base=22056  current=26320)
[  FAILED  ] OCL_Arithm/Norm.NORM_INF_2args/4, where GetParam() = (CV_8U, Channels(3), false) (0 ms)
[ RUN      ] OCL_Arithm/Norm.NORM_INF_2args/5, where GetParam() = (CV_8U, Channels(3), true)
C:\build\precommit_opencl\4.x\opencv\modules\core\test\ocl\test_arithm.cpp(1320): error: relativeError(cpuRes, gpuRes, 1e-6) evaluates to false, where
cpuRes evaluates to 0.98431372549019602
gpuRes evaluates to 0.98818897637795278
1e-6 evaluates to 9.9999999999999995e-07
Google Test trace:
C:\build\precommit_opencl\4.x\opencv\modules\core\test\ocl\test_arithm.cpp(1311): NORM_RELATIVE
[ INFO:[email protected]] global ts.cpp:848 cvtest::testTearDown Memory_usage (OpenCL): 618280 (base=22056  current=580957)
[  FAILED  ] OCL_Arithm/Norm.NORM_INF_2args/5, where GetParam() = (CV_8U, Channels(3), true) (2 ms)

@asmorkalov
Copy link
Contributor

Tests pass on Intel 1135g7 and AMD Ryzen 7 5700G + Nvidia JF 1080.

@asmorkalov
Copy link
Contributor

@opencv-alalek Please take a look on the PR again.

Copy link
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

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

👍

This PR could be merged.
I will merge opencv_3rdparty after that.

@asmorkalov asmorkalov merged commit ae57c54 into opencv:4.x Jan 27, 2025
28 of 31 checks passed
@asmorkalov asmorkalov mentioned this pull request Feb 19, 2025
NanQin555 pushed a commit to NanQin555/opencv that referenced this pull request Feb 24, 2025
Update IPP integration opencv#26463

Please merge together with opencv/opencv_3rdparty#88
Supported IPP version was updated to IPP 2022.0.0 for Linux and Windows. 32-bit binaries are dropped since this release.

Previous update: opencv#25935
asmorkalov pushed a commit that referenced this pull request Jun 12, 2025
Update IPP integration #27354

Please merge together with opencv/opencv_3rdparty#96
Supported IPP version was updated to IPP 2022.1.0 for Linux and Windows. Bugs in norm() function which caused failure of sanity check in performance tests were fixed, IPP calls were enabled.

Previous update: #26463
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.

4 participants