diff --git a/lite/backends/opencl/cl_runtime.cc b/lite/backends/opencl/cl_runtime.cc index 0b72668832d..1c2d033afaf 100644 --- a/lite/backends/opencl/cl_runtime.cc +++ b/lite/backends/opencl/cl_runtime.cc @@ -544,7 +544,9 @@ OpenCLVersion CLRuntime::ParseDeviceVersion(const std::string& device_version) { // OpenCL // auto words = Split(device_version, std::string{" "}); - if (words[1] == "2.1") { + if (words[1] == "3.0") { + return OpenCLVersion::CL_VER_3_0; + } else if (words[1] == "2.1") { return OpenCLVersion::CL_VER_2_1; } else if (words[1] == "2.0") { return OpenCLVersion::CL_VER_2_0; diff --git a/lite/backends/opencl/cl_runtime.h b/lite/backends/opencl/cl_runtime.h index 09bea4cde6b..dea1f6dbc5a 100644 --- a/lite/backends/opencl/cl_runtime.h +++ b/lite/backends/opencl/cl_runtime.h @@ -37,7 +37,8 @@ typedef enum { CL_VER_1_1 = 2, CL_VER_1_2 = 3, CL_VER_2_0 = 4, - CL_VER_2_1 = 5 + CL_VER_2_1 = 5, + CL_VER_3_0 = 6 } OpenCLVersion; typedef enum {