Merge pull request #8104 from insoow:master
authorinsoow <insoo.woo@intel.com>
Wed, 19 Apr 2017 09:57:54 +0000 (02:57 -0700)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Wed, 19 Apr 2017 09:57:54 +0000 (12:57 +0300)
commit2922738b6dd8211236baacc0b25ec5e6d86e939f
tree8f216e97ff503b2364a35c081dbbca368849ab5a
parentcea0e94376eff179115ee30fa67c4c4745375e7b
Merge pull request #8104 from insoow:master

Gemm kernels for Intel GPU (#8104)

* Fix an issue with Kernel object reset release when consecutive Kernel::run calls

Kernel::run launch OCL gpu kernels and set a event callback function
to decreate the ref count of UMat or remove UMat when the lauched workloads
are completed. However, for some OCL kernels requires multiple call of
Kernel::run function with some kernel parameter changes (e.g., input
and output buffer offset) to get the final computation result.
In the case, the current implementation requires unnecessary
synchronization and cleanupMat.

This fix requires the user to specify whether there will be more work or not.
If there is no remaining computation, the Kernel::run will reset the
kernel object

Signed-off-by: Woo, Insoo <insoo.woo@intel.com>
* GEMM kernel optimization for Intel GEN

The optimized kernels uses cl_intel_subgroups extension for better
performance.

Note: This optimized kernels will be part of ISAAC in a code generation
way under MIT license.

Signed-off-by: Woo, Insoo <insoo.woo@intel.com>
* Fix API compatibility error

This patch fixes a OCV API compatibility error. The error was reported
due to the interface changes of Kernel::run. To resolve the issue,
An overloaded function of Kernel::run is added. It take a flag indicating
whether there are more work to be done with the kernel object without
releasing resources related to it.

Signed-off-by: Woo, Insoo <insoo.woo@intel.com>
* Renaming intel_gpu_gemm.cpp to intel_gpu_gemm.inl.hpp

Signed-off-by: Woo, Insoo <insoo.woo@intel.com>
* Revert "Fix API compatibility error"

This reverts commit 2ef427db91b6c4aec170f691c5d2e6c47d6520d7.

Conflicts:
modules/core/src/intel_gpu_gemm.inl.hpp

* Revert "Fix an issue with Kernel object reset release when consecutive Kernel::run calls"

This reverts commit cc7f9f54695dc293598addce9b9d7e345225bede.

* Fix the case of uninitialization D

When C is null and beta is non-zero, D is used without initialization.
This resloves the issue

Signed-off-by: Woo, Insoo <insoo.woo@intel.com>
* fix potential output error due to 0 * nan

Signed-off-by: Woo, Insoo <insoo.woo@intel.com>
* whitespace fix, eliminate non-ASCII symbols

* fix build warning
modules/core/include/opencv2/core/ocl.hpp
modules/core/src/intel_gpu_gemm.inl.hpp [new file with mode: 0644]
modules/core/src/matmul.cpp
modules/core/src/ocl.cpp
modules/core/src/opencl/intel_gemm.cl [new file with mode: 0644]