Commit Graph

47 Commits

Author SHA1 Message Date
Alexander Alekhin
6ea29a7696 cmake: prefer using CMAKE_SYSTEM_PROCESSOR / CMAKE_SIZEOF_VOID_P
Drop:
- discouraged CMAKE_CL_64
- MSVC64
- MINGW64
2019-12-11 00:21:10 +00:00
Alexander Alekhin
21c38bbdaf cmake(cpu optmizations): fix cleanup of OPENCV_DEPENDANT_TARGETS_* vars 2019-11-02 10:34:54 +00:00
Fei Wu
90af2835a2 Fix issue 15730. 2019-10-19 00:36:18 +08:00
Alexander Alekhin
bdc097495a fix avx512 detection
- renamed Cascade Lake AVX512_CEL => AVX512_CLX (align with Intel SDE tool)
- fixed CLX instruction sets (no IFMA/VBMI)
- added flag to bypass CPU baseline check: OPENCV_SKIP_CPU_BASELINE_CHECK
2019-10-05 11:03:57 +00:00
mipsopen-fwu
b1ea91d8bd Merge pull request #15422 from mipsopen-fwu:msa-dev
* Added MSA implementations for mips platforms. Intrinsics for MSA and build scripts for MIPS platforms are added.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Removed some unused code in mips.toolchain.cmake.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Added comments for mips toolchain configuration and disabled compiling warnings for libpng.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Fixed the build error of unsupported opcode 'pause' when mips isa_rev is less than 2.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* 1. Removed FP16 related item in MSA option defines in OpenCVCompilerOptimizations.cmake.
2. Use CV_CPU_COMPILE_MSA instead of __mips_msa for MSA feature check in cv_cpu_dispatch.h.
3. Removed hasSIMD128() in intrin_msa.hpp.
4. Define CPU_MSA as 150.
Signed-off-by: Fei Wu <fwu@wavecomp.com>

* 1. Removed unnecessary CV_SIMD128_64F guarding in intrin_msa.hpp.
2. Removed unnecessary CV_MSA related code block in dotProd_8u().

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* 1. Defined CPU_MSA_FLAGS_ON as "-mmsa".
2. Removed CV_SIMD128_64F guardings in intrin_msa.hpp.

Signed-off-by: Fei Wu <fwu@wavecomp.com>

* Removed unused msa_mlal_u16() and msa_mlal_s16 from msa_macros.h.

Signed-off-by: Fei Wu <fwu@wavecomp.com>
2019-09-20 19:52:48 +03:00
luz.paz
57ccf14952 FIx misc. source and comment typos
Found via `codespell -q 3 -S ./3rdparty,./modules -L amin,ang,atleast,dof,endwhile,hist,uint`

backporting of commit: 32aba5e64b
2019-08-15 13:09:52 +03:00
Tomoaki Teshima
db6a6ccaba re-enable CPU_BASELINE=FP16 on Armv7 platform 2019-07-02 21:57:15 +09:00
Vitaly Tuzov
d2aadabc5e Merge pull request #14743 from terfendail:wui512_fixvswarn
Fix for MSVS2019 build warnings (#14743)

* AVX512 arch support for MSVS

* Fix for MSVS2019 build warnings: updated integral() AVX512 implementation

* Fix for MSVS2019 build warnings: reworked v_rotate_right AVX512 implementation

* fix indentation
2019-06-11 23:07:39 +03:00
Alexander Alekhin
d8b42792a6 cmake: update ENABLE_FAST_MATH option 2019-05-30 19:44:35 +03:00
Alexander Alekhin
6b6222bfbb cmake: support CPU_DISPATCH=ALL, fix misused CPU_DISPATCH
- CPU_DISPATCH_FINAL should be used for filtering
2019-05-05 11:24:21 +00:00
Sayed Adel
5a77f4cee3 Merge pull request #14007 from seiko2plus:core_avx512_infa
* core: improve AVX512 infrastructure by adding more CPU features groups

* cmake: use groups for AVX512 optimization flags

* core: remove gap in CPU flags enumeration

* cmake: restore default CPU_DISPATCH
2019-05-05 14:19:49 +03:00
Alexander Alekhin
fab0eb0d75 cmake: fix compiler flags (CPU_BASELINE_REQUIRED=xxx + CPU_BASELINE=DETECT) 2018-11-28 14:04:03 +03:00
Sayed Adel
474a0dac49 core: several improves and fixes on ppc64le infrastructure
- add infrastructure support for Power9/VSX3
  - fix missing VSX flags on GCC4.9 and CLANG4(#13210, #13222)
  - fix disable VSX optimzation on GCC by using flag ENABLE_VSX
  - flag ENABLE_VSX is deprecated now, use CPU_BASELINE, CPU_DISPATCH instead
  - add VSX3 to arithmetic dispatchable flags
2018-11-20 15:28:46 +00:00
Alexander Alekhin
c54676d625 cmake: fix supporting of legacy flags 2018-11-12 14:11:57 +03:00
Alexander Alekhin
7e2c65ce3c Merge pull request #12925 from alalek:fix_cmake_conditions 2018-10-25 11:52:39 +00:00
Alexander Alekhin
0f07edded6 cmake: don't change baseline compiler flags in 'detection' mode 2018-10-24 03:54:31 +00:00
Alexander Alekhin
d6a8e08acc cmake: fix variable expand in CMake conditions 2018-10-21 15:02:40 +00:00
Alexander Alekhin
3f302cabb8 core(test): intrinsic tests for all dispatched CPU optimizations
- tests for both SIMD128 / SIMD256
- different dispatched + baseline(SIMD128) intrinsics
2018-08-01 13:50:42 +03:00
Maksim Shabunin
597db69151 ts: test case list is printed after cmd line parsing, refactored 2018-07-26 16:43:43 +03:00
Dmitry Kurtaev
0c4d5ffecd Do not copy cv_cpu_helper.h to parent if OpenCV is a submodule 2018-07-24 09:36:28 +03:00
Alexander Alekhin
56222f35bb cmake: fix CPU_BASELINE_FINAL filling
- remove duplicates
- restore "always on" missing entries
- fix FP16 detection on MSVC
2018-04-26 17:13:42 +03:00
Alexander Alekhin
ff6ce6cd01 cmake: change CPU_BASELINE=DETECT for MacOSX 2018-04-23 19:42:49 +03:00
Alexander Alekhin
97882d03cc core: fix FP16 conversion with CV_DISABLE_OPTIMIZATION option
Reproducer:
    cmake -DCPU_BASELINE=AVX2 -DCV_DISABLE_OPTIMIZATION=ON ...
2018-04-18 14:13:03 +03:00
Alexander Alekhin
5b867b6f1f cmake: fix CPU_BASELINE=NATIVE on MSVS 2018-04-17 19:34:35 +03:00
Alexander Alekhin
8388b630ac Merge pull request #11167 from alalek:cmake_compiler_vars 2018-03-28 12:38:31 +00:00
Alexander Alekhin
08941b7890 cmake: avoid amending of CMAKE_COMPILER_IS_[GNUCXX|CLANGCXX|CCACHE] vars
- Recommended compiler checks:
  - GCC: CV_GCC
  - Clang: CV_CLANG
- fixed problem with CMAKE_CXX_COMPILER_ID=Clang/AppleClang mess on MacOSX
  Details: cmake --help-policy CMP0025
- do not declare Clang as GCC compiler
2018-03-27 16:16:59 +03:00
Alexander Alekhin
6c051a55e5 cmake: don't add include <module>/src directory to avoid conflicts
during opencv_world builds
2018-03-19 11:14:15 +03:00
Alexander Alekhin
0b4428e92f cmake: AVX512 with clang 2018-02-27 15:46:09 +03:00
Alexander Alekhin
14032c6653 cmake: reset __content variable if file doesn't exist
Resolves CMake error after relaunch with updated source code:
Cannot find source file:
    modules/dnn/layers/layers_common.avx512_skx.cpp
2018-02-12 17:30:53 +03:00
Alexander Alekhin
5a791e6e06 cmake: update reporting of excluded dispatching files (#10711)
* cmake: add ocv_get_smart_file_name() macro

* cmake: avoid adding files for unavailable dispatch modes
2018-02-12 14:48:20 +03:00
Alexander Alekhin
73891d619a
Merge pull request #10700 from alalek:cpu_dispatch_axv512
* cmake: enable CPU dispatching for AVX512 (SKX)

* cmake: update handling of unsupported flags/modes
2018-01-26 21:59:47 +03:00
Alexander Alekhin
7d67d60fb1 cmake(opt): AVX512_SKX 2017-12-29 07:18:11 +00:00
Alexander Alekhin
898ca38257 cmake: AVX512 -> AVX_512F 2017-12-28 15:20:27 +00:00
Arjan van de Ven
fc8e848a54 Add basic plumbing for AVX512 support
The opencv infrastructure mostly has the basics for supporting avx512 math functions,
but it wasn't hooked up (likely due to lack of users)

In order to compile the DNN functions for AVX512, a few things need to be hooked up
and this patch does that

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
2017-12-25 21:06:52 +00:00
Alexander Alekhin
89d855c0b7 cmake: update optimization filter 2017-11-27 18:18:19 +03:00
Maksim Shabunin
93813fec6e VisualStudio: Added solution folders for dispatched optimization targets 2017-10-30 18:30:20 +03:00
Gregory Morse
d30a0c6f03 Merge pull request #9856 from GregoryMorse:patch-1
* Update OpenCVCompilerOptimizations.cmake

Neon not supported on MSVC ARM breaking build fix

* Update OpenCVCompilerOptimizations.cmake

Whitespace

* Update intrin.hpp

Many problems in MSVC ARM builds (at least on VS2017) being fixed in this PR now.

C:\Users\Gregory\DOCUME~1\MYLIBR~1\OPENCV~3\opencv\sources\modules\core\include\opencv2/core/hal/intrin.hpp(444): error C3861: '_tzcnt_u32': identifier not found

* Update hal_replacement.hpp

Passing variadic expansion in a macro to another macro does not work properly in MSVC and a famous known workaround is hereby applied.  Discussion of it: https://stackoverflow.com/questions/5134523/msvc-doesnt-expand-va-args-correctly
Only needed the fix for ARM builds: TEGRA_ macros are used for cv_hal_ functions in the carotene library.

C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\core\src\arithm.cpp(2378): warning C4003: not enough actual parameters for macro 'TEGRA_ADD'
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\core\src\arithm.cpp(2378): error C2143: syntax error: missing ')' before ','
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\core\src\arithm.cpp(2378): error C2059: syntax error: ')'

* Update hal_replacement.hpp

All hal_replacement's using carotene\hal\tegra_hal.hpp TEGRA_ functions as macros preprocessed by variadic macros should be changed, identical as was done in core.
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\imgproc\src\color.cpp(9604): warning C4003: not enough actual parameters for macro 'TEGRA_CVTBGRTOBGR'
C:\Users\Gregory\Documents\My Libraries\opencv330\opencv\sources\modules\imgproc\src\color.cpp(9604): error C2059: syntax error: '=='

* Update OpenCVCompilerOptimizations.cmake

* Update hal_replacement.hpp

* Update hal_replacement.hpp
2017-10-16 12:12:35 +03:00
Sayed Adel
d077778074 Added support for VSX 2017-10-09 00:32:29 +00:00
Alexander Alekhin
4f558e8b89 cmake: added "SSE4_2" into default CPU dispatch 2017-07-02 22:45:09 +00:00
Alexander Alekhin
f8a75c4361 dispatch: added CV_TRY_${OPT} macro, fix dnn build
- 1: OPT is available directly or via dispatcher
- 0: optimization is not compiled at all
2017-06-27 17:05:15 +03:00
Alexander Alekhin
6b7a1d4dde build: disable AVX512
Currently it is not supported.
All builds are broken with enabled AVX512 option.
2017-06-26 00:31:24 +03:00
Alexander Alekhin
3e3e2dd512 android: make optional "cpufeatures", build fixes for NDK r15 2017-06-21 13:34:19 +03:00
Alexander Alekhin
c3bea59a76 cmake: set minimal CPU instruction to SSE3 (x64) 2017-06-11 03:51:53 +00:00
Alexander Alekhin
cdc7f10767 cmake: dispatcher: add handling of include dirs
from linked targets of base modules
2017-04-27 18:11:32 +03:00
Alexander Alekhin
c90dee668f cmake: fix optimization filter
Check file name only:
    Excluding from source files list (optimization is disabled):
    C:/Code/SrcExt/OpenCV/Buildv3.2_x64/modules/core/opencl_kernels_core.cpp
2017-04-12 18:27:20 +03:00
Alexander Alekhin
17e5e4cd5a core: CPU target dispatcher update
- use suffixes like '.avx.cpp'
- added CMake-generated files for '.simd.hpp' optimization approach
- wrap HAL intrinsic headers into separate namespaces for different build flags
- automatic vzeroupper insertion (via CV_INSTRUMENT_REGION macro)
2017-03-23 16:12:11 +03:00
Alexander Alekhin
e16227b53c cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00