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

Method GetCacheValue

oneflow/core/framework/op_kernel_infer_cache.cpp:39–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39OpKernelInferCache::ValueType OpKernelInferCache::GetCacheValue() const {
40 size_t hash_value = std::hash<KeyType>()(cache_key_);
41 HashEqTraitPtr<const KeyType> ptr_wrapper(&cache_key_, hash_value);
42 CHECK(cached_key2value_.find(ptr_wrapper) != cached_key2value_.end());
43 return cached_key2value_.at(ptr_wrapper);
44}
45
46void OpKernelInferCache::UpdateCacheKey(KernelInferContext* ctx) {
47 auto GetSymbolOfShape = [&](const std::string& arg_name, int32_t arg_index) -> Symbol<Shape> {

Callers 1

ForwardShapeMethod · 0.80

Calls 3

findMethod · 0.80
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected