From c8fac071520b70a4627ca47426e6b6ad5ec5cf10 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Wed, 15 Nov 2023 07:18:17 +0000 Subject: [PATCH] fix typo `restroe` --- .../jit/sot/opcode_translator/executor/function_graph.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/jit/sot/opcode_translator/executor/function_graph.py b/python/paddle/jit/sot/opcode_translator/executor/function_graph.py index 615eacf24e34c..5fd5ab9c70543 100644 --- a/python/paddle/jit/sot/opcode_translator/executor/function_graph.py +++ b/python/paddle/jit/sot/opcode_translator/executor/function_graph.py @@ -262,15 +262,15 @@ def load(self, var, allow_push_null=True): origin_instrs = get_instructions(self.pycode_gen._origin_code) - restroe_instrs = origin_instrs[:instr_idx] + restore_instrs = origin_instrs[:instr_idx] restore_instr_names = [ - instr.opname for instr in restroe_instrs[:instr_idx] + instr.opname for instr in restore_instrs[:instr_idx] ] # NOTE(SigureMo): Trailing KW_NAMES + PRECALL is no need to restore in Python 3.11+ if restore_instr_names[-2:] == ["KW_NAMES", "PRECALL"]: - restroe_instrs = restroe_instrs[:-2] + restore_instrs = restore_instrs[:-2] - for instr in restroe_instrs: + for instr in restore_instrs: if ( instr.opname == 'LOAD_FAST' and instr.argval in self.pycode_gen._frame.f_locals.keys()