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

[Performance]: how to release compiled model or infer request's memory under python #24891

Open
wang7393 opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
category: Python API OpenVINO Python bindings performance Performance related topics support_request

Comments

@wang7393
Copy link

wang7393 commented Jun 7, 2024

OpenVINO Version

2024.1

Operating System

Ubuntu 22.04 (LTS)

Device used for inference

CPU

OpenVINO installation

PyPi

Programming Language

Python

Hardware Architecture

x86 (64 bits)

Model used

geomvsnet

Model quantization

No

Target Platform

No response

Performance issue description

Our application(which consists of several models)need lost of runtime memory, more than 10G, but our target's hw only has 8G memory.
After one of the models inferences once, the memory usage increases by 5G. So I try to release the model's infer request memory by using "del infer_request", but can not release it.
I would like to know how to manually release the memory footprint generated by model inference during cyclic inference using python.

@wang7393 wang7393 added performance Performance related topics support_request labels Jun 7, 2024
@rkazants rkazants added the category: Python API OpenVINO Python bindings label Jun 7, 2024
@ilya-lavrenov
Copy link
Contributor

Memory can live in 2 places:

  • CompiledModel which stores compiled model weights
  • InferRequest which stores memory for intermediate computations, i/o tensors

After one of the models inferences once, the memory usage increases by 5G. So I try to release the model's infer request memory by using "del infer_request", but can not release it.

With del infer_request you delete only one category of memory.

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 performance Performance related topics support_request
Projects
None yet
Development

No branches or pull requests

5 participants