From 402740da11c4fd2a9dc7aee5dadf3b1fdda0afde Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 20 Apr 2021 11:26:21 +0100 Subject: Add support for CLVK This patch enables CLVK through the graph API and inside the CLScheduler. By default the Native platform is selected. Selecting CLVK can be done via --target=clvk. Resolves COMPMID-4205 and COMPMID-4206 Change-Id: Ic60744980c6b8a60e776627ea677ed46be88f656 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5475 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- src/core/CL/OpenCL.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/core/CL/OpenCL.cpp') diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp index dd9960a7b3..a7be534397 100644 --- a/src/core/CL/OpenCL.cpp +++ b/src/core/CL/OpenCL.cpp @@ -122,6 +122,7 @@ bool CLSymbols::load(const std::string &library) LOAD_FUNCTION_PTR(clGetDeviceIDs, handle); LOAD_FUNCTION_PTR(clGetMemObjectInfo, handle); LOAD_FUNCTION_PTR(clRetainEvent, handle); + LOAD_FUNCTION_PTR(clGetPlatformInfo, handle); LOAD_FUNCTION_PTR(clGetPlatformIDs, handle); LOAD_FUNCTION_PTR(clGetKernelWorkGroupInfo, handle); LOAD_FUNCTION_PTR(clGetCommandQueueInfo, handle); @@ -865,6 +866,24 @@ cl_int clRetainEvent(cl_event event) } } +cl_int clGetPlatformInfo(cl_platform_id platform, + cl_platform_info param_name, + size_t param_value_size, + void *param_value, + size_t *param_value_size_ret) +{ + arm_compute::CLSymbols::get().load_default(); + auto func = arm_compute::CLSymbols::get().clGetPlatformInfo_ptr; + if(func != nullptr) + { + return func(platform, param_name, param_value_size, param_value, param_value_size_ret); + } + else + { + return CL_OUT_OF_RESOURCES; + } +} + cl_int clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms) { arm_compute::CLSymbols::get().load_default(); -- cgit v1.2.1