Skip to content

Commit

Permalink
[GPU] Fix oneDnn cache leak
Browse files Browse the repository at this point in the history
  • Loading branch information
p-durandin committed Oct 21, 2024
1 parent 54a670e commit 80df9f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/intel_gpu/src/plugin/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,13 @@ Plugin::Plugin() {
// Set common info for compiled_model_runtime_properties
auto& ov_version = ov::get_openvino_version();
m_compiled_model_runtime_properties["OV_VERSION"] = ov_version.buildNumber;

std::cout << "DEBUG: gpu plugin init" << std::endl;
}

Plugin::~Plugin() {
// reset oneDNN cache to clean up cached primitives
#ifdef ENABLE_ONEDNN_FOR_GPU
std::cout << "DEBUG: gpu plugin destructor" << std::endl;
auto capasity = dnnl::get_primitive_cache_capacity();
dnnl::set_primitive_cache_capacity(0);
dnnl::set_primitive_cache_capacity(capasity);
Expand Down

0 comments on commit 80df9f9

Please sign in to comment.