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

Method Insert

tensorflow/compiler/xla/service/compilation_cache.cc:40–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38} // namespace
39
40ExecutionHandle CompilationCache::Insert(
41 std::unique_ptr<Executable> executable) {
42 tensorflow::mutex_lock lock(mutex_);
43
44 CacheKey key = GetUniqueId();
45 VLOG(2) << "inserting cache key: " << key;
46 CHECK_EQ(cache_.count(key), 0);
47 cache_.emplace(key, std::move(executable));
48
49 ExecutionHandle handle;
50 handle.set_handle(key);
51 return handle;
52}
53
54StatusOr<std::shared_ptr<Executable>> CompilationCache::LookUp(
55 const ExecutionHandle& handle) const {

Callers 1

CompileMethod · 0.45

Calls 4

GetUniqueIdFunction · 0.85
countMethod · 0.45
emplaceMethod · 0.45
set_handleMethod · 0.45

Tested by

no test coverage detected