def _run_impl(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache):
    if self._closed:
        raise RuntimeError('Attempted to use a closed Executor')
    if (scope is None):
        scope = global_scope()
    if (fetch_list is None):
        fetch_list = []
    compiled = isinstance(program, compiler.CompiledProgram)
    if (not compiled):
        return self._run_program(program, self._default_executor, feed=feed, fetch_list=fetch_list, feed_var_name=feed_var_name, fetch_var_name=fetch_var_name, scope=scope, return_numpy=return_numpy, use_program_cache=use_program_cache)
    elif (fetch_list and program._is_data_parallel and program._program and program._build_strategy._use_legacy_memory_optimize_strategy):
        self._check_fetch_vars_persistable(program._program, fetch_list)
    program._compile(scope, self.place)
    if program._is_data_parallel:
        return self._run_parallel(program, scope=scope, feed=feed, fetch_list=fetch_list, fetch_var_name=fetch_var_name, return_numpy=return_numpy)
    elif program._is_inference:
        return self._run_inference(program._executor, feed)
    else:
        assert program._program, 'CompiledProgram is compiled from graph, can only run with_data_parallel.'
        return self._run_program(program._program, self._default_executor, feed=feed, fetch_list=fetch_list, feed_var_name=feed_var_name, fetch_var_name=fetch_var_name, scope=scope, return_numpy=return_numpy, use_program_cache=False)
def _run_impl(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache):
    if self._closed:
        raise RuntimeError('Attempted to use a closed Executor')
    if (scope is None):
        scope = global_scope()
    if (fetch_list is None):
        fetch_list = []
    compiled = isinstance(program, compiler.CompiledProgram)
    if (not compiled):
        return self._run_program(program, self._default_executor, feed=feed, fetch_list=fetch_list, feed_var_name=feed_var_name, fetch_var_name=fetch_var_name, scope=scope, return_numpy=return_numpy, use_program_cache=use_program_cache)
    elif (fetch_list and program._is_data_parallel and program._program and program._build_strategy._use_legacy_memory_optimize_strategy):
        self._check_fetch_vars_persistable(program._program, fetch_list)
    program._compile(scope, self.place)
    if program._is_data_parallel:
        return self._run_parallel(program, scope=scope, feed=feed, fetch_list=fetch_list, fetch_var_name=fetch_var_name, return_numpy=return_numpy)
    elif program._is_inference:
        return self._run_inference(program._executor, feed)
    else:
        assert program._program, 'CompiledProgram is compiled from graph, can only run with_data_parallel.'
        return self._run_program(program._program, self._default_executor, feed=feed, fetch_list=fetch_list, feed_var_name=feed_var_name, fetch_var_name=fetch_var_name, scope=scope, return_numpy=return_numpy, use_program_cache=False)