未验证 提交 77a8c94b 编写于 作者: A Aurelius84 提交者: GitHub

fix CompileProgram in Executor (#37036)

上级 d817388e
...@@ -1301,9 +1301,13 @@ class Executor(object): ...@@ -1301,9 +1301,13 @@ class Executor(object):
# NOTE: This is an experimental feature. If `export FLAGS_USE_STANDALONE_EXECUTOR=1 `, # NOTE: This is an experimental feature. If `export FLAGS_USE_STANDALONE_EXECUTOR=1 `,
# use StandaloneExecutor to run the program. # use StandaloneExecutor to run the program.
if self._enable_interpreter_core and not program._is_start_up_program_: if self._enable_interpreter_core:
return self._executor_cache.run(program, scope, feed, fetch_list, inner_program_ = program._program if isinstance(
return_numpy) program, compiler.CompiledProgram) else program
assert isinstance(inner_program_, framework.Program)
if not program._is_start_up_program_:
return self._executor_cache.run(program, scope, feed,
fetch_list, return_numpy)
# use_prune can be overrided by putting optimize_ops in fetch_list # use_prune can be overrided by putting optimize_ops in fetch_list
_origin_fetch_list = fetch_list _origin_fetch_list = fetch_list
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册