Skip to content

[SOT] Dispatcher support ListVariable extend DictVariable and DictVariable #67823

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

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Aug 29, 2024

PR Category

Execute Infrastructure

PR Types

Performance

Description

支持list.extend(list, range | list | dict)

相关pr:

Copy link

paddle-bot bot commented Aug 29, 2024

你的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 Aug 29, 2024
@@ -1072,15 +1074,12 @@ def build_seq_unpack(self, instr: Instruction):
)
)

@call_break_graph_decorator(push_n=1)
Copy link
Member

Choose a reason for hiding this comment

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

这是为啥?

Copy link
Member Author

Choose a reason for hiding this comment

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

想看看还有没有别的地方会 BreakGraphError 挂在这里

if not isinstance(item, (TupleVariable, ListVariable)):
raise BreakGraphError(f"{type(item)} not support unpack")
retval.extend(item.get_wrapped_items())
assert isinstance(
Copy link
Member

Choose a reason for hiding this comment

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

这里是怎么保证没有其他 type 进来的?dispatch 没添加还是?

Copy link
Member Author

Choose a reason for hiding this comment

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

BUILD_* 字节码和 dispatch 都会限制

Copy link
Member

@SigureMo SigureMo left a comment

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 3079387 into PaddlePaddle:develop Sep 3, 2024
29 checks passed
@gouzil gouzil deleted the sot/fix_list_extend branch November 22, 2024 15:04
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