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

[Bug]: Memory not free well #27537

Open
3 tasks done
xiaoweiChen opened this issue Nov 13, 2024 · 0 comments
Open
3 tasks done

[Bug]: Memory not free well #27537

xiaoweiChen opened this issue Nov 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working support_request

Comments

@xiaoweiChen
Copy link

OpenVINO Version

2024.4.0-16579-c3152d32c9c-releases/2024/4

Operating System

Windows System

Device used for inference

AUTO

Framework

None

Model used

custom

Issue description

When the program finish at return 0;, the memory is not free well, I think.

CPU: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz

GPU 0: Intel(R) Iris(R) Xe Graphics
driver version: 31.0.101.5388

Step-by-step reproduction

The model in this package model.zip

Code :

#include "openvino/openvino.hpp"

#include <stdexcept>
#include <iostream>
#include <string>

const std::string test_model_path = "ladon_360p_input_re.xml";
//const std::string device = "CPU";
const std::string device = "AUTO";

//ov::Core ie;
void createNetwork() {
  ov::Core ie;

  auto network = ie.read_model(test_model_path);

  auto executable_network =
    ie.compile_model(
      network
    , device
    );

  auto infer_request = 
    executable_network.create_infer_request();
}

int main() {
  
  try {
      std::cout << ov::get_openvino_version().buildNumber << std::endl;

      for (int time = 0; time < 1; time++) {
          createNetwork();
      }
  }
  catch (const std::exception& ex) {
    std::cerr << ex.what() << std::endl;
  }
  return 0;
}

CPU or AUTO as device, when I put a breakpoint at return 0; in main function.
The Task Manager would show the memory is 27.5MB still using.
But, I think would not too many memory need at this time

Screenshot 2024-11-13 211506

When I comment out the createNetwork(); line.
At same breakpoint position, the memory is 0.6MB still using.
I think this is right and what I want.
Screenshot 2024-11-13 211749

Relevant log output

No response

Issue submission checklist

  • I'm reporting an issue. It's not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • There is reproducer code and related data files such as images, videos, models, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working support_request
Projects
None yet
Development

No branches or pull requests

2 participants