diff --git a/benchmark/fluid/args.pyc b/benchmark/fluid/args.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cac4bec4c1fc1776b3bf13a2cb913f12c81e8f4e Binary files /dev/null and b/benchmark/fluid/args.pyc differ diff --git a/benchmark/fluid/fluid_benchmark.py b/benchmark/fluid/fluid_benchmark.py index 902dca209fcc07cc8048acda84e917f0f6c6af68..a3b81d8205004927d998c22938000b9e02811bb2 100644 --- a/benchmark/fluid/fluid_benchmark.py +++ b/benchmark/fluid/fluid_benchmark.py @@ -156,15 +156,23 @@ def train(avg_loss, infer_prog, optimizer, train_reader, test_reader, batch_acc, start_time = time.time() num_samples = 0 + if arg.profile and pass_id == 0 and batch_id == 5: + profiler.start_profiler("All") + elif args.profile and pass_id == 0 and batch_id == 10: + profiler.stop_profiler("total", "/tmp/profile") + if args.use_reader_op: try: - loss = exe.run(train_prog, fetch_list=[avg_loss]) + loss = exe.run(train_prog, + fetch_list=[avg_loss], + use_program_cache=True) except fluid.core.EnforceNotMet as ex: break else: loss = exe.run(train_prog, feed=feeder.feed(data), - fetch_list=[avg_loss]) + fetch_list=[avg_loss], + use_program_cache=True) iters += 1 batch_id += 1 # FIXME(wuyi): For use_reader_op, if the current diff --git a/benchmark/fluid/recordio_converter.pyc b/benchmark/fluid/recordio_converter.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9b603f41c6748bb65da06076d5f69e4754c341c0 Binary files /dev/null and b/benchmark/fluid/recordio_converter.pyc differ