Skip to content

Commit 6be2418

Browse files
mshawcroftyzhliu
authored andcommitted
[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.
1 parent 38151ab commit 6be2418

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/runtime/opencl/opencl_common.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
#include <tvm/runtime/device_api.h>
1212
#include <dmlc/logging.h>
1313

14+
/* There are many OpenCL platforms that do not yet support OpenCL 2.0,
15+
* hence we use 1.2 APIs, some of which are now deprecated. In order
16+
* to turn off the deprecation warnings (elevated to errors by
17+
* -Werror) we explicitly disable the 1.2 deprecation warnings.
18+
*
19+
* At the point TVM supports minimum version 2.0, we can remove this
20+
* define.
21+
*/
22+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
23+
1424
#ifdef __APPLE__
1525
#include <OpenCL/opencl.h>
1626
#else

0 commit comments

Comments
 (0)