areusch commented on a change in pull request #9003:
URL: https://github.com/apache/tvm/pull/9003#discussion_r708699801



##########
File path: python/tvm/micro/session.py
##########
@@ -143,6 +144,9 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
         """Tear down this session and associated RPC session resources."""
         self.transport.__exit__(exc_type, exc_value, exc_traceback)
 
+    def _shutdown(self):
+        self.__exit__(None, None, None)

Review comment:
       perhaps for a future cleanup: let's ensure we avoid double-calling 
`__exit__` by checking some local var to determine whether we did already.

##########
File path: src/runtime/rpc/rpc_endpoint.h
##########
@@ -190,6 +192,8 @@ class RPCEndpoint {
   std::string name_;
   // The remote key
   std::string remote_key_;
+  // The shutdown Packed Function

Review comment:
       nit: say something more like: "invoked when the RPC session is 
terminated"




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