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

Method Lookup

tensorflow/compiler/xrt/xrt_compilation_cache.cc:261–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261Status XRTCompilationCache::Lookup(
262 int64 uid, std::unique_ptr<XRTCompilationCacheEntryRef>* entry) {
263 entry->reset();
264
265 absl::MutexLock lock(&mu_);
266 const auto iter = entries_by_uid_.find(uid);
267 if (iter == entries_by_uid_.end()) {
268 return errors::NotFound("No executable found for uid ", uid);
269 }
270 CompiledSubgraph* cache_entry = iter->second;
271 *entry = std::unique_ptr<XRTCompilationCacheEntryRef>(
272 new EntryRefImpl(this, cache_entry));
273 return Status::OK();
274}
275
276string XRTCompilationCache::DebugString() const {
277 return "XRTCompilationCache";

Callers

nothing calls this directly

Calls 4

NotFoundFunction · 0.85
resetMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected