Skip to content

Commit

Permalink
add flag (#44856)
Browse files Browse the repository at this point in the history
  • Loading branch information
pangyoki committed Aug 3, 2022
1 parent 5cd3b4b commit 02c59ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/paddle/fluid/executor.py
Expand Up @@ -1460,6 +1460,9 @@ def _can_use_interpreter_core(program, place):
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():
Expand Down Expand Up @@ -1502,6 +1505,10 @@ def _can_use_interpreter_core(program, place):
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)

Expand Down

0 comments on commit 02c59ed

Please sign in to comment.