Skip to content

Commit

Permalink
[NewExe] update run checks of standalone executor (#52313)
Browse files Browse the repository at this point in the history
* update run checks of standalone executor

* remove mlu related code
  • Loading branch information
kangguangli authored Mar 31, 2023
1 parent 1da6777 commit 8372329
Showing 1 changed file with 0 additions and 24 deletions.
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()
):
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

0 comments on commit 8372329

Please sign in to comment.