From 38143e5aca495a86b0d55753cd325b6cb7613f19 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 19 Nov 2018 13:01:01 +0800 Subject: [PATCH] Clean unused changes test=develop --- benchmark/fluid/fluid_benchmark.py | 4 +--- benchmark/fluid/models/resnet.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/benchmark/fluid/fluid_benchmark.py b/benchmark/fluid/fluid_benchmark.py index d0a72b92d9..5f3ce300ac 100644 --- a/benchmark/fluid/fluid_benchmark.py +++ b/benchmark/fluid/fluid_benchmark.py @@ -168,7 +168,7 @@ def train_parallel(train_args, test_args, args, train_prog, test_prog, startup_exe = fluid.Executor(place) startup_exe.run(startup_prog) strategy = fluid.ExecutionStrategy() - strategy.num_threads = 0 #args.cpus + strategy.num_threads = args.cpus strategy.allow_op_delay = False build_strategy = fluid.BuildStrategy() if args.reduce_strategy == "reduce": @@ -188,8 +188,6 @@ def train_parallel(train_args, test_args, args, train_prog, test_prog, num_trainers = 1 trainer_id = 0 - print('Use parallel_executor') - strategy.type = 2 exe = fluid.ParallelExecutor( True, avg_loss.name, diff --git a/benchmark/fluid/models/resnet.py b/benchmark/fluid/models/resnet.py index 947c497ce2..f692e7722a 100644 --- a/benchmark/fluid/models/resnet.py +++ b/benchmark/fluid/models/resnet.py @@ -172,7 +172,7 @@ def get_model(args, is_train, main_prog, startup_prog): reader, dshape, class_dim = _model_reader_dshape_classdim(args, is_train) pyreader = None - trainer_count = int(os.getenv("PADDLE_TRAINERS", 1)) + trainer_count = int(os.getenv("PADDLE_TRAINERS")) with fluid.program_guard(main_prog, startup_prog): with fluid.unique_name.guard(): if args.use_reader_op: -- GitLab