opencv/modules/dnn/test
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
..
cityscapes_semsegm_test_enet.py Misc. modules/ typos 2018-02-12 07:09:43 -05:00
imagenet_cls_test_alexnet.py python: better Python 3 support 2018-05-11 17:32:04 +03:00
imagenet_cls_test_googlenet.py Misc. modules/ typos 2018-02-12 07:09:43 -05:00
imagenet_cls_test_inception.py Misc. modules/ typos 2018-02-12 07:09:43 -05:00
npy_blob.cpp dnn: fix precomp.hpp usage 2018-02-28 17:06:26 +03:00
npy_blob.hpp dnn: fix precomp.hpp usage 2018-02-28 17:06:26 +03:00
pascal_semsegm_test_fcn.py documentation: avoid links to 'master' branch from 3.4 maintenance branch (2) 2018-05-31 19:30:56 +03:00
test_backends.cpp Merge pull request #12703 from wzw-intel:vkcom 2018-10-29 17:51:26 +03:00
test_caffe_importer.cpp Added test caffe importer layers sharing weights 2018-10-15 11:42:26 +02:00
test_common.hpp Merge pull request #12703 from wzw-intel:vkcom 2018-10-29 17:51:26 +03:00
test_darknet_importer.cpp Merge pull request #12249 from kopytjuk:feature/region-layer-batch-mode 2018-09-12 13:29:43 +03:00
test_googlenet.cpp dnn(test): drop CV_ENUM for DNNBackend / DNNTarget 2018-07-10 15:12:01 +03:00
test_halide_layers.cpp Merge pull request #12650 from alalek:dnn_ocl4dnn_verification_test 2018-09-27 12:54:23 +03:00
test_ie_models.cpp Enable Myriad device for OpenVINO models test 2018-09-18 13:49:24 +03:00
test_layers.cpp Replace Darknet's Reorg to permute layer 2018-09-12 18:13:39 +03:00
test_main.cpp Merge pull request #11897 from Jakub-Golinowski:hpx_backend 2018-08-31 16:23:26 +03:00
test_misc.cpp Merge pull request #12703 from wzw-intel:vkcom 2018-10-29 17:51:26 +03:00
test_nms.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_onnx_importer.cpp Merge pull request #12596 from l-bat:l-bat/shufflenet_onnx 2018-10-08 22:18:41 +03:00
test_precomp.hpp Enable Myriad tests with batch size > 1 2018-09-05 10:45:09 +03:00
test_tf_importer.cpp Change default value of crop argument of blobFromImage from true to false 2018-09-12 19:02:58 +03:00
test_torch_importer.cpp Fix ENet test 2018-10-19 17:43:26 +03:00