MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / IsCacheHit

Method IsCacheHit

oneflow/core/framework/op_kernel_infer_cache.cpp:33–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33bool OpKernelInferCache::IsCacheHit() const {
34 size_t hash_value = std::hash<KeyType>()(cache_key_);
35 HashEqTraitPtr<const KeyType> ptr_wrapper(&cache_key_, hash_value);
36 return cached_key2value_.find(ptr_wrapper) != cached_key2value_.end();
37}
38
39OpKernelInferCache::ValueType OpKernelInferCache::GetCacheValue() const {
40 size_t hash_value = std::hash<KeyType>()(cache_key_);

Callers 1

ForwardShapeMethod · 0.80

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected