提交 a0b59773 编写于 作者: D dongdaxiang

fix code style

上级 f39b323e
......@@ -155,8 +155,7 @@ void AsyncExecutor::RunFromFile(const ProgramDesc& main_program,
}
#ifdef PADDLE_WITH_PSLIB
if (mode == "mpi") {
// todo ?
//_pull_dense_thread->stop();
_pull_dense_thread->stop();
}
#endif
VLOG(3) << "start to run from files in async_executor";
......
......@@ -21,13 +21,14 @@ limitations under the License. */
#endif
#include <atomic>
#include <ctime>
#include <map>
#include <random>
#include <string>
#include <vector>
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/framework/scope.h"
#include "paddle/fluid/framework/variable_helper.h"
#include "paddle/fluid/platform/macros.h" // for DISABLE_COPY_AND_ASSIGN
#include "paddle/fluid/framework/program_desc.h"
namespace paddle {
namespace framework {
......@@ -72,8 +73,7 @@ class FleetWrapper {
const std::vector<std::string>& var_names,
std::vector<::std::future<int32_t>>* pull_dense_status);
void PushDenseParamSync(
const ProgramDesc& program, const uint64_t table_id,
void PushDenseParamSync(const ProgramDesc& program, const uint64_t table_id,
const std::vector<std::string>& var_names);
// Push dense variables to server in async mode
......@@ -122,13 +122,12 @@ class FleetWrapper {
uint64_t RunServer();
void GatherServers(const std::vector<uint64_t>& host_sign_list, int node_num);
typedef std::function<int32_t (int, int, const std::string&)> MsgHandlerFunc;
typedef std::function<int32_t(int, int, const std::string&)> MsgHandlerFunc;
int RegisterClientToClientMsgHandler(int msg_type, MsgHandlerFunc handler);
std::future<int32_t> SendClientToClientMsg(int msg_type,
int to_client_id,
std::future<int32_t> SendClientToClientMsg(int msg_type, int to_client_id,
const std::string& msg);
std::default_random_engine& LocalRandomEngine();
std::default_random_engine& LocalRandomEngine();
template <typename T>
void Serialize(const std::vector<T*>& t, std::string* str);
template <typename T>
......
......@@ -197,7 +197,7 @@ std::shared_ptr<FILE> shell_popen(const std::string& cmd,
static int shell_p2open_fork_internal(const char* real_cmd, int pipein_fds[2],
int pipeout_fds[2]) {
#ifndef
#ifndef _WIN32
int child_pid = -1;
if ((child_pid = fork()) < 0) {
return -1;
......
......@@ -16,7 +16,11 @@
#include <fcntl.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <sys/syscall.h>
#endif
#include <sys/types.h>
#include <sys/wait.h>
#include <memory>
......
......@@ -18,7 +18,7 @@
TEST(LodTensorPrinter, PrintVar) {
paddle::framework::Scope scope;
PrintVar(&scope, "NotAVar", "We don't have var");
paddle::platform::PrintVar(&scope, "NotAVar", "We don't have var");
paddle::framework::Variable* v = scope.Var("NotAVar");
PrintVar(&scope, "NotAVar", "Now we have a var");
paddle::platform::PrintVar(&scope, "NotAVar", "Now we have a var");
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册