Skip to content

[Hexagon] [runtime] Remove released buffer check for post-ReleaseResources calls to FreeDataSpace#13139

Merged
masahi merged 2 commits intoapache:mainfrom
janetsc:post_release_free
Oct 19, 2022
Merged

[Hexagon] [runtime] Remove released buffer check for post-ReleaseResources calls to FreeDataSpace#13139
masahi merged 2 commits intoapache:mainfrom
janetsc:post_release_free

Conversation

@janetsc
Copy link
Contributor

@janetsc janetsc commented Oct 19, 2022

The motivation behind resource management is to ensure that we release all resources at the end of the session.

Given the session management on the client side, it is possible for ReleaseResources to be called before all client side objects have been torn down. And, it is possible for frees to be called in the window between session end and process termination. (After those buffers have been freed in ReleaseResources.)

Based on feedback from @adstraw and @Lunderberg on the usage of "released_runtime_buffers," we did an investigation into the post-release frees. The cleanest solution is to keep the logic to free all buffers in ReleaseResources, and log a message on any frees that are executed outside a session.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Oct 19, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@janetsc janetsc marked this pull request as ready for review October 19, 2022 18:20
@masahi masahi merged commit f3ffc32 into apache:main Oct 19, 2022
@janetsc janetsc deleted the post_release_free branch October 19, 2022 21:47
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 10, 2022
…urces calls to FreeDataSpace (apache#13139)

* Remove released buffer list

* PR feedback, make message debug only
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…urces calls to FreeDataSpace (apache#13139)

* Remove released buffer list

* PR feedback, make message debug only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants