srkreddy1238 commented on code in PR #12711: URL: https://github.com/apache/tvm/pull/12711#discussion_r963862865
########## src/runtime/contrib/clml/clml_runtime.cc: ########## @@ -146,22 +169,7 @@ class CLMLRuntime : public JSONRuntimeBase { LOG(WARNING) << "CLML Runtime Init: Qualcomm extn not present.\n"; return; } - - // Reuse the OpenCl work space from TVM Device API. - auto func = tvm::runtime::Registry::Get("device_api.opencl"); - ICHECK(func != nullptr) << "Cannot find OpenCL device_api in registry"; - auto device_api = static_cast<cl::OpenCLWorkspace*>(((*func)()).operator void*()); - this->context = device_api->context; - bool queue_found = false; - for (size_t i = 0; i < device_api->devices.size(); ++i) { - if (device_api->devices[i] == device_id) { - this->queue = device_api->queues[i]; - this->evts = &(device_api->events[i]); - queue_found = true; - } - } - ICHECK(queue_found != false) << "Device queue not found in OpenCL Workspace"; - + this->queue = GetCommadQueue(); Review Comment: Agreed. Let me cleanup a bit by holding ref. for workspace instead of context and queues. This makes CLML unaffected by any changes to workspace internals. -- 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: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org