Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CB] Fix Memory leak in CBPipeImpl Constructor #1568

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

iefode
Copy link
Contributor

@iefode iefode commented Jan 16, 2025

Ticket:

Reproducer:

Details:

  • (Consequences) Infer Request object was weaked in CacheManager (3GB leak per iteration), Not cleaned block manager ( +2 MB per iteration).
  • (Reason) Scheduler object was not removed from CBImpl destructor (CacheManager and BlockManager are field of the class). We have another Scheduler with virtual destructor. So, compiler can not resolve the class destructor methods, call desctructor from another class and does nothing.

Solution:

  • To implement release method for Scheduler and call it from CBPipeImpl destructor.
  • We should rename class to call normal destructor in future

Additional changes:

  • to remove cache_manager field from pipeline because it is using only in scheduler

Results:

image

@iefode iefode added the bug Something isn't working label Jan 16, 2025
@iefode iefode requested a review from ilya-lavrenov January 16, 2025 10:33
@github-actions github-actions bot added the category: continuous batching Continuous batching label Jan 16, 2025
src/cpp/src/continuous_batching_impl.hpp Outdated Show resolved Hide resolved
src/cpp/src/cache_state_dumper.hpp Outdated Show resolved Hide resolved
@ilya-lavrenov ilya-lavrenov merged commit eed81fe into openvinotoolkit:master Jan 16, 2025
57 checks passed
@iefode iefode deleted the mem_leak_cb_constructor branch January 16, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working category: continuous batching Continuous batching Code Freeze
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants