Skip to content

Commit

Permalink
[RUNTIME][OPENCL] Make OpenCL runtime Compatible with OpenCL2.0 apach…
Browse files Browse the repository at this point in the history
…e#2897 (apache#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 wweic committed Apr 7, 2019
1 parent 0c1a4d8 commit fdb31f5
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 fdb31f5

Please sign in to comment.