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

expand_as_op_1
Zeng Jinle 5 years ago committed by GitHub
parent 93c85c930a
commit 754fd57ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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");

Loading…
Cancel
Save