Skip to content

Conversation

@XWangIntel
Copy link
Contributor

In tf-bridge there is a freshness tracker, which is a key-value storage of {key=some pointer, value=set<shared_ptr< ngraph::Executable>>}. There is mechanism to iterate each key-value pair in it and destroy the shared_ptr< ngraph::Executable> in it so that the resource can be reclaimed. However in the implementation, it is done on a copy of key-value pair, instead of the original storage itself. The original freshness_map is untouched and the resource in it is not reclaimed as expected.

The rest of the change is about to reduce the unnecessary incrementation/decrementation of use_count of shared_ptr.

@XWangIntel XWangIntel requested review from avijit-nervana, shresthamalik and sindhu-nervana and removed request for sindhu-nervana August 16, 2019 18:04
Copy link
Contributor

@shresthamalik shresthamalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@avijit-nervana avijit-nervana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@avijit-nervana avijit-nervana merged commit d632d8a into master Aug 16, 2019
@avijit-nervana avijit-nervana deleted the xiaoyuw3/leak branch August 16, 2019 18:32
avijit-nervana pushed a commit that referenced this pull request Aug 16, 2019
gopoka pushed a commit that referenced this pull request Oct 28, 2019
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.

3 participants