opencv/cmake/checks
WuZhiwen 6e3ea8b49d Merge pull request #12703 from wzw-intel:vkcom
* dnn: Add a Vulkan based backend

This commit adds a new backend "DNN_BACKEND_VKCOM" and a
new target "DNN_TARGET_VULKAN". VKCOM means vulkan based
computation library.

This backend uses Vulkan API and SPIR-V shaders to do
the inference computation for layers. The layer types
that implemented in DNN_BACKEND_VKCOM include:
Conv, Concat, ReLU, LRN, PriorBox, Softmax, MaxPooling,
AvePooling, Permute

This is just a beginning work for Vulkan in OpenCV DNN,
more layer types will be supported and performance
tuning is on the way.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/vulkan: Add FindVulkan.cmake to detect Vulkan SDK

In order to build dnn with Vulkan support, need installing
Vulkan SDK and setting environment variable "VULKAN_SDK" and
add "-DWITH_VULKAN=ON" to cmake command.

You can download Vulkan SDK from:
https://vulkan.lunarg.com/sdk/home#linux

For how to install, see
https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html
https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html
https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html
respectively for linux, windows and mac.

To run the vulkan backend, also need installing mesa driver.
On Ubuntu, use this command 'sudo apt-get install mesa-vulkan-drivers'

To test, use command '$BUILD_DIR/bin/opencv_test_dnn --gtest_filter=*VkCom*'

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/Vulkan: dynamically load Vulkan runtime

No compile-time dependency on Vulkan library.
If Vulkan runtime is unavailable, fallback to CPU path.

Use environment "OPENCL_VULKAN_RUNTIME" to specify path to your
own vulkan runtime library.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/Vulkan: Add a python script to compile GLSL shaders to SPIR-V shaders

The SPIR-V shaders are in format of text-based 32-bit hexadecimal
numbers, and inserted into .cpp files as unsigned int32 array.

* dnn/Vulkan: Put Vulkan headers into 3rdparty directory and some other fixes

Vulkan header files are copied from
https://github.com/KhronosGroup/Vulkan-Docs/tree/master/include/vulkan
to 3rdparty/include

Fix the Copyright declaration issue.

Refine OpenCVDetectVulkan.cmake

* dnn/Vulkan: Add vulkan backend tests into existing ones.

Also fixed some test failures.

- Don't use bool variable as uniform for shader
- Fix dispathed group number beyond max issue
- Bypass "group > 1" convolution. This should be support in future.

* dnn/Vulkan: Fix multiple initialization in one thread.
2018-10-29 17:51:26 +03:00
..
cpu_avx2.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_avx512.cpp CPU dispatching: additional AVX-512 check for mingw-w64 2018-02-25 15:12:53 +03:00
cpu_avx512skx.cpp CPU dispatching: additional AVX-512 check for mingw-w64 2018-02-25 15:12:53 +03:00
cpu_avx.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_fp16.cpp cmake: fix CPU_BASELINE_FINAL filling 2018-04-26 17:13:42 +03:00
cpu_neon.cpp build: replace WIN32 => _WIN32 2017-07-25 13:30:48 +03:00
cpu_popcnt.cpp cmake: fix popcnt detection 2018-04-24 12:40:25 +03:00
cpu_sse2.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_sse3.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_sse41.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_sse42.cpp cmake: fix POPCNT & SSE4.2 detection code 2017-04-26 18:59:43 +03:00
cpu_sse.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_ssse3.cpp cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cpu_vsx.cpp Added support for VSX 2017-10-09 00:32:29 +00:00
cxx11.cpp cmake: update CXX11 compiler flag 2017-07-03 16:13:12 +03:00
directx.cpp fix build with Win7 SDK 2015-07-30 23:23:01 +03:00
ffmpeg_test.cpp Fix ffmpeg detection with -D OPENCV_WARNINGS_ARE_ERRORS=ON option. 2017-07-02 01:59:41 +02:00
lapack_check.cpp core(lapack): fix build issues related to 'extern "C"' 2018-01-24 14:53:04 +03:00
opencl.cpp ocl: OpenCL headers are located in "CL" subfolder (3rdparty/include) 2016-02-11 12:44:45 +03:00
OpenCVDetectCudaArch.cu Avoid detecting dublicate CUDA archs 2018-08-16 17:40:09 +09:00
openvx_refenum_test.cpp Updated OpenVX detector and wrappers to handle Reference attribute names change 2017-03-22 16:50:38 +03:00
vfwtest.cpp
vtk_test.cpp cmake: add compilation test for VTK 2018-04-10 18:09:54 +03:00
vulkan.cpp Merge pull request #12703 from wzw-intel:vkcom 2018-10-29 17:51:26 +03:00
win32uitest.cpp