File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -620,13 +620,20 @@ class KernelProgramCache {
620620 // /
621621 // / This member function should only be used in unit tests.
622622 void reset () {
623- std::lock_guard<std::mutex> L1 (MProgramCacheMutex);
624- std::lock_guard<std::mutex> L2 (MKernelsPerProgramCacheMutex);
625- std::lock_guard<std::mutex> L3 (MKernelFastCacheMutex);
626- MCachedPrograms = ProgramCache{};
627- MKernelsPerProgramCache = KernelCacheT{};
628- MKernelFastCache = KernelFastCacheT{};
629- MProgramToKernelFastCacheKeyMap.clear ();
623+ {
624+ std::lock_guard<std::mutex> L1 (MProgramCacheMutex);
625+ MCachedPrograms = ProgramCache{};
626+ }
627+ {
628+ std::lock_guard<std::mutex> L2 (MKernelsPerProgramCacheMutex);
629+ MKernelsPerProgramCache = KernelCacheT{};
630+ }
631+
632+ {
633+ std::lock_guard<std::mutex> L3 (MKernelFastCacheMutex);
634+ MKernelFastCache = KernelFastCacheT{};
635+ MProgramToKernelFastCacheKeyMap.clear ();
636+ }
630637
631638 // Clear the eviction lists and its mutexes.
632639 std::lock_guard<std::mutex> EvictionListLock (MProgramEvictionListMutex);
You can’t perform that action at this time.
0 commit comments