From 8ef52f72ba2a810804ed36f1c2d264f206aba1e3 Mon Sep 17 00:00:00 2001 From: Marcus Shawcroft Date: Wed, 3 Apr 2019 06:11:19 +0100 Subject: [PATCH] [RUNTIME][OPENCL] Make OpenCL runtime Compatible with OpenCL2.0 #2897 (#2950) There are many OpenCL platforms that do not yet support OpenCL 2.0, hence we use 1.2 APIs, some of which are now deprecated. In order to turn off the deprecation warnings (elevated to errors by -Werror) we explicitly disable the 1.2 deprecation warnings. At the point TVM supports minimum version 2.0, this commit can be reverted. --- src/runtime/opencl/opencl_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/runtime/opencl/opencl_common.h b/src/runtime/opencl/opencl_common.h index 6e8472830296..34144f90a7a6 100644 --- a/src/runtime/opencl/opencl_common.h +++ b/src/runtime/opencl/opencl_common.h @@ -11,6 +11,16 @@ #include #include +/* There are many OpenCL platforms that do not yet support OpenCL 2.0, + * hence we use 1.2 APIs, some of which are now deprecated. In order + * to turn off the deprecation warnings (elevated to errors by + * -Werror) we explicitly disable the 1.2 deprecation warnings. + * + * At the point TVM supports minimum version 2.0, we can remove this + * define. + */ +#define CL_USE_DEPRECATED_OPENCL_1_2_APIS + #ifdef __APPLE__ #include #else