echuraev commented on code in PR #12711:
URL: https://github.com/apache/tvm/pull/12711#discussion_r964625171
##########
src/runtime/contrib/clml/clml_runtime.cc:
##########
@@ -499,8 +484,17 @@ class CLMLRuntime : public JSONRuntimeBase {
uint32_t n, c, h, w;
};
- bool ExtensionStringPresent(cl_device_id device_id) {
+ bool ExtensionStringPresent(void) {
cl_int result = 0;
+ cl_platform_id platform;
+ cl_device_id device_id;
+ result = clGetPlatformIDs(1, &platform, NULL);
+ ICHECK(result == CL_SUCCESS) << "clGetPlatformIDs:" << result;
+ uint32_t num_devices = 0;
+ result = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, NULL,
&num_devices);
+ ICHECK(result == CL_SUCCESS && num_devices == 1) << "clGetDeviceIDs:" <<
result;
+ result = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &device_id, NULL);
+ ICHECK(device_id && result == CL_SUCCESS) << "clGetDeviceIDs:" << result;
Review Comment:
I agree with you. Added new comment below. Let's discuss this moment there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]