janetsc commented on code in PR #12905:
URL: https://github.com/apache/tvm/pull/12905#discussion_r980599945


##########
src/runtime/hexagon/hexagon_device_api.h:
##########
@@ -54,17 +55,26 @@ class HexagonDeviceAPI final : public DeviceAPI {
   void AcquireResources() {
     CHECK_EQ(runtime_hexbuffs, nullptr);
     runtime_hexbuffs = std::make_unique<HexagonBufferManager>();
-    LOG(INFO) << "runtime_hexbuffs created";
+    DLOG(INFO) << "runtime_hexbuffs created";
     mgr = runtime_hexbuffs.get();
+
+    CHECK_EQ(runtime_threads, nullptr);
+    runtime_threads = std::make_unique<HexagonThreadManager>(threads, 
stack_size, pipe_size);
+    DLOG(INFO) << "runtime_threads created";
   }
 
   //! \brief Ensures all runtime resources are freed
   void ReleaseResources() {
+    CHECK(runtime_threads) << "runtime_threads was not created in 
AcquireResources";
+    runtime_threads.reset();

Review Comment:
   Ok, good to know.  I think that's ok for now.  We may want a "force" 
shutdown option in the future.



-- 
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]

Reply via email to