mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
[dynamo, 3.14] fix segfault due to improper create_call_function_ex (#166678)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/166678 Approved by: https://github.com/malfet
This commit is contained in:
parent
4a7bc1d522
commit
e4043884c7
|
|
@ -4,10 +4,10 @@ import os
|
|||
from unittest.mock import patch
|
||||
|
||||
import torch
|
||||
from functorch import make_fx
|
||||
from torch._dynamo import debug_utils
|
||||
from torch._dynamo.debug_utils import aot_graph_input_parser, generate_env_vars_string
|
||||
from torch._dynamo.test_case import TestCase
|
||||
from torch.fx.experimental.proxy_tensor import make_fx
|
||||
from torch.testing._internal.common_device_type import instantiate_device_type_tests
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -415,6 +415,7 @@ def create_call_function_ex(
|
|||
and not ignore_314_kwargs_push
|
||||
):
|
||||
output.append(create_instruction("PUSH_NULL"))
|
||||
has_kwargs = True
|
||||
if push_null:
|
||||
output.append(create_instruction("PUSH_NULL"))
|
||||
# 3.13 swapped NULL and callable
|
||||
|
|
|
|||
|
|
@ -3176,7 +3176,7 @@ class InstructionTranslatorBase(
|
|||
]
|
||||
)
|
||||
|
||||
# TOS: resumes, frames (popped), frame 1 stack + locals
|
||||
# TOS: resume 1, remaining resumes, frames (popped), frame 1 stack + locals
|
||||
cg.extend_output(
|
||||
[
|
||||
*create_rot_n(3),
|
||||
|
|
@ -3187,12 +3187,8 @@ class InstructionTranslatorBase(
|
|||
]
|
||||
)
|
||||
|
||||
# TOS: [resumes, frames, *(frame 1 stack + locals)]
|
||||
cg.extend_output(
|
||||
[
|
||||
*create_call_function_ex(False, True),
|
||||
]
|
||||
)
|
||||
# TOS: resume 1, [remaining resumes, frames, *(frame 1 stack + locals)]
|
||||
cg.extend_output(create_call_function_ex(False, True))
|
||||
|
||||
def should_compile_partial_graph(self) -> bool:
|
||||
if sys.version_info >= (3, 11):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user