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][dynamic shape] Use guard value instead of raise_break_graph_fn to call int/float #66346

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

zrr1999
Copy link
Member

@zrr1999 zrr1999 commented Jul 22, 2024

PR Category

Execute Infrastructure

PR Types

Performance

Description

Use guard value instead of raise_break_graph_fn to call int/float

Copy link

paddle-bot bot commented Jul 22, 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 Jul 22, 2024
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.

emmm 好像没看出来为啥 CI 会挂

Copy link

paddle-ci-bot bot commented Jul 31, 2024

Sorry to inform you that 0863104's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link

paddle-ci-bot bot commented Aug 9, 2024

Sorry to inform you that f4200a6's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

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 🐾

@@ -58,7 +58,7 @@ class OpcodeExecutorCache(metaclass=Singleton):
MAX_CACHE_SIZE = 20
cache: dict[types.CodeType, GuardedFunctions]
translate_count: int
code_symbolic_inputs: dict[types.CodeType, dict[str, dict[int, int]]]
code_symbolic_inputs: dict[types.CodeType, dict[str, None | dict[int, int]]]
Copy link
Member

Choose a reason for hiding this comment

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

这是不是误提交?是不是应该是下个 PR 的?

不过先这样吧

@@ -714,6 +715,18 @@ def __bool__(self) -> bool:
def bool(self):
return ConstantVariable(bool(self), self.graph, DummyTracker([self]))

def __int__(self) -> int:
Copy link
Member

Choose a reason for hiding this comment

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

__int____float__ 后续使用时要注意,不带 Tracker,可能会导致 guard 缺失的问题

@zrr1999 zrr1999 merged commit 4d898d9 into PaddlePaddle:develop Aug 28, 2024
29 checks passed
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