Skip to content

core: remove raw SSE2/NEON implementation from matmul.cpp - #9753

Merged
alalek merged 4 commits into
opencv:masterfrom
tomoaki0705:universalMatmul
Nov 20, 2017
Merged

alalek merged 4 commits into
opencv:masterfrom
tomoaki0705:universalMatmul

Conversation

@tomoaki0705

@tomoaki0705 tomoaki0705 commented Sep 30, 2017 •

Copy link
Copy Markdown
Contributor

Merge with extra: opencv/opencv_extra#400

This pullrequest changes

  • use universal intrinsic instead of raw intrinsic
  • add test Core_TransformLargeTest for 8u version of transform
    • 8u SIMD version requires at least length of 16 elements (bytes) but it seems the maximum was 4 bytes
  • may be adding test in too much, waiting for advice

@tomoaki0705
tomoaki0705 force-pushed the universalMatmul branch 2 times, most recently from 7b8b780 to b904775 Compare September 30, 2017 22:43
@vpisarev vpisarev self-assigned this Oct 2, 2017
@vpisarev

vpisarev commented Oct 2, 2017

Copy link
Copy Markdown
Contributor

@tomoaki0705, thank you very much! Did you compare performance of the original and the new implementation? As I see, there are some minor differences, it's not exactly 1:1 rewrite.

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

Thank you for your comment.Indeed, I forgot to measure the performance.
Let me report once I recover the access to the build machine.
I'm out if office this whole week, so I'll probably reply next week.

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

I'm now back with the measurement result, but the number doesn't look that well.

I used the test MatType_Length_dot from opencv_perf_core
The summarized result is shown below

VALUE before after
(8UC1, 32) 0.00 0.00
(8UC1, 64) 0.00 0.00
(8UC1, 128) 0.01 0.01
(8UC1, 256) 0.03 0.05
(8UC1, 512) 0.10 0.19
(8UC1, 1024) 0.50 0.88
(32SC1, 32) 0.00 0.00
(32SC1, 64) 0.01 0.01
(32SC1, 128) 0.04 0.04
(32SC1, 256) 0.17 0.17
(32SC1, 512) 0.76 0.76
(32SC1, 1024) 3.29 3.29
(32FC1, 32) 0.00 0.00
(32FC1, 64) 0.00 0.00
(32FC1, 128) 0.01 0.01
(32FC1, 256) 0.05 0.05
(32FC1, 512) 0.30 0.29
(32FC1, 1024) 2.43 2.43

So, basically as @vpisarev concerned, 8U version seems getting slow, around 60-90%.
I'll try a bit more twisting the intrinsic, hoping that there are some point that every implementation can be moved to universal intrinsic

@vpisarev

vpisarev commented Oct 11, 2017 •

Copy link
Copy Markdown
Contributor

@tomoaki0705, thank you! So, let's pause the patch integration until 8u performance degradation is fixed.

@seiko2plus

Copy link
Copy Markdown
Contributor

@tomoaki0705 @vpisarev I think we should implement the following intrinsics

Left and right shifts 128bits
v_shl128(const v_reg &a, const int s)
v_shr128(const v_reg &a, const int s)

Multiply splat b and add
v_muladd_splat(const v_float32x4 &a, const v_float32x4 &b, const int spi, const v_float32x4 &c)
Returns (a * b[spi] + c)

@tomoaki0705 tomoaki0705 changed the title remove raw SSE2/NEON implementation from matmul.cpp core: remove raw SSE2/NEON implementation from matmul.cpp Oct 23, 2017
@tomoaki0705

Copy link
Copy Markdown
Contributor Author

It almost took 2 weeks but now I'm back with some results.
Basically, not only the dot::MatType_Length but Mat_Transform::Size_MatType was degraded, too.

To be sure about the performance, I added Transform::OCL_TransformFixture and Mat_Transform::Size_MatType and modified dot::MatType_Length
That result told me that the suggestion from @seiko2plus was "must to do".
I added new intrinsic v_rotate_left, v_rotate_right and v_matmuladd

For this moment, I'll dump the result on Windows (x86_64)

Compiler Visual Studio 2013 update 5
OS Windows 7 Ultimate 64bit
CPU Corei7 3720QM 2.60GHz

Test case before ater x-factor
Mat_Transform::Size_MatType::(127x61, 8UC3) 0.022 ms 0.013 ms 1.68
Mat_Transform::Size_MatType::(127x61, 8SC3) 0.096 ms 0.098 ms 0.98
Mat_Transform::Size_MatType::(127x61, 16UC3) 0.019 ms 0.018 ms 1.09
Mat_Transform::Size_MatType::(127x61, 16SC3) 0.094 ms 0.088 ms 1.06
Mat_Transform::Size_MatType::(127x61, 32SC3) 0.042 ms 0.040 ms 1.06
Mat_Transform::Size_MatType::(127x61, 32FC3) 0.014 ms 0.013 ms 1.06
Mat_Transform::Size_MatType::(127x61, 64FC3) 0.027 ms 0.026 ms 1.06
Mat_Transform::Size_MatType::(640x480, 8UC3) 0.531 ms 0.530 ms 1.00
Mat_Transform::Size_MatType::(640x480, 8SC3) 3.990 ms 4.065 ms 0.98
Mat_Transform::Size_MatType::(640x480, 16UC3) 0.756 ms 0.707 ms 1.07
Mat_Transform::Size_MatType::(640x480, 16SC3) 3.483 ms 3.512 ms 0.99
Mat_Transform::Size_MatType::(640x480, 32SC3) 1.640 ms 1.629 ms 1.01
Mat_Transform::Size_MatType::(640x480, 32FC3) 0.587 ms 0.589 ms 1.00
Mat_Transform::Size_MatType::(640x480, 64FC3) 1.283 ms 1.226 ms 1.05
Mat_Transform::Size_MatType::(1280x720, 8UC3) 1.601 ms 1.593 ms 1.01
Mat_Transform::Size_MatType::(1280x720, 8SC3) 11.859 ms 11.320 ms 1.05
Mat_Transform::Size_MatType::(1280x720, 16UC3) 2.400 ms 2.137 ms 1.12
Mat_Transform::Size_MatType::(1280x720, 16SC3) 13.186 ms 12.989 ms 1.02
Mat_Transform::Size_MatType::(1280x720, 32SC3) 4.921 ms 4.957 ms 0.99
Mat_Transform::Size_MatType::(1280x720, 32FC3) 2.038 ms 1.974 ms 1.03
Mat_Transform::Size_MatType::(1280x720, 64FC3) 3.885 ms 3.741 ms 1.04
Mat_Transform::Size_MatType::(1920x1080, 8UC3) 3.608 ms 3.598 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 8SC3) 27.828 ms 27.739 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 16UC3) 5.158 ms 4.848 ms 1.06
Mat_Transform::Size_MatType::(1920x1080, 16SC3) 26.740 ms 26.731 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32SC3) 11.189 ms 11.054 ms 1.01
Mat_Transform::Size_MatType::(1920x1080, 32FC3) 4.467 ms 4.365 ms 1.02
Mat_Transform::Size_MatType::(1920x1080, 64FC3) 8.923 ms 8.342 ms 1.07
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC1) 0.152 ms 0.137 ms 1.11
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC1) 0.129 ms 0.115 ms 1.12
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC4) 0.635 ms 0.562 ms 1.13
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC4) 1.075 ms 0.961 ms 1.12
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC1) 0.420 ms 0.412 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC1) 0.751 ms 0.628 ms 1.19
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC4) 1.756 ms 1.750 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC4) 3.498 ms 3.205 ms 1.09
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC1) 0.988 ms 0.969 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC1) 1.912 ms 1.802 ms 1.06
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC4) 3.933 ms 3.933 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC4) 7.659 ms 7.291 ms 1.05
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC1) 3.948 ms 3.977 ms 0.99
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC1) 7.722 ms 7.426 ms 1.04
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC4) 16.153 ms 15.675 ms 1.03
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC4) 29.708 ms 29.429 ms 1.01
Transform::OCL_TransformFixture::(640x480, 8UC3) 0.551 ms 0.539 ms 1.02
Transform::OCL_TransformFixture::(640x480, 8SC3) 2.100 ms 1.963 ms 1.07
Transform::OCL_TransformFixture::(640x480, 16UC3) 0.829 ms 0.711 ms 1.17
Transform::OCL_TransformFixture::(640x480, 16SC3) 2.081 ms 1.943 ms 1.07
Transform::OCL_TransformFixture::(640x480, 32SC3) 1.825 ms 1.646 ms 1.11
Transform::OCL_TransformFixture::(640x480, 32FC3) 0.633 ms 0.586 ms 1.08
Transform::OCL_TransformFixture::(640x480, 64FC3) 1.312 ms 1.217 ms 1.08
Transform::OCL_TransformFixture::(1280x720, 8UC3) 1.660 ms 1.600 ms 1.04
Transform::OCL_TransformFixture::(1280x720, 8SC3) 6.262 ms 5.835 ms 1.07
Transform::OCL_TransformFixture::(1280x720, 16UC3) 2.326 ms 2.155 ms 1.08
Transform::OCL_TransformFixture::(1280x720, 16SC3) 5.859 ms 5.858 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32SC3) 4.926 ms 4.911 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32FC3) 2.023 ms 1.944 ms 1.04
Transform::OCL_TransformFixture::(1280x720, 64FC3) 4.055 ms 3.772 ms 1.07
Transform::OCL_TransformFixture::(1920x1080, 8UC3) 3.612 ms 3.614 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 8SC3) 13.205 ms 13.160 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16UC3) 5.218 ms 4.880 ms 1.07
Transform::OCL_TransformFixture::(1920x1080, 16SC3) 13.221 ms 13.213 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32SC3) 11.172 ms 11.007 ms 1.01
Transform::OCL_TransformFixture::(1920x1080, 32FC3) 4.520 ms 4.530 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 64FC3) 8.950 ms 8.325 ms 1.08
Transform::OCL_TransformFixture::(3840x2160, 8UC3) 14.618 ms 14.349 ms 1.02
Transform::OCL_TransformFixture::(3840x2160, 8SC3) 53.155 ms 52.393 ms 1.01
Transform::OCL_TransformFixture::(3840x2160, 16UC3) 20.756 ms 19.252 ms 1.08
Transform::OCL_TransformFixture::(3840x2160, 16SC3) 55.351 ms 52.252 ms 1.06
Transform::OCL_TransformFixture::(3840x2160, 32SC3) 44.985 ms 44.020 ms 1.02
Transform::OCL_TransformFixture::(3840x2160, 32FC3) 17.857 ms 17.181 ms 1.04
Transform::OCL_TransformFixture::(3840x2160, 64FC3) 35.636 ms 33.160 ms 1.07
dot::MatType_Length::(8UC1, 64) 0.000 ms 0.000 ms 1.00
dot::MatType_Length::(8UC1, 128) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(8UC1, 256) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(8UC1, 512) 0.022 ms 0.021 ms 1.04
dot::MatType_Length::(8UC1, 1024) 0.088 ms 0.093 ms 0.95
dot::MatType_Length::(8SC1, 64) 0.001 ms 0.000 ms 2.00
dot::MatType_Length::(8SC1, 128) 0.002 ms 0.002 ms 0.83
dot::MatType_Length::(8SC1, 256) 0.009 ms 0.009 ms 1.00
dot::MatType_Length::(8SC1, 512) 0.034 ms 0.034 ms 0.99
dot::MatType_Length::(8SC1, 1024) 0.138 ms 0.142 ms 0.97
dot::MatType_Length::(16UC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(16UC1, 64) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(16UC1, 128) 0.021 ms 0.021 ms 1.00
dot::MatType_Length::(16UC1, 256) 0.082 ms 0.082 ms 1.00
dot::MatType_Length::(16UC1, 512) 0.330 ms 0.331 ms 1.00
dot::MatType_Length::(16UC1, 1024) 1.363 ms 1.346 ms 1.01
dot::MatType_Length::(16SC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(16SC1, 64) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(16SC1, 128) 0.021 ms 0.021 ms 1.02
dot::MatType_Length::(16SC1, 256) 0.082 ms 0.082 ms 1.00
dot::MatType_Length::(16SC1, 512) 0.329 ms 0.329 ms 1.00
dot::MatType_Length::(16SC1, 1024) 1.349 ms 1.358 ms 0.99
dot::MatType_Length::(32SC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(32SC1, 64) 0.004 ms 0.004 ms 1.00
dot::MatType_Length::(32SC1, 128) 0.015 ms 0.015 ms 1.00
dot::MatType_Length::(32SC1, 256) 0.060 ms 0.059 ms 1.01
dot::MatType_Length::(32SC1, 512) 0.242 ms 0.238 ms 1.01
dot::MatType_Length::(32SC1, 1024) 1.053 ms 1.048 ms 1.01
dot::MatType_Length::(32FC1, 32) 0.001 ms 0.000 ms 3.00
dot::MatType_Length::(32FC1, 64) 0.004 ms 0.001 ms 5.50
dot::MatType_Length::(32FC1, 128) 0.017 ms 0.004 ms 4.78
dot::MatType_Length::(32FC1, 256) 0.068 ms 0.017 ms 4.10
dot::MatType_Length::(32FC1, 512) 0.279 ms 0.064 ms 4.34
dot::MatType_Length::(32FC1, 1024) 1.181 ms 0.378 ms 3.12

@tomoaki0705

tomoaki0705 commented Oct 23, 2017 •

Copy link
Copy Markdown
Contributor Author

Now, there are many things to be solved before the merge. I'll write them down not to miss any of them.
Please notify me if I can skip any of them ( which I doubt I can )

  • push sanity data of new performance tests to opencv_extra
  • add tests for new universal intrinsic
  • add implementation of new universal intrinsic for PowerPC version (which is headache... )
  • check the performance on ARM

@alalek

alalek commented Oct 23, 2017 •

Copy link
Copy Markdown
Member

I believe you can skip these things in this order:

  • (3) Sure, but code with new intrinsics should be guarded (#if CV_SIMD128 && !defined __PPC64__)
  • (1) Add/replace current sanity check to SANITY_CHECK_NOTHING();
  • (2) tests for universal intrinsics - nice to have, but lets make them later
  • (4) ARM perf tests results

@alalek

alalek commented Oct 23, 2017

Copy link
Copy Markdown
Member

@tomoaki0705 BTW, You could use #9922 patch to generate reports in markdown-like format.

@seiko2plus

Copy link
Copy Markdown
Contributor

@tomoaki0705 leave implementation of new universal intrinsic for powerpc to me, I'm going to implement it into #9907

@seiko2plus

Copy link
Copy Markdown
Contributor

@alalek No need to guard new intrinsics unless this patch is going to be merged first.

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

@alalek , Thanks for the help.
I'll first go with ARM performance test, as @seiko2plus mentioned about the implementation of PPC version.

@seiko2plus It's a very kind offer. thank you very much!

@tomoaki0705
tomoaki0705 force-pushed the universalMatmul branch 2 times, most recently from 2cbd6bc to c91874c Compare October 24, 2017 09:19
@tomoaki0705

tomoaki0705 commented Oct 24, 2017 •

Copy link
Copy Markdown
Contributor Author

Here's performance test from some ARM devices
I updated the "after" value to cd5ac6f

ODROID-X2

Name of Test before after x-factor
Mat_Transform::Size_MatType::(127x61, 8UC3) 0.559 ms 0.190 ms 2.94
Mat_Transform::Size_MatType::(127x61, 8SC3) 0.612 ms 0.623 ms 0.98
Mat_Transform::Size_MatType::(127x61, 16UC3) 0.552 ms 0.320 ms 1.72
Mat_Transform::Size_MatType::(127x61, 16SC3) 0.580 ms 0.580 ms 1.00
Mat_Transform::Size_MatType::(127x61, 32SC3) 0.323 ms 0.325 ms 0.99
Mat_Transform::Size_MatType::(127x61, 32FC3) 0.236 ms 0.196 ms 1.20
Mat_Transform::Size_MatType::(127x61, 64FC3) 0.281 ms 0.281 ms 1.00
Mat_Transform::Size_MatType::(640x480, 8UC3) 22.818 ms 7.614 ms 3.00
Mat_Transform::Size_MatType::(640x480, 8SC3) 24.883 ms 24.938 ms 1.00
Mat_Transform::Size_MatType::(640x480, 16UC3) 22.014 ms 12.710 ms 1.73
Mat_Transform::Size_MatType::(640x480, 16SC3) 22.445 ms 22.346 ms 1.00
Mat_Transform::Size_MatType::(640x480, 32SC3) 13.002 ms 13.009 ms 1.00
Mat_Transform::Size_MatType::(640x480, 32FC3) 9.431 ms 8.203 ms 1.15
Mat_Transform::Size_MatType::(640x480, 64FC3) 16.139 ms 16.173 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 8UC3) 67.757 ms 22.849 ms 2.97
Mat_Transform::Size_MatType::(1280x720, 8SC3) 74.635 ms 74.620 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 16UC3) 66.528 ms 38.101 ms 1.75
Mat_Transform::Size_MatType::(1280x720, 16SC3) 69.293 ms 69.414 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32SC3) 38.933 ms 38.953 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32FC3) 28.271 ms 24.592 ms 1.15
Mat_Transform::Size_MatType::(1280x720, 64FC3) 48.315 ms 48.388 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 8UC3) 151.949 ms 51.395 ms 2.96
Mat_Transform::Size_MatType::(1920x1080, 8SC3) 167.751 ms 168.433 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 16UC3) 147.943 ms 85.710 ms 1.73
Mat_Transform::Size_MatType::(1920x1080, 16SC3) 151.931 ms 152.087 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32SC3) 87.652 ms 87.698 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32FC3) 63.640 ms 55.607 ms 1.14
Mat_Transform::Size_MatType::(1920x1080, 64FC3) 108.213 ms 108.554 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC1) 1.595 ms 1.595 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC1) 2.351 ms 2.305 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC4) 6.259 ms 6.259 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC4) 9.544 ms 9.517 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC1) 4.706 ms 4.708 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC1) 7.192 ms 7.098 ms 1.01
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC4) 18.733 ms 18.738 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC4) 28.693 ms 28.462 ms 1.01
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC1) 10.547 ms 10.549 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC1) 16.079 ms 16.087 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC4) 42.113 ms 42.100 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC4) 65.588 ms 65.091 ms 1.01
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC1) 42.105 ms 42.096 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC1) 65.351 ms 65.049 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC4) 168.326 ms 168.319 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC4) 261.732 ms 267.305 ms 0.98
Transform::OCL_TransformFixture::(640x480, 8UC3) 21.607 ms 7.637 ms 2.83
Transform::OCL_TransformFixture::(640x480, 8SC3) 21.586 ms 21.592 ms 1.00
Transform::OCL_TransformFixture::(640x480, 16UC3) 20.550 ms 12.745 ms 1.61
Transform::OCL_TransformFixture::(640x480, 16SC3) 19.832 ms 19.850 ms 1.00
Transform::OCL_TransformFixture::(640x480, 32SC3) 13.036 ms 13.063 ms 1.00
Transform::OCL_TransformFixture::(640x480, 32FC3) 9.504 ms 8.234 ms 1.15
Transform::OCL_TransformFixture::(640x480, 64FC3) 16.154 ms 16.195 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 8UC3) 64.694 ms 22.879 ms 2.83
Transform::OCL_TransformFixture::(1280x720, 8SC3) 64.713 ms 64.730 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 16UC3) 61.495 ms 38.137 ms 1.61
Transform::OCL_TransformFixture::(1280x720, 16SC3) 59.587 ms 59.633 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32SC3) 38.998 ms 38.957 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32FC3) 28.372 ms 24.619 ms 1.15
Transform::OCL_TransformFixture::(1280x720, 64FC3) 48.355 ms 48.450 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 8UC3) 145.941 ms 51.422 ms 2.84
Transform::OCL_TransformFixture::(1920x1080, 8SC3) 145.810 ms 145.850 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16UC3) 137.559 ms 85.732 ms 1.60
Transform::OCL_TransformFixture::(1920x1080, 16SC3) 133.099 ms 133.083 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32SC3) 87.622 ms 87.667 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32FC3) 63.761 ms 55.629 ms 1.15
Transform::OCL_TransformFixture::(1920x1080, 64FC3) 108.229 ms 108.618 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 8UC3) 581.746 ms 205.498 ms 2.83
Transform::OCL_TransformFixture::(3840x2160, 8SC3) 581.041 ms 580.995 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 16UC3) 553.365 ms 342.819 ms 1.61
Transform::OCL_TransformFixture::(3840x2160, 16SC3) 536.673 ms 536.822 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32SC3) 350.220 ms 350.244 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32FC3) 254.058 ms 221.005 ms 1.15
Transform::OCL_TransformFixture::(3840x2160, 64FC3) 438.780 ms 442.057 ms 0.99
dot::MatType_Length::(8UC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(8UC1, 64) 0.003 ms 0.003 ms 1.02
dot::MatType_Length::(8UC1, 128) 0.012 ms 0.012 ms 1.01
dot::MatType_Length::(8UC1, 256) 0.058 ms 0.058 ms 1.00
dot::MatType_Length::(8UC1, 512) 0.228 ms 0.229 ms 0.99
dot::MatType_Length::(8UC1, 1024) 1.094 ms 1.097 ms 1.00
dot::MatType_Length::(8SC1, 32) 0.001 ms 0.001 ms 0.97
dot::MatType_Length::(8SC1, 64) 0.003 ms 0.003 ms 1.02
dot::MatType_Length::(8SC1, 128) 0.012 ms 0.012 ms 1.00
dot::MatType_Length::(8SC1, 256) 0.058 ms 0.058 ms 1.00
dot::MatType_Length::(8SC1, 512) 0.229 ms 0.230 ms 1.00
dot::MatType_Length::(8SC1, 1024) 1.091 ms 1.091 ms 1.00
dot::MatType_Length::(16UC1, 32) 0.007 ms 0.007 ms 1.00
dot::MatType_Length::(16UC1, 64) 0.025 ms 0.025 ms 0.99
dot::MatType_Length::(16UC1, 128) 0.111 ms 0.111 ms 1.00
dot::MatType_Length::(16UC1, 256) 0.446 ms 0.446 ms 1.00
dot::MatType_Length::(16UC1, 512) 1.810 ms 1.804 ms 1.00
dot::MatType_Length::(16UC1, 1024) 7.317 ms 7.318 ms 1.00
dot::MatType_Length::(16SC1, 32) 0.007 ms 0.007 ms 1.00
dot::MatType_Length::(16SC1, 64) 0.025 ms 0.025 ms 1.00
dot::MatType_Length::(16SC1, 128) 0.111 ms 0.111 ms 0.99
dot::MatType_Length::(16SC1, 256) 0.447 ms 0.446 ms 1.00
dot::MatType_Length::(16SC1, 512) 1.806 ms 1.819 ms 0.99
dot::MatType_Length::(16SC1, 1024) 7.319 ms 7.309 ms 1.00
dot::MatType_Length::(32SC1, 32) 0.007 ms 0.007 ms 1.00
dot::MatType_Length::(32SC1, 64) 0.027 ms 0.027 ms 0.97
dot::MatType_Length::(32SC1, 128) 0.122 ms 0.122 ms 1.00
dot::MatType_Length::(32SC1, 256) 0.487 ms 0.487 ms 1.00
dot::MatType_Length::(32SC1, 512) 2.045 ms 2.034 ms 1.01
dot::MatType_Length::(32SC1, 1024) 8.164 ms 8.164 ms 1.00
dot::MatType_Length::(32FC1, 32) 0.002 ms 0.002 ms 1.00
dot::MatType_Length::(32FC1, 64) 0.009 ms 0.009 ms 0.97
dot::MatType_Length::(32FC1, 128) 0.049 ms 0.049 ms 1.00
dot::MatType_Length::(32FC1, 256) 0.194 ms 0.194 ms 1.00
dot::MatType_Length::(32FC1, 512) 0.992 ms 0.997 ms 0.99
dot::MatType_Length::(32FC1, 1024) 4.381 ms 4.460 ms 0.98

ODROID-C2

Name of Test before after x-factor
Mat_Transform::Size_MatType::(127x61, 8UC3) 0.533 ms 0.180 ms 2.96
Mat_Transform::Size_MatType::(127x61, 8SC3) 0.530 ms 0.530 ms 1.00
Mat_Transform::Size_MatType::(127x61, 16UC3) 0.534 ms 0.534 ms 1.00
Mat_Transform::Size_MatType::(127x61, 16SC3) 0.529 ms 0.531 ms 1.00
Mat_Transform::Size_MatType::(127x61, 32SC3) 0.460 ms 0.459 ms 1.00
Mat_Transform::Size_MatType::(127x61, 32FC3) 0.073 ms 0.074 ms 0.99
Mat_Transform::Size_MatType::(127x61, 64FC3) 0.142 ms 0.142 ms 1.00
Mat_Transform::Size_MatType::(640x480, 8UC3) 21.582 ms 7.394 ms 2.92
Mat_Transform::Size_MatType::(640x480, 8SC3) 21.353 ms 21.355 ms 1.00
Mat_Transform::Size_MatType::(640x480, 16UC3) 21.705 ms 21.688 ms 1.00
Mat_Transform::Size_MatType::(640x480, 16SC3) 21.176 ms 21.169 ms 1.00
Mat_Transform::Size_MatType::(640x480, 32SC3) 18.922 ms 18.939 ms 1.00
Mat_Transform::Size_MatType::(640x480, 32FC3) 3.168 ms 3.174 ms 1.00
Mat_Transform::Size_MatType::(640x480, 64FC3) 6.236 ms 6.212 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 8UC3) 64.302 ms 22.157 ms 2.90
Mat_Transform::Size_MatType::(1280x720, 8SC3) 63.644 ms 63.640 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 16UC3) 65.195 ms 65.207 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 16SC3) 64.765 ms 64.765 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32SC3) 57.143 ms 56.940 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32FC3) 9.532 ms 9.539 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 64FC3) 18.626 ms 18.633 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 8UC3) 143.879 ms 49.383 ms 2.91
Mat_Transform::Size_MatType::(1920x1080, 8SC3) 143.637 ms 143.652 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 16UC3) 145.647 ms 145.656 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 16SC3) 143.524 ms 143.502 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32SC3) 127.346 ms 127.720 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32FC3) 21.360 ms 21.428 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 64FC3) 41.803 ms 41.864 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC1) 0.935 ms 0.930 ms 1.01
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC1) 1.611 ms 1.621 ms 0.99
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC4) 3.736 ms 3.752 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC4) 6.509 ms 6.610 ms 0.98
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC1) 2.808 ms 2.798 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC1) 4.856 ms 4.890 ms 0.99
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC4) 11.179 ms 11.221 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC4) 19.426 ms 19.430 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC1) 6.299 ms 6.293 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC1) 10.847 ms 10.380 ms 1.04
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC4) 25.118 ms 25.029 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC4) 43.817 ms 42.694 ms 1.03
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC1) 25.118 ms 25.022 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC1) 43.280 ms 42.057 ms 1.03
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC4) 100.302 ms 100.278 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC4) 177.821 ms 177.336 ms 1.00
Transform::OCL_TransformFixture::(640x480, 8UC3) 19.022 ms 7.437 ms 2.56
Transform::OCL_TransformFixture::(640x480, 8SC3) 19.841 ms 19.824 ms 1.00
Transform::OCL_TransformFixture::(640x480, 16UC3) 19.361 ms 19.401 ms 1.00
Transform::OCL_TransformFixture::(640x480, 16SC3) 19.974 ms 20.012 ms 1.00
Transform::OCL_TransformFixture::(640x480, 32SC3) 18.770 ms 19.064 ms 0.98
Transform::OCL_TransformFixture::(640x480, 32FC3) 3.198 ms 3.213 ms 1.00
Transform::OCL_TransformFixture::(640x480, 64FC3) 6.258 ms 6.258 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 8UC3) 56.930 ms 22.151 ms 2.57
Transform::OCL_TransformFixture::(1280x720, 8SC3) 59.389 ms 59.364 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 16UC3) 58.004 ms 58.085 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 16SC3) 59.799 ms 59.876 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32SC3) 56.961 ms 57.176 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32FC3) 9.573 ms 9.593 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 64FC3) 18.625 ms 18.662 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 8UC3) 127.454 ms 49.444 ms 2.58
Transform::OCL_TransformFixture::(1920x1080, 8SC3) 132.981 ms 132.974 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16UC3) 129.297 ms 129.287 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16SC3) 133.391 ms 133.394 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32SC3) 127.788 ms 126.751 ms 1.01
Transform::OCL_TransformFixture::(1920x1080, 32FC3) 21.462 ms 21.458 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 64FC3) 41.873 ms 41.873 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 8UC3) 512.590 ms 199.341 ms 2.57
Transform::OCL_TransformFixture::(3840x2160, 8SC3) 533.945 ms 533.847 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 16UC3) 517.585 ms 516.806 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 16SC3) 534.059 ms 533.633 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32SC3) 505.816 ms 506.511 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32FC3) 85.661 ms 85.781 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 64FC3) 173.270 ms 168.232 ms 1.03
dot::MatType_Length::(8UC1, 32) 0.002 ms 0.002 ms 1.00
dot::MatType_Length::(8UC1, 64) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(8UC1, 128) 0.019 ms 0.020 ms 0.95
dot::MatType_Length::(8UC1, 256) 0.077 ms 0.077 ms 1.00
dot::MatType_Length::(8UC1, 512) 0.342 ms 0.340 ms 1.01
dot::MatType_Length::(8UC1, 1024) 1.850 ms 1.852 ms 1.00
dot::MatType_Length::(8SC1, 32) 0.002 ms 0.002 ms 1.00
dot::MatType_Length::(8SC1, 64) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(8SC1, 128) 0.020 ms 0.020 ms 1.00
dot::MatType_Length::(8SC1, 256) 0.077 ms 0.077 ms 1.00
dot::MatType_Length::(8SC1, 512) 0.344 ms 0.342 ms 1.01
dot::MatType_Length::(8SC1, 1024) 1.848 ms 1.855 ms 1.00
dot::MatType_Length::(16UC1, 32) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(16UC1, 64) 0.020 ms 0.020 ms 1.00
dot::MatType_Length::(16UC1, 128) 0.078 ms 0.078 ms 1.00
dot::MatType_Length::(16UC1, 256) 0.308 ms 0.308 ms 1.00
dot::MatType_Length::(16UC1, 512) 1.481 ms 1.476 ms 1.00
dot::MatType_Length::(16UC1, 1024) 6.046 ms 6.109 ms 0.99
dot::MatType_Length::(16SC1, 32) 0.005 ms 0.005 ms 1.00
dot::MatType_Length::(16SC1, 64) 0.020 ms 0.020 ms 1.00
dot::MatType_Length::(16SC1, 128) 0.078 ms 0.078 ms 1.00
dot::MatType_Length::(16SC1, 256) 0.307 ms 0.312 ms 0.98
dot::MatType_Length::(16SC1, 512) 1.498 ms 1.496 ms 1.00
dot::MatType_Length::(16SC1, 1024) 6.039 ms 6.105 ms 0.99
dot::MatType_Length::(32SC1, 32) 0.006 ms 0.006 ms 1.00
dot::MatType_Length::(32SC1, 64) 0.021 ms 0.021 ms 1.00
dot::MatType_Length::(32SC1, 128) 0.082 ms 0.082 ms 1.00
dot::MatType_Length::(32SC1, 256) 0.359 ms 0.364 ms 0.99
dot::MatType_Length::(32SC1, 512) 1.993 ms 2.003 ms 1.00
dot::MatType_Length::(32SC1, 1024) 7.945 ms 8.021 ms 0.99
dot::MatType_Length::(32FC1, 32) 0.002 ms 0.002 ms 1.00
dot::MatType_Length::(32FC1, 64) 0.007 ms 0.007 ms 1.00
dot::MatType_Length::(32FC1, 128) 0.026 ms 0.026 ms 1.00
dot::MatType_Length::(32FC1, 256) 0.144 ms 0.145 ms 0.99
dot::MatType_Length::(32FC1, 512) 1.256 ms 1.255 ms 1.00
dot::MatType_Length::(32FC1, 1024) 5.037 ms 5.055 ms 1.00

Jetson-TK1

Name of Test before after x-factor
Mat_Transform::Size_MatType::(127x61, 8UC3) 0.177 ms 0.074 ms 2.40
Mat_Transform::Size_MatType::(127x61, 8SC3) 0.253 ms 0.250 ms 1.01
Mat_Transform::Size_MatType::(127x61, 16UC3) 0.173 ms 0.094 ms 1.85
Mat_Transform::Size_MatType::(127x61, 16SC3) 0.265 ms 0.268 ms 0.99
Mat_Transform::Size_MatType::(127x61, 32SC3) 0.120 ms 0.120 ms 1.00
Mat_Transform::Size_MatType::(127x61, 32FC3) 0.078 ms 0.046 ms 1.68
Mat_Transform::Size_MatType::(127x61, 64FC3) 0.088 ms 0.087 ms 1.00
Mat_Transform::Size_MatType::(640x480, 8UC3) 8.036 ms 2.966 ms 2.71
Mat_Transform::Size_MatType::(640x480, 8SC3) 10.144 ms 10.204 ms 0.99
Mat_Transform::Size_MatType::(640x480, 16UC3) 7.267 ms 5.247 ms 1.38
Mat_Transform::Size_MatType::(640x480, 16SC3) 9.628 ms 9.708 ms 0.99
Mat_Transform::Size_MatType::(640x480, 32SC3) 7.915 ms 7.894 ms 1.00
Mat_Transform::Size_MatType::(640x480, 32FC3) 7.317 ms 2.005 ms 3.65
Mat_Transform::Size_MatType::(640x480, 64FC3) 13.284 ms 13.328 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 8UC3) 22.782 ms 9.057 ms 2.52
Mat_Transform::Size_MatType::(1280x720, 8SC3) 30.039 ms 30.233 ms 0.99
Mat_Transform::Size_MatType::(1280x720, 16UC3) 26.779 ms 17.424 ms 1.54
Mat_Transform::Size_MatType::(1280x720, 16SC3) 37.039 ms 37.219 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32SC3) 26.662 ms 26.667 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32FC3) 22.475 ms 6.003 ms 3.74
Mat_Transform::Size_MatType::(1280x720, 64FC3) 39.860 ms 39.976 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 8UC3) 53.400 ms 20.434 ms 2.61
Mat_Transform::Size_MatType::(1920x1080, 8SC3) 70.482 ms 71.019 ms 0.99
Mat_Transform::Size_MatType::(1920x1080, 16UC3) 59.848 ms 39.285 ms 1.52
Mat_Transform::Size_MatType::(1920x1080, 16SC3) 81.353 ms 81.860 ms 0.99
Mat_Transform::Size_MatType::(1920x1080, 32SC3) 60.092 ms 60.027 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32FC3) 50.385 ms 13.489 ms 3.74
Mat_Transform::Size_MatType::(1920x1080, 64FC3) 89.816 ms 90.076 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC1) 0.412 ms 0.413 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC1) 0.482 ms 0.473 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC4) 1.657 ms 1.658 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC4) 3.245 ms 3.169 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC1) 1.239 ms 1.239 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC1) 2.403 ms 2.350 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC4) 4.961 ms 4.966 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC4) 9.824 ms 9.579 ms 1.03
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC1) 2.798 ms 2.800 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC1) 5.531 ms 5.378 ms 1.03
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC4) 11.181 ms 11.137 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC4) 22.086 ms 21.591 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC1) 11.138 ms 11.145 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC1) 22.118 ms 21.630 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC4) 44.547 ms 44.542 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC4) 89.412 ms 87.220 ms 1.03
Transform::OCL_TransformFixture::(640x480, 8UC3) 5.497 ms 2.983 ms 1.84
Transform::OCL_TransformFixture::(640x480, 8SC3) 5.721 ms 5.722 ms 1.00
Transform::OCL_TransformFixture::(640x480, 16UC3) 5.523 ms 5.309 ms 1.04
Transform::OCL_TransformFixture::(640x480, 16SC3) 5.302 ms 5.413 ms 0.98
Transform::OCL_TransformFixture::(640x480, 32SC3) 7.942 ms 7.929 ms 1.00
Transform::OCL_TransformFixture::(640x480, 32FC3) 7.356 ms 2.025 ms 3.63
Transform::OCL_TransformFixture::(640x480, 64FC3) 13.285 ms 13.322 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 8UC3) 18.294 ms 9.096 ms 2.01
Transform::OCL_TransformFixture::(1280x720, 8SC3) 18.953 ms 18.914 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 16UC3) 20.506 ms 17.463 ms 1.17
Transform::OCL_TransformFixture::(1280x720, 16SC3) 20.311 ms 20.274 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32SC3) 26.680 ms 26.681 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32FC3) 22.421 ms 6.009 ms 3.73
Transform::OCL_TransformFixture::(1280x720, 64FC3) 39.992 ms 39.937 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 8UC3) 43.606 ms 20.491 ms 2.13
Transform::OCL_TransformFixture::(1920x1080, 8SC3) 45.047 ms 44.927 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16UC3) 47.244 ms 39.310 ms 1.20
Transform::OCL_TransformFixture::(1920x1080, 16SC3) 46.256 ms 46.243 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32SC3) 60.041 ms 60.036 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32FC3) 50.297 ms 13.514 ms 3.72
Transform::OCL_TransformFixture::(1920x1080, 64FC3) 89.808 ms 90.250 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 8UC3) 176.583 ms 81.748 ms 2.16
Transform::OCL_TransformFixture::(3840x2160, 8SC3) 182.111 ms 181.926 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 16UC3) 189.181 ms 157.834 ms 1.20
Transform::OCL_TransformFixture::(3840x2160, 16SC3) 185.866 ms 185.829 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32SC3) 241.133 ms 241.023 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32FC3) 202.604 ms 54.059 ms 3.75
Transform::OCL_TransformFixture::(3840x2160, 64FC3) 360.611 ms 360.782 ms 1.00
dot::MatType_Length::(8UC1, 32) 0.001 ms 0.001 ms 1.11
dot::MatType_Length::(8UC1, 64) 0.002 ms 0.002 ms 1.02
dot::MatType_Length::(8UC1, 128) 0.007 ms 0.006 ms 1.14
dot::MatType_Length::(8UC1, 256) 0.026 ms 0.026 ms 1.01
dot::MatType_Length::(8UC1, 512) 0.103 ms 0.103 ms 1.00
dot::MatType_Length::(8UC1, 1024) 0.489 ms 0.495 ms 0.99
dot::MatType_Length::(8SC1, 32) 0.001 ms 0.001 ms 1.11
dot::MatType_Length::(8SC1, 64) 0.002 ms 0.002 ms 1.10
dot::MatType_Length::(8SC1, 128) 0.006 ms 0.006 ms 1.11
dot::MatType_Length::(8SC1, 256) 0.026 ms 0.026 ms 1.00
dot::MatType_Length::(8SC1, 512) 0.102 ms 0.102 ms 1.00
dot::MatType_Length::(8SC1, 1024) 0.505 ms 0.498 ms 1.02
dot::MatType_Length::(16UC1, 32) 0.003 ms 0.003 ms 1.00
dot::MatType_Length::(16UC1, 64) 0.011 ms 0.011 ms 1.03
dot::MatType_Length::(16UC1, 128) 0.045 ms 0.045 ms 1.00
dot::MatType_Length::(16UC1, 256) 0.177 ms 0.178 ms 1.00
dot::MatType_Length::(16UC1, 512) 0.718 ms 0.713 ms 1.01
dot::MatType_Length::(16UC1, 1024) 3.027 ms 3.030 ms 1.00
dot::MatType_Length::(16SC1, 32) 0.003 ms 0.003 ms 0.99
dot::MatType_Length::(16SC1, 64) 0.011 ms 0.011 ms 1.02
dot::MatType_Length::(16SC1, 128) 0.045 ms 0.045 ms 1.00
dot::MatType_Length::(16SC1, 256) 0.178 ms 0.178 ms 1.00
dot::MatType_Length::(16SC1, 512) 0.716 ms 0.717 ms 1.00
dot::MatType_Length::(16SC1, 1024) 3.029 ms 3.027 ms 1.00
dot::MatType_Length::(32SC1, 32) 0.003 ms 0.003 ms 1.02
dot::MatType_Length::(32SC1, 64) 0.010 ms 0.010 ms 1.03
dot::MatType_Length::(32SC1, 128) 0.042 ms 0.042 ms 1.00
dot::MatType_Length::(32SC1, 256) 0.166 ms 0.166 ms 1.00
dot::MatType_Length::(32SC1, 512) 0.744 ms 0.748 ms 1.00
dot::MatType_Length::(32SC1, 1024) 3.215 ms 3.188 ms 1.01
dot::MatType_Length::(32FC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(32FC1, 64) 0.004 ms 0.004 ms 1.02
dot::MatType_Length::(32FC1, 128) 0.013 ms 0.013 ms 1.02
dot::MatType_Length::(32FC1, 256) 0.050 ms 0.049 ms 1.02
dot::MatType_Length::(32FC1, 512) 0.305 ms 0.300 ms 1.02
dot::MatType_Length::(32FC1, 1024) 2.435 ms 2.406 ms 1.01

Jetson-TX1

Name of Test before after x-factor
Mat_Transform::Size_MatType::(127x61, 8UC3) 0.231 ms 0.115 ms 2.01
Mat_Transform::Size_MatType::(127x61, 8SC3) 0.338 ms 0.340 ms 0.99
Mat_Transform::Size_MatType::(127x61, 16UC3) 0.240 ms 0.240 ms 1.00
Mat_Transform::Size_MatType::(127x61, 16SC3) 0.372 ms 0.371 ms 1.00
Mat_Transform::Size_MatType::(127x61, 32SC3) 0.203 ms 0.202 ms 1.00
Mat_Transform::Size_MatType::(127x61, 32FC3) 0.034 ms 0.034 ms 1.00
Mat_Transform::Size_MatType::(127x61, 64FC3) 0.058 ms 0.058 ms 1.00
Mat_Transform::Size_MatType::(640x480, 8UC3) 11.012 ms 4.833 ms 2.28
Mat_Transform::Size_MatType::(640x480, 8SC3) 14.365 ms 14.279 ms 1.01
Mat_Transform::Size_MatType::(640x480, 16UC3) 10.254 ms 10.261 ms 1.00
Mat_Transform::Size_MatType::(640x480, 16SC3) 13.369 ms 13.271 ms 1.01
Mat_Transform::Size_MatType::(640x480, 32SC3) 8.114 ms 8.094 ms 1.00
Mat_Transform::Size_MatType::(640x480, 32FC3) 1.565 ms 1.550 ms 1.01
Mat_Transform::Size_MatType::(640x480, 64FC3) 2.637 ms 2.628 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 8UC3) 29.008 ms 13.633 ms 2.13
Mat_Transform::Size_MatType::(1280x720, 8SC3) 39.815 ms 40.387 ms 0.99
Mat_Transform::Size_MatType::(1280x720, 16UC3) 29.520 ms 29.503 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 16SC3) 44.417 ms 44.759 ms 0.99
Mat_Transform::Size_MatType::(1280x720, 32SC3) 24.280 ms 24.203 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 32FC3) 4.497 ms 4.514 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 64FC3) 7.895 ms 7.893 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 8UC3) 64.605 ms 30.592 ms 2.11
Mat_Transform::Size_MatType::(1920x1080, 8SC3) 95.666 ms 97.048 ms 0.99
Mat_Transform::Size_MatType::(1920x1080, 16UC3) 64.104 ms 64.238 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 16SC3) 95.198 ms 95.597 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32SC3) 54.628 ms 54.560 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 32FC3) 10.114 ms 10.108 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 64FC3) 17.633 ms 17.497 ms 1.01
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC1) 0.593 ms 0.593 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC1) 0.585 ms 0.564 ms 1.04
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC4) 2.378 ms 2.376 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC4) 2.116 ms 2.241 ms 0.94
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC1) 1.780 ms 1.779 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC1) 1.517 ms 1.557 ms 0.97
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC4) 7.130 ms 7.153 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC4) 6.937 ms 7.680 ms 0.90
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC1) 4.030 ms 4.015 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC1) 3.430 ms 3.489 ms 0.98
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC4) 16.010 ms 16.004 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC4) 13.650 ms 13.760 ms 0.99
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC1) 15.996 ms 16.008 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC1) 13.742 ms 13.986 ms 0.98
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC4) 64.085 ms 64.085 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC4) 55.580 ms 55.779 ms 1.00
Transform::OCL_TransformFixture::(640x480, 8UC3) 7.476 ms 4.824 ms 1.55
Transform::OCL_TransformFixture::(640x480, 8SC3) 7.666 ms 7.594 ms 1.01
Transform::OCL_TransformFixture::(640x480, 16UC3) 8.273 ms 8.262 ms 1.00
Transform::OCL_TransformFixture::(640x480, 16SC3) 8.403 ms 8.344 ms 1.01
Transform::OCL_TransformFixture::(640x480, 32SC3) 8.119 ms 8.136 ms 1.00
Transform::OCL_TransformFixture::(640x480, 32FC3) 1.589 ms 1.598 ms 0.99
Transform::OCL_TransformFixture::(640x480, 64FC3) 2.634 ms 2.621 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 8UC3) 22.704 ms 13.624 ms 1.67
Transform::OCL_TransformFixture::(1280x720, 8SC3) 23.532 ms 23.862 ms 0.99
Transform::OCL_TransformFixture::(1280x720, 16UC3) 22.503 ms 22.523 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 16SC3) 22.788 ms 22.824 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32SC3) 24.251 ms 24.307 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 32FC3) 4.477 ms 4.518 ms 0.99
Transform::OCL_TransformFixture::(1280x720, 64FC3) 7.910 ms 7.837 ms 1.01
Transform::OCL_TransformFixture::(1920x1080, 8UC3) 49.876 ms 30.674 ms 1.63
Transform::OCL_TransformFixture::(1920x1080, 8SC3) 51.111 ms 51.122 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16UC3) 50.657 ms 50.748 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 16SC3) 51.382 ms 51.384 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32SC3) 54.667 ms 54.750 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 32FC3) 10.194 ms 10.151 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 64FC3) 17.560 ms 17.509 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 8UC3) 199.268 ms 122.526 ms 1.63
Transform::OCL_TransformFixture::(3840x2160, 8SC3) 204.269 ms 204.392 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 16UC3) 202.515 ms 202.698 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 16SC3) 205.207 ms 205.437 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32SC3) 218.396 ms 218.886 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 32FC3) 40.197 ms 40.107 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 64FC3) 68.975 ms 68.753 ms 1.00
dot::MatType_Length::(8UC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(8UC1, 64) 0.003 ms 0.002 ms 1.06
dot::MatType_Length::(8UC1, 128) 0.010 ms 0.010 ms 1.01
dot::MatType_Length::(8UC1, 256) 0.037 ms 0.037 ms 1.00
dot::MatType_Length::(8UC1, 512) 0.148 ms 0.149 ms 0.99
dot::MatType_Length::(8UC1, 1024) 0.710 ms 0.689 ms 1.03
dot::MatType_Length::(8SC1, 32) 0.001 ms 0.001 ms 1.00
dot::MatType_Length::(8SC1, 64) 0.003 ms 0.002 ms 1.02
dot::MatType_Length::(8SC1, 128) 0.010 ms 0.009 ms 1.03
dot::MatType_Length::(8SC1, 256) 0.037 ms 0.037 ms 1.00
dot::MatType_Length::(8SC1, 512) 0.148 ms 0.155 ms 0.95
dot::MatType_Length::(8SC1, 1024) 0.711 ms 0.696 ms 1.02
dot::MatType_Length::(16UC1, 32) 0.003 ms 0.004 ms 0.99
dot::MatType_Length::(16UC1, 64) 0.014 ms 0.013 ms 1.00
dot::MatType_Length::(16UC1, 128) 0.053 ms 0.053 ms 1.01
dot::MatType_Length::(16UC1, 256) 0.210 ms 0.211 ms 1.00
dot::MatType_Length::(16UC1, 512) 0.853 ms 0.852 ms 1.00
dot::MatType_Length::(16UC1, 1024) 3.473 ms 3.473 ms 1.00
dot::MatType_Length::(16SC1, 32) 0.003 ms 0.003 ms 1.00
dot::MatType_Length::(16SC1, 64) 0.013 ms 0.013 ms 1.00
dot::MatType_Length::(16SC1, 128) 0.053 ms 0.053 ms 1.00
dot::MatType_Length::(16SC1, 256) 0.210 ms 0.211 ms 1.00
dot::MatType_Length::(16SC1, 512) 0.854 ms 0.851 ms 1.00
dot::MatType_Length::(16SC1, 1024) 3.471 ms 3.474 ms 1.00
dot::MatType_Length::(32SC1, 32) 0.003 ms 0.003 ms 1.00
dot::MatType_Length::(32SC1, 64) 0.013 ms 0.013 ms 1.00
dot::MatType_Length::(32SC1, 128) 0.051 ms 0.050 ms 1.01
dot::MatType_Length::(32SC1, 256) 0.201 ms 0.202 ms 0.99
dot::MatType_Length::(32SC1, 512) 0.880 ms 0.860 ms 1.02
dot::MatType_Length::(32SC1, 1024) 3.445 ms 3.461 ms 1.00
dot::MatType_Length::(32FC1, 32) 0.001 ms 0.001 ms 1.06
dot::MatType_Length::(32FC1, 64) 0.003 ms 0.003 ms 1.06
dot::MatType_Length::(32FC1, 128) 0.010 ms 0.010 ms 0.98
dot::MatType_Length::(32FC1, 256) 0.040 ms 0.040 ms 1.00
dot::MatType_Length::(32FC1, 512) 0.372 ms 0.352 ms 1.06
dot::MatType_Length::(32FC1, 1024) 1.612 ms 1.587 ms 1.02

Jetson-TX2

Name of Test before after x-factor
Mat_Transform::Size_MatType::(127x61, 8UC3) 0.100 ms 0.084 ms 1.20
Mat_Transform::Size_MatType::(127x61, 8SC3) 0.142 ms 0.607 ms 0.23
Mat_Transform::Size_MatType::(127x61, 16UC3) 0.128 ms 0.103 ms 1.24
Mat_Transform::Size_MatType::(127x61, 16SC3) 0.156 ms 0.183 ms 0.85
Mat_Transform::Size_MatType::(127x61, 32SC3) 0.132 ms 0.090 ms 1.47
Mat_Transform::Size_MatType::(127x61, 32FC3) 0.026 ms 0.026 ms 1.00
Mat_Transform::Size_MatType::(127x61, 64FC3) 0.122 ms 0.122 ms 1.00
Mat_Transform::Size_MatType::(640x480, 8UC3) 3.896 ms 3.204 ms 1.22
Mat_Transform::Size_MatType::(640x480, 8SC3) 5.526 ms 24.191 ms 0.23
Mat_Transform::Size_MatType::(640x480, 16UC3) 6.972 ms 10.577 ms 0.66
Mat_Transform::Size_MatType::(640x480, 16SC3) 6.114 ms 8.799 ms 0.69
Mat_Transform::Size_MatType::(640x480, 32SC3) 5.233 ms 3.574 ms 1.46
Mat_Transform::Size_MatType::(640x480, 32FC3) 1.217 ms 1.213 ms 1.00
Mat_Transform::Size_MatType::(640x480, 64FC3) 2.730 ms 2.722 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 8UC3) 11.759 ms 9.629 ms 1.22
Mat_Transform::Size_MatType::(1280x720, 8SC3) 16.653 ms 72.203 ms 0.23
Mat_Transform::Size_MatType::(1280x720, 16UC3) 16.969 ms 12.406 ms 1.37
Mat_Transform::Size_MatType::(1280x720, 16SC3) 18.461 ms 21.957 ms 0.84
Mat_Transform::Size_MatType::(1280x720, 32SC3) 15.676 ms 10.830 ms 1.45
Mat_Transform::Size_MatType::(1280x720, 32FC3) 3.743 ms 3.747 ms 1.00
Mat_Transform::Size_MatType::(1280x720, 64FC3) 8.150 ms 8.110 ms 1.00
Mat_Transform::Size_MatType::(1920x1080, 8UC3) 26.586 ms 21.820 ms 1.22
Mat_Transform::Size_MatType::(1920x1080, 8SC3) 37.344 ms 162.120 ms 0.23
Mat_Transform::Size_MatType::(1920x1080, 16UC3) 34.042 ms 27.949 ms 1.22
Mat_Transform::Size_MatType::(1920x1080, 16SC3) 41.296 ms 49.485 ms 0.83
Mat_Transform::Size_MatType::(1920x1080, 32SC3) 35.474 ms 24.269 ms 1.46
Mat_Transform::Size_MatType::(1920x1080, 32FC3) 8.386 ms 8.338 ms 1.01
Mat_Transform::Size_MatType::(1920x1080, 64FC3) 18.535 ms 18.668 ms 0.99
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC1) 0.451 ms 0.451 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC1) 0.506 ms 0.699 ms 0.72
ScaleAdd::OCL_ScaleAddFixture::(640x480, 8UC4) 1.888 ms 1.916 ms 0.99
ScaleAdd::OCL_ScaleAddFixture::(640x480, 32FC4) 2.109 ms 2.065 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC1) 1.411 ms 1.416 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC1) 1.575 ms 1.601 ms 0.98
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 8UC4) 5.712 ms 5.695 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1280x720, 32FC4) 6.311 ms 6.628 ms 0.95
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC1) 3.226 ms 3.233 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC1) 3.588 ms 3.645 ms 0.98
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 8UC4) 12.780 ms 12.786 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(1920x1080, 32FC4) 14.584 ms 13.963 ms 1.04
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC1) 12.756 ms 12.777 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC1) 14.215 ms 13.936 ms 1.02
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 8UC4) 51.101 ms 50.888 ms 1.00
ScaleAdd::OCL_ScaleAddFixture::(3840x2160, 32FC4) 57.113 ms 58.549 ms 0.98
Transform::OCL_TransformFixture::(640x480, 8UC3) 3.917 ms 3.245 ms 1.21
Transform::OCL_TransformFixture::(640x480, 8SC3) 5.559 ms 24.153 ms 0.23
Transform::OCL_TransformFixture::(640x480, 16UC3) 6.963 ms 4.167 ms 1.67
Transform::OCL_TransformFixture::(640x480, 16SC3) 6.158 ms 6.035 ms 1.02
Transform::OCL_TransformFixture::(640x480, 32SC3) 5.281 ms 3.645 ms 1.45
Transform::OCL_TransformFixture::(640x480, 32FC3) 1.221 ms 1.229 ms 0.99
Transform::OCL_TransformFixture::(640x480, 64FC3) 2.536 ms 2.496 ms 1.02
Transform::OCL_TransformFixture::(1280x720, 8UC3) 11.765 ms 9.672 ms 1.22
Transform::OCL_TransformFixture::(1280x720, 8SC3) 16.742 ms 72.289 ms 0.23
Transform::OCL_TransformFixture::(1280x720, 16UC3) 39.052 ms 12.433 ms 3.14
Transform::OCL_TransformFixture::(1280x720, 16SC3) 18.342 ms 17.668 ms 1.04
Transform::OCL_TransformFixture::(1280x720, 32SC3) 15.642 ms 10.845 ms 1.44
Transform::OCL_TransformFixture::(1280x720, 32FC3) 3.764 ms 3.753 ms 1.00
Transform::OCL_TransformFixture::(1280x720, 64FC3) 7.496 ms 7.425 ms 1.01
Transform::OCL_TransformFixture::(1920x1080, 8UC3) 26.585 ms 21.883 ms 1.21
Transform::OCL_TransformFixture::(1920x1080, 8SC3) 37.280 ms 161.932 ms 0.23
Transform::OCL_TransformFixture::(1920x1080, 16UC3) 87.757 ms 114.162 ms 0.77
Transform::OCL_TransformFixture::(1920x1080, 16SC3) 41.193 ms 40.947 ms 1.01
Transform::OCL_TransformFixture::(1920x1080, 32SC3) 35.165 ms 24.329 ms 1.45
Transform::OCL_TransformFixture::(1920x1080, 32FC3) 8.375 ms 8.395 ms 1.00
Transform::OCL_TransformFixture::(1920x1080, 64FC3) 16.652 ms 16.539 ms 1.01
Transform::OCL_TransformFixture::(3840x2160, 8UC3) 257.954 ms 86.485 ms 2.98
Transform::OCL_TransformFixture::(3840x2160, 8SC3) 148.911 ms 648.125 ms 0.23
Transform::OCL_TransformFixture::(3840x2160, 16UC3) 351.434 ms 456.504 ms 0.77
Transform::OCL_TransformFixture::(3840x2160, 16SC3) 164.754 ms 197.188 ms 0.84
Transform::OCL_TransformFixture::(3840x2160, 32SC3) 140.365 ms 96.797 ms 1.45
Transform::OCL_TransformFixture::(3840x2160, 32FC3) 33.077 ms 33.058 ms 1.00
Transform::OCL_TransformFixture::(3840x2160, 64FC3) 66.105 ms 65.979 ms 1.00
UMatDot::OCL_UMatDotFixture::(640x480, 8UC1) 0.194 ms 0.208 ms 0.94
UMatDot::OCL_UMatDotFixture::(640x480, 32FC1) 0.467 ms 0.460 ms 1.02
UMatDot::OCL_UMatDotFixture::(640x480, 8UC3) 0.586 ms 0.627 ms 0.94
UMatDot::OCL_UMatDotFixture::(640x480, 32FC3) 1.488 ms 1.525 ms 0.98
UMatDot::OCL_UMatDotFixture::(640x480, 8UC4) 0.787 ms 0.843 ms 0.93
UMatDot::OCL_UMatDotFixture::(640x480, 32FC4) 1.507 ms 1.518 ms 0.99
UMatDot::OCL_UMatDotFixture::(1280x720, 8UC1) 0.587 ms 0.629 ms 0.93
UMatDot::OCL_UMatDotFixture::(1280x720, 32FC1) 1.106 ms 1.128 ms 0.98
UMatDot::OCL_UMatDotFixture::(1280x720, 8UC3) 1.779 ms 1.922 ms 0.93
UMatDot::OCL_UMatDotFixture::(1280x720, 32FC3) 3.487 ms 3.473 ms 1.00
UMatDot::OCL_UMatDotFixture::(1280x720, 8UC4) 2.356 ms 2.534 ms 0.93
UMatDot::OCL_UMatDotFixture::(1280x720, 32FC4) 4.647 ms 4.601 ms 1.01
UMatDot::OCL_UMatDotFixture::(1920x1080, 8UC1) 1.308 ms 1.419 ms 0.92
UMatDot::OCL_UMatDotFixture::(1920x1080, 32FC1) 2.597 ms 2.631 ms 0.99
UMatDot::OCL_UMatDotFixture::(1920x1080, 8UC3) 3.951 ms 4.266 ms 0.93
UMatDot::OCL_UMatDotFixture::(1920x1080, 32FC3) 7.871 ms 7.881 ms 1.00
UMatDot::OCL_UMatDotFixture::(1920x1080, 8UC4) 5.256 ms 5.681 ms 0.93
UMatDot::OCL_UMatDotFixture::(1920x1080, 32FC4) 10.357 ms 10.371 ms 1.00

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

merge with opencv/opencv_extra#400

@tomoaki0705
tomoaki0705 force-pushed the universalMatmul branch 4 times, most recently from 5ea32ec to 0f652cc Compare October 25, 2017 09:48
@tomoaki0705

Copy link
Copy Markdown
Contributor Author

So, after all this work, I had to give up NEON version of dotProduct
I had to add "accumulate version" of universal intrinsic v_dotprod, but the behavior of this intrinsic was unique on NEON only. Thus, it wasn't universal at all (ex: test fails only on NEON)

Using the current v_dotprod adds extra computation on ARM platform, which degrades the performance on ARM
Still, skipping the test of v_dotprod doesn't seem to be a good idea either.
So, I had to go with 3rd choice, keep the current NEON implementation in dotProd.

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

Now this PR is ready for review

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

Something is wrong with Debug and ARM version.
Debug seems it's an too much accumulation.
I may increase the eps for this.

The problem is the ARM version
It's showing error on 32S which is totally independent from floating-point numbers.
Further more, the 32S version has no SIMD part.
I'm bit lost about this, can anyone suggest me a clue, please ?

Probably It's better to sleep and re-check tomorrow..

@alalek

alalek commented Oct 31, 2017

Copy link
Copy Markdown
Member

Error message:

The difference between expect_max and actual_max is 0.00390625, which exceeds eps, where
expect_max evaluates to 50703.4140625,
actual_max evaluates to 50703.41015625, and
eps evaluates to 9.9999999999999995e-07.

This usually means that check condition is wrong - it uses absolute diff value instead of relative.

-SANITY_CHECK(dst, 1e-6);
+SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);

@tomoaki0705
tomoaki0705 force-pushed the universalMatmul branch 4 times, most recently from 8a4ba62 to 830a998 Compare November 1, 2017 03:07

OCL_TEST_CYCLE() cv::transform(src, dst, mtx);

SANITY_CHECK(dst, 1e-6);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably this check should be changed too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you !
Fixed and pushed

@alalek alalek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please add separate commit with new perf tests without implementation changes (to measure performance with old and new implementation)?

Comment thread modules/core/perf/perf_mat.cpp Outdated
randu(mtx, 0, 1);
if (CV_MAT_DEPTH(type) < CV_32F)
{
src &= mask;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On some situation, the sanity check was raising error.
It seems that the final result was larger than the maximum of int
The RNG was filling all 32bits of the input, so in some cases, the transform ends in following process,
0x8fffffff * 1 + 0x8fffffff * 1 + 1
which is clearly larger than the maximum of int.

If there's a way to restrict the range of the input matrix, that would be great, but this was the best way I know.

Does this make sense ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

randu(src, 0, 0xffffff); // need to adjust max value for different types 8U/8S, 16U/16S, 32S
                         // perhaps 30 would work for all types (30*1+30*1+30*1+1)
declare.in(src).out(dst); // without WARMUP_RNG (default is WARMUP_READ)

Perhaps we should use fixed values of transform matrix instead of random.

@tomoaki0705

Copy link
Copy Markdown
Contributor Author

@alalek , thank you for the review.
I separated the PR to 2 commits.

Best.

  * add performance tests for transform and dotProduct
  * add test Core_TransformLargeTest for 8u version of transform
  * use universal intrinsic instead of raw intrinsic
  * remove unused templated function
  * add v_matmuladd which multiply 3x3 matrix and add 3x1 vector
  * add v_rotate_left/right in universal intrinsic
  * suppress intrinsic on some function and platform
  * add pure SW implementation of new universal intrinsics
  * add test for new universal intrinsics
Comment thread modules/core/src/matmul.cpp Outdated
{
// load 4 pixels
v_uint16x8 v0_16 = v_load(src + x); // b0 g0 r0 b1 g1 r1 b2 g2
v_uint16x8 v2_16 = v_load(src + x + cWidth * 2); // r2 b3 g3 r3 0 0 0 0

@alalek alalek Nov 8, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is no 0,0,0,0 values - it is out of buffer reading.

We currently don't have v_load_low (similar to v_store_low) intrinsic to use it here (see #10083).

Something like this should work somehow:

            // load 4 pixels
            v_uint16x8 v0_16 = v_load(src + x);              // b0 g0 r0 b1 g1 r1 b2 g2
            v_uint16x8 v2_16 = v_load(src + x + cWidth * 3 - 8); // g1 r1 b2 g2 r2 b3 g3 r3

            // expand to 4 vectors
            v_uint32x4 v0_32, v1_32, v2_32, v3_32, dummy_32;
            v_expand(v_rotate_right<3>(v0_16), v1_32, dummy_32);         // b1 g1 r1
            v_expand(v_rotate_right<5>(v2_16), v3_32, dummy_32);         // b3 g3 r3
            v_expand(v_rotate_right<2>(v2_16), v2_32, dummy_32);         // b2 g2 r2
            v_expand(v0_16, v0_32, dummy_32);                            // b0 g0 r0

BTW, Did you try to use this function?

void v_load_deinterleave(const ushort* ptr, v_uint16x8& a, v_uint16x8& b, v_uint16x8& c)

(but it loads 8 pixels instead of 4)

@tomoaki0705
tomoaki0705 force-pushed the universalMatmul branch 2 times, most recently from 9e020df to 17ecd46 Compare November 16, 2017 02:01
{
#if CV_SSE2
if( USE_SSE2 && scn == 3 && dcn == 3 )
#if CV_SIMD128 && !defined(__aarch64__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tomoaki0705 Just for clarification, why code is disabled for __aarch64__? performance regressions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I disabled on __aarch64__ for performance reason.
Auto optimization of compiler matched well for 16U on 64bit ARM

An example of measurement from Mat_Transform::Size_MatType::(1920x1080, 16UC3) on several __aarch64__ platform.
The column "after" stands for universal intrinsic and "before" stands for pure C++ code with compiler optimization.
The x-factor had similar value on every size.

platform before after x-factor
Jetson-TX1 64.104 ms 117.306 ms 0.55
Jetson-TX2 47.393 ms 102.986 ms 0.46
ODROID-C2 145.647 ms 176.398 ms 0.83

@alalek
alalek merged commit 3cbe60c into opencv:master Nov 20, 2017
@tomoaki0705
tomoaki0705 deleted the universalMatmul branch November 20, 2017 23:48
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* add accuracy test and performance check for matmul
  * add performance tests for transform and dotProduct
  * add test Core_TransformLargeTest for 8u version of transform

* remove raw SSE2/NEON implementation from matmul.cpp
  * use universal intrinsic instead of raw intrinsic
  * remove unused templated function
  * add v_matmuladd which multiply 3x3 matrix and add 3x1 vector
  * add v_rotate_left/right in universal intrinsic
  * suppress intrinsic on some function and platform
  * add pure SW implementation of new universal intrinsics
  * add test for new universal intrinsics

* core: prevent memory access after the end of buffer

* fix perf tests
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