Skip to content

GAPI Fluid: SIMD for DivC kernel.#21474

Merged
alalek merged 2 commits intoopencv:4.xfrom
anna-khakimova:ak/simd_for_divc
Feb 2, 2022
Merged

GAPI Fluid: SIMD for DivC kernel.#21474
alalek merged 2 commits intoopencv:4.xfrom
anna-khakimova:ak/simd_for_divc

Conversation

@anna-khakimova
Copy link
Copy Markdown
Member

@anna-khakimova anna-khakimova commented Jan 19, 2022

Added SIMD for GAPI Fluid DivC kernel..

Performance report:
FluidDivCSIMD.xlsx

force_builders=Linux AVX2,Custom,Custom Win,Custom Mac
build_gapi_standalone:Linux x64=ade-0.1.1f
build_gapi_standalone:Win64=ade-0.1.1f
Xbuild_gapi_standalone:Mac=ade-0.1.1f
build_gapi_standalone:Linux x64 Debug=ade-0.1.1f

build_image:Custom=centos:7
buildworker:Custom=linux-1
build_gapi_standalone:Custom=ade-0.1.1f

Xbuild_image:Custom=ubuntu-openvino-2021.3.0:20.04
build_image:Custom Win=openvino-2021.4.1
build_image:Custom Mac=openvino-2021.2.0

buildworker:Custom Win=windows-3

test_modules:Custom=gapi,python2,python3,java
test_modules:Custom Win=gapi,python2,python3,java
test_modules:Custom Mac=gapi,python2,python3,java

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
Xtest_opencl:Custom=OFF
Xtest_bigdata:Custom=1
Xtest_filter:Custom=*

CPU_BASELINE:Custom Win=AVX512_SKX
CPU_BASELINE:Custom=SSE4_2

@anna-khakimova anna-khakimova force-pushed the ak/simd_for_divc branch 2 times, most recently from 694fedc to 152bb23 Compare January 19, 2022 13:08
Copy link
Copy Markdown
Member

@alexgiving alexgiving left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@anna-khakimova anna-khakimova force-pushed the ak/simd_for_divc branch 2 times, most recently from 9c16798 to 2b342b1 Compare January 20, 2022 09:21
@anna-khakimova anna-khakimova force-pushed the ak/simd_for_divc branch 2 times, most recently from e260def to 3481549 Compare January 24, 2022 01:16
@anna-khakimova anna-khakimova added this to the 4.6.0 milestone Jan 25, 2022
Copy link
Copy Markdown
Contributor

@dmatveev dmatveev left a comment

Choose a reason for hiding this comment

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

Approved with comments

Comment on lines +975 to +976
Buffer buffer(bufdesc);
scratch = std::move(buffer);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just wondering why it can't be a single line?

Comment on lines +1005 to +1006
for (int i = 0; i < length; ++i)
scratch[i] = static_cast<float>(scalar[i % chan]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As far as I know we always use {} even for single-line loops.

@alalek
Copy link
Copy Markdown
Member

alalek commented Jan 27, 2022

BTW, DivC gapi perf tests sporadically failed in nightly builds: http://pullrequest.opencv.org/buildbot/builders/master_openvino-opencl-win64 (Jan 24 is the last failed build, 704)

@anna-khakimova
Copy link
Copy Markdown
Member Author

anna-khakimova commented Jan 28, 2022

BTW, DivC gapi perf tests sporadically failed in nightly builds: http://pullrequest.opencv.org/buildbot/builders/master_openvino-opencl-win64 (Jan 24 is the last failed build, 704)

@alalek
I checked and found out that only GPU backend's tests failed. But this PR contains changes for Fluid backend only. The fact that the tests failed on my PR is just a coincidence.
GPU backend's test failed because our intern added the AbsExact() function for comparing GPU backend's results of the DivC operation with the OpenCV's results. But results don't have bit exactness. And they don't have to be bit exact in case of the GPU backend.

@alexgiving
Please fix GPU backend's perf test failures.

@anna-khakimova
Copy link
Copy Markdown
Member Author

anna-khakimova commented Jan 28, 2022

#21533 (review)

BTW, DivC gapi perf tests sporadically failed in nightly builds: http://pullrequest.opencv.org/buildbot/builders/master_openvino-opencl-win64 (Jan 24 is the last failed build, 704)

@alalek
This PR should fix the issue mentioned above.

@alalek alalek merged commit 1605d1d into opencv:4.x Feb 2, 2022
@alalek alalek mentioned this pull request Feb 22, 2022
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
GAPI Fluid: SIMD for DivC kernel.

* GAPI Fluid:SIMD for DivC

* Applied comment
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.

5 participants