Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOT][3.11] Do not restore KW_NAMES + PRECALL in 3.11 #59017

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Nov 15, 2023

PR types

Bug fixes

PR changes

Others

Description

在发生 call breakgraph 时,不应该恢复已经执行过的序列中最后的 KW_NAMES + PRECALL,因为 KW_NAMES 是一个有副作用的字节码,会在后面需要的时候恢复,如果在开始就直接恢复会导致影响后面的 CALL,而 PRECALL 直接不用恢复,因为 PRECALL 的作用在模拟执行的时候就生效了,不需要生成字节码来实现

因此按照 trailing KW_NAMES + PRECALL pattern 来匹配,若匹配则删掉它们

PCard-66972


for instr in origin_instr[0:instr_idx]:
restroe_instrs = origin_instrs[:instr_idx]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo error !

2742195759
2742195759 previously approved these changes Nov 15, 2023
Copy link
Contributor

@2742195759 2742195759 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@gouzil gouzil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SigureMo SigureMo merged commit 2b3edfc into PaddlePaddle:develop Nov 16, 2023
@SigureMo SigureMo deleted the sot/py311-no-need-to-restore-kwnames-precall branch November 16, 2023 02:38
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants