Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GPU][L0] Check OpenCL version during compilation (#39321)

Jakub Kasprzak3d39b7602b4b
diff --git a/src/plugins/intel_gpu/src/runtime/ze/ze_ocl_common.hpp b/src/plugins/intel_gpu/src/runtime/ze/ze_ocl_common.hpp
index 605e68b2525..b3f5ddef908 100644
--- a/src/plugins/intel_gpu/src/runtime/ze/ze_ocl_common.hpp
+++ b/src/plugins/intel_gpu/src/runtime/ze/ze_ocl_common.hpp
@@ -7,6 +7,11 @@
#include "openvino/core/except.hpp"
#include "ocl/ocl_wrapper.hpp"
+#ifndef CL_VERSION_3_0
+#error "Level Zero - OpenCL interoperability requires OpenCL 3.0 or newer.\
+ Update OpenCL or set ENABLE_SYSTEM_OPENCL=OFF to use bundled OpenCL headers"
+#endif
+
#include <string>
#include <exception>