| 25 | namespace { |
| 26 | |
| 27 | bool 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 | |
| 43 | bool FetchServerDistribution(int shard_num, int* ns_size, vec_float_t* probs) { |
| 44 | std::vector<vec_int_t> node_freqs_list; |
no test coverage detected