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

[PyOV] Improve import_model memory consumption #27451

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

akuporos
Copy link
Contributor

@akuporos akuporos commented Nov 7, 2024

Details:

  • Writing to stringstream caused additional copy
  • Usage of fstream also caused extra memory usage. Also we needed to proper handle saving/removal of the tmp_file.
  • So I've squeezed two import_model methods to one and I've implemented/reused custom buffer that wraps interactions with python memory without extra copies

Tickets:

  • EISW-137436

@akuporos akuporos requested a review from a team as a code owner November 7, 2024 11:35
@github-actions github-actions bot added the category: Python API OpenVINO Python bindings label Nov 7, 2024
@akuporos akuporos added this to the 2025.0 milestone Nov 7, 2024
@MirceaDan99
Copy link
Contributor

I believe @p-wysocki has a PR that also modifies this, #26237. Please also review.

Copy link
Contributor

@almilosz almilosz left a comment

Choose a reason for hiding this comment

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

LGTM

@akuporos akuporos added this pull request to the merge queue Nov 12, 2024
Merged via the queue into openvinotoolkit:master with commit 7880504 Nov 12, 2024
166 checks passed
@akuporos akuporos deleted the akup/improve-import_model branch November 12, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Python API OpenVINO Python bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants