diff --git a/paddle/fluid/distributed/ps/service/ps_client.h b/paddle/fluid/distributed/ps/service/ps_client.h index 74f946b2253aac93cb5934744fd90e81527c58d8..6acf431a6f840c77b5e7bfedefc7636d47727793 100644 --- a/paddle/fluid/distributed/ps/service/ps_client.h +++ b/paddle/fluid/distributed/ps/service/ps_client.h @@ -67,7 +67,7 @@ class PSClient { PSClient(PSClient &&) = delete; PSClient(const PSClient &) = delete; - virtual int32_t Configure( + virtual int32_t Configure( // NOLINT const PSParameter &config, const std::map> ®ions, diff --git a/paddle/fluid/distributed/ps/service/ps_local_server.h b/paddle/fluid/distributed/ps/service/ps_local_server.h index a295818c63898da2ba611bd9fff91ab7c6a7771d..4209c39a81ec9479d8e878c49a56c879a9273ed2 100644 --- a/paddle/fluid/distributed/ps/service/ps_local_server.h +++ b/paddle/fluid/distributed/ps/service/ps_local_server.h @@ -31,7 +31,7 @@ class PsLocalServer : public PSServer { virtual int32_t Stop() { return 0; } virtual int32_t Configure( const PSParameter &config, - PSEnvironment &env, + PSEnvironment &env, // NOLINT size_t server_rank, const std::vector &server_sub_program = {}) { return 0; diff --git a/paddle/fluid/distributed/ps/service/ps_service/service.h b/paddle/fluid/distributed/ps/service/ps_service/service.h index 1b9f9249c3bbefc532628f9b5ccf48da2611b990..eb190073fbd834a92793f6a6f99016d0fa916d46 100644 --- a/paddle/fluid/distributed/ps/service/ps_service/service.h +++ b/paddle/fluid/distributed/ps/service/ps_service/service.h @@ -39,7 +39,7 @@ using paddle::distributed::PsService; class PSCore { public: - explicit PSCore() {} + PSCore() {} virtual ~PSCore() {} virtual int InitServer( diff --git a/paddle/fluid/distributed/ps/table/depends/sparse_utils.h b/paddle/fluid/distributed/ps/table/depends/sparse_utils.h index 06adcf0b181c039602b9f6146578d86e7e3ff7ec..1b3825ca738396c786723deb0fe321c10db5a257 100644 --- a/paddle/fluid/distributed/ps/table/depends/sparse_utils.h +++ b/paddle/fluid/distributed/ps/table/depends/sparse_utils.h @@ -60,7 +60,7 @@ struct PullSparseValue { std::vector* offset_shard) const { offset_shard->reserve(numel_ / shard_num + 1); for (int x = 0; x < numel_; ++x) { - if (int(feasigns_[x] % shard_num) == shard_id) { + if (static_cast(feasigns_[x] % shard_num) == shard_id) { offset_shard->push_back(x); } } diff --git a/paddle/fluid/distributed/ps/table/graph/graph_weighted_sampler.h b/paddle/fluid/distributed/ps/table/graph/graph_weighted_sampler.h index cf83d27d7a2fddd1f68f3720345c84a2ab6f74c8..9b6f0290a9b3de4598d163caf243a8c1c7d0d547 100644 --- a/paddle/fluid/distributed/ps/table/graph/graph_weighted_sampler.h +++ b/paddle/fluid/distributed/ps/table/graph/graph_weighted_sampler.h @@ -55,10 +55,12 @@ class WeightedSampler : public Sampler { const std::shared_ptr rng); private: - int sample(float query_weight, - std::unordered_map &subtract_weight_map, - std::unordered_map &subtract_count_map, - float &subtract); + int sample( + float query_weight, + std::unordered_map + &subtract_weight_map, // NOLINT + std::unordered_map &subtract_count_map, // NOLINT + float &subtract); // NOLINT }; } // namespace distributed } // namespace paddle diff --git a/paddle/fluid/distributed/test/graph_node_split_test.cc b/paddle/fluid/distributed/test/graph_node_split_test.cc index 96769cff83bb80cb21e1e1338741bce49ea61e60..2ec5469afe5909d7219483490c12bdea1e27ad22 100644 --- a/paddle/fluid/distributed/test/graph_node_split_test.cc +++ b/paddle/fluid/distributed/test/graph_node_split_test.cc @@ -157,7 +157,8 @@ void GetDownpourSparseTableProto( /*-------------------------------------------------------------------------*/ -std::string ip_ = "127.0.0.1", ip2 = "127.0.0.1"; +const char* ip_ = "127.0.0.1"; +const char* ip2 = "127.0.0.1"; uint32_t port_ = 5209, port2 = 5210; std::vector host_sign_list_; @@ -203,10 +204,10 @@ void RunServer2() { pserver_ptr2->build_peer2peer_connection(1); } -void RunClient( - std::map>& dense_regions, - int index, - paddle::distributed::PsBaseService* service) { +void RunClient(std::map>& + dense_regions, // NOLINT + int index, + paddle::distributed::PsBaseService* service) { ::paddle::distributed::PSParameter worker_proto = GetWorkerProto(); paddle::distributed::PaddlePSEnvironment _ps_env; auto servers_ = host_sign_list_.size(); diff --git a/paddle/fluid/distributed/test/table_test.cc b/paddle/fluid/distributed/test/table_test.cc index afeaf273174f4696a2e7612b84e1827f37b242b6..8908891d9f14f2f5158ef2509b1ba55c8cafbd0e 100644 --- a/paddle/fluid/distributed/test/table_test.cc +++ b/paddle/fluid/distributed/test/table_test.cc @@ -15,7 +15,7 @@ limitations under the License. */ #include "gtest/gtest.h" #include "paddle/fluid/distributed/ps/table/memory_dense_table.h" #include "paddle/fluid/distributed/the_one_ps.pb.h" -//#include "paddle/fluid/distributed/ps/table/sparse_geo_table.h" +// #include "paddle/fluid/distributed/ps/table/sparse_geo_table.h" namespace paddle { namespace distributed {