-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
cudaarithm: inplace version of NPP flip fails with odd number ROI #18347
Copy link
Copy link
Closed
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib
Milestone
Description
System information (version)
- OpenCV => recent 3.4 (8cb7eae) / master (3b00ee2)
- Operating System / Platform => Jetson Nano/TX1/TX2/XavierNX
- Compiler => GCC 5.4.0, GCC 7.5.0
- CUDA => 10.0 (Nano) 10.2 (XavierNX) 8.0 (TX1,TX2)
Detailed description
This issue was originally found by @nglee
The in-place version of mirror was enabled in #17863
Unfortunately, the test intermittently fails.
./opencv_test_cudaarithm
(snip)
[ RUN ] CUDA_Arithm/Flip.AccuracyInplace/82, where GetParam() = (NVIDIA Tegra X1, 113x113, 8UC3, FLIP_Y, whole matrix)
/home/nvidia/opencv-fork/modules/cudaarithm/test/test_core.cpp:292: Failure
The max difference between matrices "dst_gold" and "srcDst" is 243 at (56, 102), which exceeds "0.0", where "dst_gold" at (56, 102) evaluates to (84, 129, 2), "srcDst" at (56, 102) evaluates to (147, 171, 245), "0.0" evaluates to 0
[ FAILED ] CUDA_Arithm/Flip.AccuracyInplace/82, where GetParam() = (NVIDIA Tegra X1, 113x113, 8UC3, FLIP_Y, whole matrix) (2 ms)
(snip)
[ PASSED ] 11169 tests.
[ FAILED ] 4 tests, listed below:
[ FAILED ] CUDA_Arithm/Flip.AccuracyInplace/82, where GetParam() = (NVIDIA Tegra X1, 113x113, 8UC3, FLIP_Y, whole matrix)
[ FAILED ] CUDA_Arithm/Flip.AccuracyInplace/88, where GetParam() = (NVIDIA Tegra X1, 113x113, 8UC4, FLIP_Y, whole matrix)
[ FAILED ] CUDA_Arithm/Flip.AccuracyInplace/106, where GetParam() = (NVIDIA Tegra X1, 113x113, 16UC4, FLIP_Y, whole matrix)
[ FAILED ] CUDA_Arithm/Flip.AccuracyInplace/142, where GetParam() = (NVIDIA Tegra X1, 113x113, 32FC4, FLIP_Y, whole matrix)
4 FAILED TESTS
I was able to reproduce it separate from OpenCV, so the cause came from NPP
I contacted with NPP team, and I got reply that
- There was a synchronization issue in in-place version
- The NPP team chose not to fix this, but instead, in the future release, this in-place function will explicitly return an error value
NPP_SIZE_ERRORwhen width and/or height is odd number
I think I need to add the same limit in thecv::cuda::flip
I'll send a patch shortly
Steps to reproduce
run ./opencv_test_cudaarithm
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib