MCPcopy Create free account
hub / github.com/Tencent/embedx / BuildCacheStorage

Function BuildCacheStorage

src/graph/client/resource_post_initializer.cc:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace {
26
27bool BuildCacheStorage(CacheStorage* cache_storage) {
28 auto* op = graph_op::DistGSOpFactory::GetInstance()->LookupOrCreate(
29 "DistCacheStorageLookuper");
30 DXCHECK(op != nullptr);
31
32 DXINFO("Building cache storage...");
33 if (!dynamic_cast<graph_op::DistCacheStorageLookuper*>(op)->Run(
34 cache_storage)) {
35 DXERROR("Failed to build cache storage.");
36 return false;
37 }
38
39 DXINFO("Done.");
40 return true;
41}
42
43bool FetchServerDistribution(int shard_num, int* ns_size, vec_float_t* probs) {
44 std::vector<vec_int_t> node_freqs_list;

Callers 1

PostInitCacheStorageFunction · 0.85

Calls 2

LookupOrCreateMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected