Skip to content

Commit 83e312f

Browse files
committed
Restore cache capacity after cleanup
1 parent b49f7ae commit 83e312f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/plugins/intel_gpu/src/plugin/plugin.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ Plugin::~Plugin() {
166166
// trigger earlier cache cleanup by setting its capacity to 0.
167167
// Related ticket: 106154.
168168
dnnl::set_primitive_cache_capacity(0);
169+
170+
// In case of multiple ov::Core instances (and multiple GPU plugins) we need to restore original
171+
// cache capacity to prevent working with zero-capacity cache in other GPU Plugin instances, since
172+
// cache is shared between all of GPU Plugin instances and cache clean up affects all of them.
173+
const int default_cache_capacity = 1024;
174+
dnnl::set_primitive_cache_capacity(default_cache_capacity);
169175
#endif
170176
}
171177

0 commit comments

Comments
 (0)