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

Method LookupCache

tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:428–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426
427template <typename T>
428bool persistentCompilationCache::LookupCache(int64 key, T &text,
429 const string &kind) {
430 VLOG(2) << "Attempting to lookup " << kind << " in cache for key: " << key << ".";
431 bool in_cache = in_memory_cache_.contains(key);
432 if (in_cache) {
433 const string &text_str = in_memory_cache_[key];
434 // Make a copy in order to not return a reference to the cache.
435 std::copy_n(text_str.data(), text_str.size(), std::back_inserter(text));
436 VLOG(2) << "Found " << kind << " in cache for key: " << key << ".";
437 }
438 return in_cache;
439}
440
441bool persistentCompilationCache::LookupCache(int64 key, string &ptx) {
442 int64 ptx_key = tensorflow::Hash64Combine(key, ptx_hash_);

Callers 1

nvptx_compiler.ccFile · 0.80

Calls 4

Hash64CombineFunction · 0.85
containsMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected