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


##########
src/runtime/hexagon/hexagon_device_api.h:
##########
@@ -77,15 +75,10 @@ class HexagonDeviceAPI final : public DeviceAPI {
     CHECK(runtime_threads) << "runtime_threads was not created in 
AcquireResources";
     runtime_threads.reset();
 
-    CHECK(runtime_hexbuffs) << "runtime_hexbuffs was not created in 
AcquireResources";
-    if (!runtime_hexbuffs->empty()) {
-      DLOG(INFO) << "runtime_hexbuffs was not empty in ReleaseResources";
-      released_runtime_buffers = runtime_hexbuffs->current_allocations();
-    }
-    runtime_hexbuffs.reset();
-
     CHECK(runtime_vtcm) << "runtime_vtcm was not created in AcquireResources";
     runtime_vtcm.reset();
+
+    runtime_hexbuffs.Disable();

Review Comment:
   runtime_vtcm needs to be released last - otherwise if there are still VTCM 
buffers, it will not be able to free them.



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