未验证 提交 02c59eda 编写于 作者: P pangyoki 提交者: GitHub

add flag (#44856)

上级 5cd3b4b1
......@@ -1460,6 +1460,9 @@ class Executor(object):
ir_graph = framework.IrGraph(program._graph)
inner_program = ir_graph.to_program()
# print(f"Program after convert:\n {inner_program}", flush=True)
logging.warning(
"FLAGS_USE_STANDALONE_EXECUTOR and FLAGS_CONVERT_GRAPH_TO_PROGRAM is set to 1. Graph will be converted to Program and executed using new executor."
)
else:
from paddle.incubate.autograd import prim_enabled, prim2orig
if prim_enabled() and program == default_main_program():
......@@ -1502,6 +1505,10 @@ class Executor(object):
else:
tensor._copy_from(cpu_tensor, self.place)
warnings.warn(
"FLAGS_USE_STANDALONE_EXECUTOR is set to 1. New executor is used to execute Program."
)
return new_exe.run(scope, list(feed.keys()), fetch_list,
return_numpy)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册