未验证 提交 754fd57e 编写于 作者: Z Zeng Jinle 提交者: GitHub

disable memory optimization passes when FLAGS_use_ngraph=True, test=develop (#19778)

上级 93c85c93
......@@ -32,6 +32,8 @@ limitations under the License. */
#include "paddle/fluid/framework/ir/memory_optimize_pass/reference_count_pass_helper.h"
#include "paddle/fluid/platform/profiler.h"
DECLARE_bool(use_ngraph);
#ifdef WITH_GPERFTOOLS
#include "gperftools/profiler.h"
#endif
......@@ -233,6 +235,13 @@ class ParallelExecutorPrivate {
};
ir::Graph *ParallelExecutorPrivate::ApplyMemoryOptimizePass(ir::Graph *graph) {
if (FLAGS_use_ngraph) {
LOG_FIRST_N(WARNING, 1)
<< "FLAGS_use_ngraph=True, memory optimization strategy is "
"disabled in ParallelExecutor";
return graph;
}
std::vector<ir::LastLiveOpsOfVars> last_live_ops_of_vars;
auto ref_cnt_pass = ir::PassRegistry::Instance().Get("reference_count_pass");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册