Skip to content

[SOT][3.12] fix gen_load_attr index error in Python 3.12 - #61883

Merged
SigureMo merged 2 commits into
PaddlePaddle:developfrom
gouzil:sot_gen_load_attr_312
Feb 21, 2024
Merged

[SOT][3.12] fix gen_load_attr index error in Python 3.12#61883
SigureMo merged 2 commits into
PaddlePaddle:developfrom
gouzil:sot_gen_load_attr_312

Conversation

@gouzil

@gouzil gouzil commented Feb 20, 2024

Copy link
Copy Markdown
Member

PR types

Others

PR changes

Others

Description

修复gen_load_attridx错误引发的RuntimeError: Found BreakGraphError raised, it should not be catch at start_translate!

参考链接:

相关链接:

@paddle-bot

paddle-bot Bot commented Feb 20, 2024

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot Bot added the contributor External developers label Feb 20, 2024
@SigureMo
SigureMo self-requested a review February 20, 2024 12:27
assert isinstance(instr.arg, int)
self._call_shape = self._co_consts[instr.arg].get_py_value()

@call_break_graph_decorator(push_n=1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

3.11 不能加这个吧,可以针对 3.12+ 加一下

class Foo:
    def bar(self):
        ...

    bar = deco(bar) if Python3.12 else bar

@SigureMo SigureMo self-assigned this Feb 20, 2024
Comment thread python/paddle/jit/sot/opcode_translator/executor/opcode_executor.py

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTMeow

@SigureMo
SigureMo merged commit c07c2ec into PaddlePaddle:develop Feb 21, 2024
@gouzil
gouzil deleted the sot_gen_load_attr_312 branch April 23, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants