Skip to content

Commit

Permalink
[RUNTIME][OPENCL] Make OpenCL runtime Compatible with OpenCL2.0 #2897 (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
mshawcroft authored and yzhliu committed Apr 3, 2019
1 parent 38151ab commit 6be2418
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/runtime/opencl/opencl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
#include <tvm/runtime/device_api.h>
#include <dmlc/logging.h>

/* 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 <OpenCL/opencl.h>
#else
Expand Down

0 comments on commit 6be2418

Please sign in to comment.