-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[SOT][DynamicShape] Add basic constraint mechanism #72250
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][DynamicShape] Add basic constraint mechanism #72250
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
if not all( | ||
var.value.is_backed() for var in symbolic_vars.values() | ||
): | ||
raise BreakGraphError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO:这里的打断会导致下面 except Fallback,但实际上希望的是和 Tensor 一样的打断,这需要在 if_break_graph_decorator
感知到包含 unbacked symbol 并视为等同于 Tensor 的 DDCF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另一个 TODO:目前约束专为 SOT guard 设计,因此表示上类似 GE(Sub(Add(S0, 1), 2), 3)
这种,目前还没有传递给编译器,传给编译器的仍然只有固有约束 S0 >= 2
,后续会逐步考虑这些(上面的求解出约束 S0 >= 4
也不是那么好实现)
PR Category
Execute Infrastructure
PR Types
Performance
Description
添加全新的约束机制,确保在
if symbol
时候能够将 symbol 状态放到约束,相关符号最后会根据约束来生成 guard比如