Skip to content

[NewExe] update run checks of standalone executor #52313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions python/paddle/fluid/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,8 +1585,6 @@ def _run_impl(
program = pruned_program

def _can_use_interpreter_core(program, place):
if core.is_compiled_with_mlu():
return False

compiled = isinstance(
program, compiler.CompiledProgram
Expand All @@ -1606,28 +1604,6 @@ def _can_use_interpreter_core(program, place):
)
return False

# Unsupported case 2: async mode
if (
compiled_program._build_strategy is not None
and compiled_program._build_strategy.async_mode
):
warnings.warn(
"Standalone executor is not used for async mode",
UserWarning,
)
return False

# Unsupported case 3: CUDA Graph
if (
compiled_program._build_strategy is not None
and compiled_program._build_strategy.allow_cuda_graph_capture
and not _is_cuda_graph_enable_standalone_executor()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这个判断不需要了,_is_cuda_graph_enable_standalone_executor()和FLAGS_CUDA_GRAPH_USE_STANDALONE_EXECUTOR环境变量是不是都可以删掉了?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,后续打算和其他flag一起删除

):
warnings.warn(
"Standalone executor is not used for CUDA Graph when FLAGS_CUDA_GRAPH_USE_STANDALONE_EXECUTOR=0",
UserWarning,
)
return False
return True

if self._enable_interpreter_core and _can_use_interpreter_core(
Expand Down