Skip to content

Commit 191a334

Browse files
authored
[SOT][3.14] support LOAD_SMALL_INT opcode (#76257)
1 parent fcf3b10 commit 191a334

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,11 @@ def LOAD_FAST(self, instr: Instruction):
996996
def LOAD_FAST_CHECK(self, instr: Instruction):
997997
self.LOAD_FAST(instr)
998998

999+
def LOAD_SMALL_INT(self, instr: Instruction):
1000+
int_value = instr.argval
1001+
int_var = ConstantVariable.wrap_literal(int_value, self._graph)
1002+
self.stack.push(int_var)
1003+
9991004
# 3.14 opcodes
10001005
LOAD_FAST_BORROW = LOAD_FAST
10011006
NOT_TAKEN = NOP

0 commit comments

Comments
 (0)