Skip to content

Commit

Permalink
Restore cache capacity after cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sshlyapn committed Feb 9, 2024
1 parent b49f7ae commit 83e312f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/intel_gpu/src/plugin/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ Plugin::~Plugin() {
// trigger earlier cache cleanup by setting its capacity to 0.
// Related ticket: 106154.
dnnl::set_primitive_cache_capacity(0);

// In case of multiple ov::Core instances (and multiple GPU plugins) we need to restore original
// cache capacity to prevent working with zero-capacity cache in other GPU Plugin instances, since
// cache is shared between all of GPU Plugin instances and cache clean up affects all of them.
const int default_cache_capacity = 1024;
dnnl::set_primitive_cache_capacity(default_cache_capacity);
#endif
}

Expand Down

0 comments on commit 83e312f

Please sign in to comment.