echuraev commented on code in PR #13972:
URL: https://github.com/apache/tvm/pull/13972#discussion_r1106683250
##########
src/runtime/contrib/clml/clml_runtime.cc:
##########
@@ -581,11 +583,12 @@ class CLMLRuntime : public JSONRuntimeBase {
bool ExtensionStringPresent(void) {
cl_int result = 0;
- if (workspace->platform_id == nullptr) {
- return 0;
- }
size_t reqd_size = 0;
- cl_device_id device_id =
workspace->devices[workspace->GetThreadEntry()->device.device_id];
+ if
(!workspace->IsDeviceExists(workspace->GetThreadEntry()->device.device_id)) {
+ LOG(FATAL) << "OpenCL device not found";
+ }
Review Comment:
Are you sure that you need to throw exception from this method and from
`init` function? I thought that you need just check if OpenCL device is existed
(or in previous code `platform_id`) and if it is not presented then continue to
work.
Because in case if exception is ok for this function then this check doesn't
really need because `GetCLDeviceID` will generate exception about invalid
device id.
--
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]