opencv/modules/core/perf
Alexander Alekhin 40533dbf69
Merge pull request #24918 from opencv-pushbot:gitee/alalek/core_convertfp16_replacement
core(OpenCL): optimize convertTo() with CV_16F (convertFp16() replacement) #24918

relates #24909
relates #24917
relates #24892

Performance changes:

- [x] 12700K (1 thread) + Intel iGPU

|Name of Test|noOCL|convertFp16|convertTo BASE|convertTo PATCH|
|---|:-:|:-:|:-:|:-:|
|ConvertFP16FP32MatMat::OCL_Core|3.130|3.152|3.127|3.136|
|ConvertFP16FP32MatUMat::OCL_Core|3.030|3.996|3.007|2.671|
|ConvertFP16FP32UMatMat::OCL_Core|3.010|3.101|3.056|2.854|
|ConvertFP16FP32UMatUMat::OCL_Core|3.016|3.298|2.072|2.061|
|ConvertFP32FP16MatMat::OCL_Core|2.697|2.652|2.723|2.721|
|ConvertFP32FP16MatUMat::OCL_Core|2.752|4.268|2.662|2.947|
|ConvertFP32FP16UMatMat::OCL_Core|2.706|2.601|2.603|2.528|
|ConvertFP32FP16UMatUMat::OCL_Core|2.704|3.215|1.999|1.988|

Patched version is not worse than convertFp16 and convertTo baseline (except MatUMat 32->16, baseline uses CPU code+dst buffer map).
There are still gaps against noOpenCL(CPU only) mode due to T-API implementation issues (unnecessary synchronization).


- [x] 12700K + AMD dGPU

|Name of Test|noOCL|convertFp16 dGPU|convertTo BASE dGPU|convertTo PATCH dGPU|
|---|:-:|:-:|:-:|:-:|
|ConvertFP16FP32MatMat::OCL_Core|3.130|3.133|3.172|3.087|
|ConvertFP16FP32MatUMat::OCL_Core|3.030|1.713|9.559|1.729|
|ConvertFP16FP32UMatMat::OCL_Core|3.010|6.515|6.309|4.452|
|ConvertFP16FP32UMatUMat::OCL_Core|3.016|0.242|23.597|0.170|
|ConvertFP32FP16MatMat::OCL_Core|2.697|2.641|2.713|2.689|
|ConvertFP32FP16MatUMat::OCL_Core|2.752|4.076|6.483|4.191|
|ConvertFP32FP16UMatMat::OCL_Core|2.706|9.042|16.481|1.834|
|ConvertFP32FP16UMatUMat::OCL_Core|2.704|0.229|15.730|0.176|

convertTo-baseline can't compile OpenCL kernel for FP16 properly - FIXED.
dGPU has much more power, so results are x16-17 better than single cpu core. 
Patched version is not worse than convertFp16 and convertTo baseline.
There are still gaps against noOpenCL(CPU only) mode due to T-API implementation issues (unnecessary synchronization) and required memory transfers.

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2024-01-26 12:56:52 +03:00
..
cuda ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
opencl Merge pull request #24918 from opencv-pushbot:gitee/alalek/core_convertfp16_replacement 2024-01-26 12:56:52 +03:00
perf_abs.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_addWeighted.cpp Merge pull request #12411 from vpisarev:wide_convert 2018-09-06 19:36:59 +03:00
perf_allocation.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
perf_arithm.cpp Merge pull request #24480 from savuor:backport_patch_nans 2023-11-03 08:58:07 +03:00
perf_bitwise.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_compare.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_convertTo.cpp Merge pull request #12411 from vpisarev:wide_convert 2018-09-06 19:36:59 +03:00
perf_cvround.cpp fast_math: add extra perf/unit tests 2019-08-07 14:59:46 -05:00
perf_dft.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_dot.cpp Merge pull request #15510 from seiko2plus:issue15506 2019-10-07 22:01:35 +03:00
perf_inRange.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_io_base64.cpp core: disable I/O perf test 2019-02-27 18:07:45 +03:00
perf_lut.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_main.cpp Merge pull request #11897 from Jakub-Golinowski:hpx_backend 2018-08-31 16:23:26 +03:00
perf_mat.cpp Utilize CV_UNUSED macro 2018-09-07 20:33:52 +09:00
perf_math.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_merge.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_minmaxloc.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_norm.cpp Merge pull request #13317 from terfendail:norm_wintr 2018-11-29 19:34:14 +03:00
perf_precomp.hpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_reduce.cpp Merge pull request #13879 from chacha21:REDUCE_SUM2 2023-04-28 20:42:52 +03:00
perf_sort.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
perf_split.cpp Merge pull request #12437 from vpisarev:avx2_fixes 2018-09-06 18:56:55 +03:00
perf_stat.cpp Merge pull request #22947 from chacha21:hasNonZero 2023-06-09 13:37:20 +03:00
perf_umat.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00