-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RUNTIME][OPENCL] Make OpenCL runtime Compatible with OpenCL2.0 #2897
Comments
cc @kazum , likely we can detect the OpenCL version in macro and use the new API(it is not yet available in old version of the API). |
I think we cannot detect the OpenCL version statically - we need to query it with the OpenCL APIs. Maybe, it's possible to detect the version in cmake and define an appropriate macro. Anyway, there are still many OpenCL platforms which don't support OpenCL 2.0. Defining CL_USE_DEPRECATED_OPENCL_1_2_APIS looks good for now. |
By search around i have found |
Is I searched the macro in the official OpenCL headers (https://github.com/KhronosGroup/OpenCL-Headers), but couldn't find it. Even if it is defined there, the supported OpenCL version is up to the target device, IIUC. |
OK, perhaps we can define the backward compatible flag for now then |
…#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.
Resolved by #2950 |
…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.
…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.
…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.
…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.
…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.
Build opencl fails with:
tvm/src/runtime/opencl/opencl_device_api.cc:278:9: error: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)’ is deprecated [-Werror=deprecated-declarations]
The clCreateCommandQueue API is deprecated in OpenCL2.0.
Possible solutions:
Switch to clCreateCommandQueueWithProperties
Define either we need to:
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS prior to the inclusion of cl.h
The text was updated successfully, but these errors were encountered: