Skip to content

Commit faadcba

Browse files
committed
fix long long count problem
1 parent 7f5c835 commit faadcba

File tree

3 files changed

+3
-31
lines changed

3 files changed

+3
-31
lines changed

paddle/fluid/distributed/service/graph_py_service.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,7 @@ class GraphPyService {
5454
std::vector<std::string> table_feat_conf_feat_dtype;
5555
std::vector<int32_t> table_feat_conf_feat_shape;
5656

57-
// std::thread *server_thread, *client_thread;
58-
59-
// std::shared_ptr<paddle::distributed::PSServer> pserver_ptr;
60-
61-
// std::shared_ptr<paddle::distributed::PSClient> worker_ptr;
62-
6357
public:
64-
// std::shared_ptr<paddle::distributed::PSServer> get_ps_server() {
65-
// return pserver_ptr;
66-
// }
67-
// std::shared_ptr<paddle::distributed::PSClient> get_ps_client() {
68-
// return worker_ptr;
69-
// }
7058
int get_shard_num() { return shard_num; }
7159
void set_shard_num(int shard_num) { this->shard_num = shard_num; }
7260
void GetDownpourSparseTableProto(

paddle/fluid/distributed/table/common_graph_table.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ int32_t GraphTable::load_nodes(const std::string &path, std::string node_type) {
171171

172172
int32_t GraphTable::load_edges(const std::string &path, bool reverse_edge) {
173173
auto paths = paddle::string::split_string<std::string>(path, ";");
174-
int count = 0;
174+
int64_t count = 0;
175175
std::string sample_type = "random";
176176
bool is_weighted = false;
177177
int valid_count = 0;

paddle/fluid/distributed/table/common_graph_table.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,11 @@ namespace paddle {
3333
namespace distributed {
3434
class 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

Comments
 (0)