Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Memory leak when using GPU plugin

picard__armand
Beginner
384 Views

Hi,

I don't understand how to deal with memory with GPU plugin.

When i run the code below the memory grow continually. The probleme does not appear when i use CPU plugin.

The code is build with Visual Studio 2015 with OpenVino R3.1 and run on windows.

Did i forget to clean something ?

#include "stdafx.h"
#include "inference_engine.hpp"

void load_network(InferenceEngine::Core &ie) {
	std::string network_path_xml = "path to xml file";
	std::string network_path_bin = "path to bin file";
	InferenceEngine::CNNNetReader reader;
	reader.ReadNetwork(network_path_xml);
	reader.ReadWeights(network_path_bin);
	InferenceEngine::ExecutableNetwork exec_network = ie.LoadNetwork(reader.getNetwork(), "GPU");
	InferenceEngine::InferRequest request = exec_network.CreateInferRequest();
}

int main()
{
	InferenceEngine::Core ie;
	for (int i = 0; i < 100; i++) {
		load_network(ie);
	}
	return 0;
}

 

0 Kudos
0 Replies
Reply