mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix creation of BINARY_SUBSCR
in Python 3.14+
Python 3.14 replaced `BINARY_SUBSCR` by `BINARY_OP(opcode=BN_SUBSCR)` ghstack-source-id: bb1a5a75282944740aff65305454c22984fb9dfe Pull-Request: https://github.com/pytorch/pytorch/pull/165864
This commit is contained in:
@ -74,6 +74,7 @@ from .bytecode_analysis import (
|
|||||||
from .bytecode_transformation import (
|
from .bytecode_transformation import (
|
||||||
cleaned_instructions,
|
cleaned_instructions,
|
||||||
create_binary_slice,
|
create_binary_slice,
|
||||||
|
create_binary_subscr,
|
||||||
create_call_function,
|
create_call_function,
|
||||||
create_call_function_ex,
|
create_call_function_ex,
|
||||||
create_copy,
|
create_copy,
|
||||||
@ -2724,7 +2725,7 @@ class InstructionTranslatorBase(
|
|||||||
*create_copy(2),
|
*create_copy(2),
|
||||||
# frame_values, frame N stack, frame_values
|
# frame_values, frame N stack, frame_values
|
||||||
create_load_const(0),
|
create_load_const(0),
|
||||||
create_instruction("BINARY_SUBSCR"),
|
create_binary_subscr(),
|
||||||
*create_binary_slice(0, 0, True),
|
*create_binary_slice(0, 0, True),
|
||||||
# frame_values[0][0:0] = frame N stack
|
# frame_values[0][0:0] = frame N stack
|
||||||
# frame_values left on top of stack
|
# frame_values left on top of stack
|
||||||
|
Reference in New Issue
Block a user