MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ~XRTCompilationCache

Method ~XRTCompilationCache

tensorflow/compiler/xrt/xrt_compilation_cache.cc:57–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57XRTCompilationCache::~XRTCompilationCache() {
58 VLOG(1) << "XRTCompilationCache::~XRTCompilationCache()";
59 // A buggy client may be holding onto a reference, or a client might have
60 // crashed while holding onto a reference. In either case, discard all
61 // outstanding client references to avoid leaking storage.
62 for (const auto& entry : entries_by_uid_) {
63 while (!entry.second->RefCountIsOne()) {
64 entry.second->Unref();
65 }
66 }
67 while (!entries_by_last_use_.empty()) {
68 MarkOldestEntryForEviction();
69 }
70 CHECK_EQ(cache_.size(), 0);
71 CHECK_EQ(entries_by_uid_.size(), 0);
72 CHECK_EQ(cache_entries_, 0);
73 CHECK_EQ(marked_for_eviction_entries_, 0);
74}
75
76Status XRTCompilationCache::Release(int64 uid) {
77 absl::MutexLock lock(&mu_);

Callers

nothing calls this directly

Calls 4

RefCountIsOneMethod · 0.45
UnrefMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected