janetsc commented on code in PR #12727:
URL: https://github.com/apache/tvm/pull/12727#discussion_r973138646
##########
python/tvm/contrib/hexagon/session.py:
##########
@@ -88,14 +88,23 @@ def __enter__(self):
self._rpc_receive_buffer_size_bytes,
],
)
+ func =
self._rpc.get_function("device_api.hexagon.acquire_resources")
+ func()
return self
except RuntimeError as exception:
raise exception
def __exit__(self, exc_type, exc_value, exc_traceback):
- # close session to the tracker
- del self._rpc
+ try:
+ func =
self._rpc.get_function("device_api.hexagon.release_resources")
+ func()
+ except RuntimeError:
+ # do nothing, as we are shutting down
Review Comment:
We don't have access to _LOG here, but I added a print.
--
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]