diff --git a/paddle/framework/executor.cc b/paddle/framework/executor.cc index 10d22ba01c85913d7c1df7b7d95fa6bcbae30b9f..4f217277d0cc98bf0491b805965fc91f682d93fc 100644 --- a/paddle/framework/executor.cc +++ b/paddle/framework/executor.cc @@ -145,9 +145,11 @@ std::vector Executor::Preprocess(const ProgramDesc& pdesc) { // this op should be executed should_run.push_back(true); + LOG(INFO) << "Yes " << op_desc.type(); } else { // this op should NOT be executed should_run.push_back(false); + LOG(INFO) << "No " << op_desc.type(); } } diff --git a/paddle/framework/executor.h b/paddle/framework/executor.h index 1d2e6c96ded0ba83c31cfc31b335b8be6acdd5ed..75cb5939ff11e8ca2385751a8aeb1fd557596c44 100644 --- a/paddle/framework/executor.h +++ b/paddle/framework/executor.h @@ -38,9 +38,13 @@ class Executor { protected: /* @Brief + * Pruning the graph * * @param * ProgramDesc + * + * @return + * vector Same size as ops. Indicates whether an op should be run. */ std::vector Preprocess(const ProgramDesc& pdesc); diff --git a/paddle/framework/executor_test.cc b/paddle/framework/executor_test.cc index bf6c1dffc135b47a6e2273eb649c37adc601c84b..6a4b2e3d1a281b22b19c1e6fbd66b52bef29be18 100644 --- a/paddle/framework/executor_test.cc +++ b/paddle/framework/executor_test.cc @@ -226,6 +226,7 @@ class ExecutorTesterFeed : public ::testing::Test { Out->set_parameter("Out"); Out->add_arguments("c"); + add_fetch_op("a", dim, 0, root_block); add_fetch_op("c", dim, 0, root_block); std::vector vec1 = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0};