Skip to content

make carotene respect CV_ENABLE_INTRINSICS#21312

Closed
ShuangZappar wants to merge 2656 commits intoopencv:3.4from
ShuangZappar:4.x
Closed

make carotene respect CV_ENABLE_INTRINSICS#21312
ShuangZappar wants to merge 2656 commits intoopencv:3.4from
ShuangZappar:4.x

Conversation

@ShuangZappar
Copy link
Copy Markdown

CV_ENABLE_INTRINSICS is ignored in carotene

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Ruslan Garnov and others added 30 commits September 24, 2021 14:29
…Cameras

Recover pose from different cameras (version 2)

* add recoverPose for two different cameras

* Address review comments from original PR

* Address new review comments

* Rename private api

Co-authored-by: tompollok <tom.pollok@gmail.com>
Co-authored-by: Zane <zane.huang@mail.utoronto.ca>
…demo

Add paddle humanseg demo

* fixed onnx resize op bug

* add humanseg demo for PaddlePaddle sample

* update README.md and flake8 format

* update func name

* update README.md for enviroment setup

* update README.md in the way install paddle2onnx

* update README.md

* update README.md

* add paddleseg in requirements.txt

* deal with comments

* replace picture
generate radon checkerboard

* added _make_round_rect

* added round rect to make_checkerboard_pattern

* added markers

* update docs

* removed links to findChessboardCornersSB() and added checks to markers
G-API: oneVPL (simplification) Add simple decode pipeline

* Add simple decode pipeline & add onevpl namespace

* Address some review comments

* Add compilation guard
Add ExpandDims layer of tf_importer.cpp

* Add ExpandDims to tf_importer.

* add -1 expand test case.

* Support different dimensions of input.

* Compatible with 5-dimensional NDHWC data

* Code align

* support 3-dim input.

* 3-dim bug fixed.

* fixing error of code format.
dnn : int8 quantized layers support in onnx importer

* added quantized layers support in onnx importer

* added more cases in eltwise node, some more checks

* added tests for quantized nodes

* relax thresholds for failed tests, address review comments

* refactoring based on review comments

* added support for unsupported cases and pre-quantized resnet50 test

* relax thresholds due to int8 resize layer
speech recognition sample

* speech recognition sample added.(initial commit)

* fixed typos, removed plt

* trailing whitespaces removed

* masking removed and using opencv for displaying spectrogram

* description added

* requested changes and add opencl fp16 target

* parenthesis and halide removed

* workaround 3d matrix issue

* handle multi channel audio

support for multiple files at once

* suggested changes

fix whitespaces
Crayon-new and others added 27 commits December 16, 2021 17:06
add argmax and argmin parsing for tensorflow

* add argmax and argmin for tf

* remove whitespace

* remove whitespace

* remove static_cast

Signed-off-by: Crayon-new <1349159541@qq.com>
Audio GStreamer: added support .wav .flac audio formats

* added support .wav, lossless compressed audio formats

* fixed docs

* fixes

* videoio(gstreamer-audio): extra tests, improve error handling

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
…luid

GAPI FLUID: SIMD for SubRC kernel

* SIMD for SubRC

* Reverse subrc
CV_ENABLE_INTRINSICS is ignored in carotene

function(compile_carotene)
if(";${CPU_BASELINE_FINAL};" MATCHES ";NEON;")
if(";${CPU_BASELINE_FINAL};" MATCHES ";NEON;" AND CV_ENABLE_INTRINSICS)
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.

CV_ENABLE_INTRINSICS is primary about OpenCV code (to help with debugging).

IMHO, we should not spread OpenCV-specific flags on 3rdparty code.


CPU_BASELINE_FINAL is about compiler capabilities.

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.

IMHO, Carotene should be trieted as 3rd party library and CV_ENABLE_INTRINSICS should not affect it. It's main goal is to bring HAL with NEON. Without NEON it's mostly useless. Please build OpenCV without Carotene, please use -DWITH_CAROTENE=OFF in CMake.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Could we have a single global flag that guarantee all optimization are turned off? Since CAROTENE is turned on automatically when building for Android, to avoid confusion how about making CV_DISABLE_OPTIMIZATION turning CAROTENE off as well?

Copy link
Copy Markdown
Member

@alalek alalek Jan 4, 2022

Choose a reason for hiding this comment

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

Here for WITH_CAROTENE flag: https://github.com/opencv/opencv/blob/4.5.5/CMakeLists.txt#L246

ON => (NOT CV_DISABLE_OPTIMIZATION)

(similar to WITH_EIGEN / WITH_IPP options few lines below)


Ensure to clean CMake cache between experiments.


This patch should go into 3.4 branch first.
We will merge changes from 3.4 into 4.x regularly (weekly/bi-weekly).

Please:

  • change "base" branch of this PR: 4.x => 3.4 (use "Edit" button near PR title)
  • rebase your commits from 4.x onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/4.x
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@ShuangZappar ShuangZappar changed the base branch from 4.x to 3.4 January 5, 2022 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: build/install platform: arm ARM boards related issues: RPi, NVIDIA TK/TX, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.