@@ -33,26 +33,11 @@ namespace paddle {
3333namespace distributed {
3434class GraphShard {
3535 public:
36- // static int bucket_low_bound;
37- // static int gcd(int s, int t) {
38- // if (s % t == 0) return t;
39- // return gcd(t, s % t);
40- // }
4136 size_t get_size ();
4237 GraphShard () {}
43- GraphShard (int shard_num) {
44- this ->shard_num = shard_num;
45- // bucket_size = init_bucket_size(shard_num);
46- // bucket.resize(bucket_size);
47- }
38+ GraphShard (int shard_num) { this ->shard_num = shard_num; }
4839 std::vector<Node *> &get_bucket () { return bucket; }
4940 std::vector<Node *> get_batch (int start, int end, int step);
50- // int init_bucket_size(int shard_num) {
51- // for (int i = bucket_low_bound;; i++) {
52- // if (gcd(i, shard_num) == 1) return i;
53- // }
54- // return -1;
55- // }
5641 std::vector<uint64_t > get_ids_by_range (int start, int end) {
5742 std::vector<uint64_t > res;
5843 for (int i = start; i < end && i < bucket.size (); i++) {
@@ -64,7 +49,6 @@ class GraphShard {
6449 FeatureNode *add_feature_node (uint64_t id);
6550 Node *find_node (uint64_t id);
6651 void add_neighboor (uint64_t id, uint64_t dst_id, float weight);
67- // std::unordered_map<uint64_t, std::list<GraphNode *>::iterator>
6852 std::unordered_map<uint64_t , int > get_node_location () {
6953 return node_location;
7054 }
@@ -131,7 +115,7 @@ class GraphTable : public SparseTable {
131115 protected:
132116 std::vector<GraphShard> shards;
133117 size_t shard_start, shard_end, server_num, shard_num_per_table, shard_num;
134- const int task_pool_size_ = 11 ;
118+ const int task_pool_size_ = 24 ;
135119 const int random_sample_nodes_ranges = 3 ;
136120
137121 std::vector<std::string> feat_name;
0 commit comments