diff --git a/python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py b/python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py index d14d7ef67dfacf..302fa7a9e620f4 100644 --- a/python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py +++ b/python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py @@ -1535,7 +1535,10 @@ def gen_compute_in_break_with_name_store(self, restore_names, instr_idx): instr_idx: the index for branch 1 to find the boundary and copy origin opcode """ - if self._graph.sir_ctx.TOS.graph_size() < ENV_MIN_GRAPH_SIZE.get(): + if ( + self._graph.sir_ctx.TOS.graph_size() < ENV_MIN_GRAPH_SIZE.get() + and sys.version_info < (3, 11) + ): store_var_info = {} for name in restore_names: _var = self.get_var(name)