summaryrefslogtreecommitdiff
path: root/utests
diff options
context:
space:
mode:
authorChuanbo Weng <chuanbo.weng@intel.com>2017-06-14 00:54:13 +0800
committerYang Rong <rong.r.yang@intel.com>2017-07-12 18:29:19 +0800
commit9cb7ff4c285d892616595e5a43793f4d1408eca4 (patch)
tree335679b4a0e2fb166ae5bb0517a871cde6071529 /utests
parent4933bf9212c9721ca2b0e615097ed2b53fec51c3 (diff)
Implement extension cl_intel_device_side_avc_motion_estimation.
This patch mainly contains: 1. built-in function __gen_ocl_ime implementation. 2. Lots of built-in functions of cl_intel_device_side_avc_motion_estimation are implemented. 3. This extension is required to run in simd16 mode. v2: move the utests to seprate patches one by one; as all the utests has extension function check, no need to put them in stand alone utest; uncomment the self test; fix extension check logic issue, should be && instead of ||. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Signed-off-by: Xionghu Luo <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests')
-rw-r--r--utests/utest_helper.cpp18
-rw-r--r--utests/utest_helper.hpp3
2 files changed, 21 insertions, 0 deletions
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
index 2e826bc6..52d17146 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -895,6 +895,24 @@ int cl_check_motion_estimation(void)
return 1;
}
+int cl_check_device_side_avc_motion_estimation(void)
+{
+ std::string extStr;
+ size_t param_value_size;
+ OCL_CALL(clGetDeviceInfo, device, CL_DEVICE_EXTENSIONS, 0, 0, &param_value_size);
+ std::vector<char> param_value(param_value_size);
+ OCL_CALL(clGetDeviceInfo, device, CL_DEVICE_EXTENSIONS, param_value_size,
+ param_value.empty() ? NULL : &param_value.front(), &param_value_size);
+ if (!param_value.empty())
+ extStr = std::string(&param_value.front(), param_value_size-1);
+
+ if (std::strstr(extStr.c_str(), "cl_intel_device_side_avc_motion_estimation") == NULL) {
+ printf("No cl_intel_device_side_avc_motion_estimation, Skip!");
+ return 0;
+ }
+ return 1;
+}
+
int cl_check_subgroups(void)
{
std::string extStr;
diff --git a/utests/utest_helper.hpp b/utests/utest_helper.hpp
index c3040087..fe6d1bbb 100644
--- a/utests/utest_helper.hpp
+++ b/utests/utest_helper.hpp
@@ -315,6 +315,9 @@ extern clGetKernelSubGroupInfoKHR_cb* utestclGetKernelSubGroupInfoKHR;
/* Check if cl_intel_motion_estimation enabled. */
extern int cl_check_motion_estimation(void);
+/* Check if cl_intel_device_side_avc_motion_estimation enabled. */
+extern int cl_check_device_side_avc_motion_estimation(void);
+
/* Check is cl version 2.0 or Beignet extension. */
extern int cl_check_ocl20(bool or_beignet = true);