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 Guard 机制性能优化 #69264

Open
zrr1999 opened this issue Nov 9, 2024 · 1 comment
Open

SOT Guard 机制性能优化 #69264

zrr1999 opened this issue Nov 9, 2024 · 1 comment
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc SOT

Comments

@zrr1999
Copy link
Member

zrr1999 commented Nov 9, 2024

Guard 节点实现

Guard 类型汇总

通过统计 make_stringified_guard 中出现的 StringifiedExpression,可以大致得到需要的 Guard 类型。

基础 Guard 进度跟踪

Guard 类型 Guard 描述 当前进度 相关 PR
TypeMatchGuard 检查类型是否匹配 #69313
ValueMatchGuard 检查值是否匹配 #69313
LengthMatchGuard 检查长度是否匹配 #69313
DtypeMatchGuard 检查 dtype 是否匹配 #69313
ShapeMatchGuard 检查 shape 是否匹配 #69353
AttributeMatchGuard 检查某个对象的 attr 是否匹配 #69411

组合 Guard 进度跟踪

Guard 类型 Guard 描述 当前进度 相关 PR
TensorMetaMatchGuard 检查 Tensor 元信息是否匹配
LayerMatchGuard 检查是否是同一个 Layer,并且 training 状态一致 #69313
RangeMatchGuard 检查是否同样的 range #69411

特殊 Guard 进度跟踪

Guard 类型 Guard 描述 当前进度 相关 PR
GuardGroup 合并多个 Guard 作为一组,对外的行为与单个 Guard 一致 #69313
LambdaGuard 支持 lambda 表达式作为 Guard #69313

FasterStringifiedExpression 适配

进度跟踪

函数/类 所在文件 用途 单测情况 当前进度 相关 PR
object_equal_stringified_guard guard.py
VariableBase base.py #69411
NumpyVariable basic.py
SliceVariable basic.py
TensorVariable basic.py
TensorDtypeVariable basic.py #69353
LayerVariable callable.py #69411
ContainerLayerVariable callable.py #69411
RangeVariable container.py
ContainerVariable container.py

性能测试项目

https://github.com/zrr1999/PaddleGuardBenchmark

@zrr1999 zrr1999 added status/new-issue 新建 type/others 其他问题 labels Nov 9, 2024
@zrr1999 zrr1999 added SOT and removed status/new-issue 新建 type/others 其他问题 labels Nov 9, 2024
@zrr1999 zrr1999 assigned SigureMo and zrr1999 and unassigned risemeup1 Nov 9, 2024
@paddle-bot paddle-bot bot added the PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc label Nov 9, 2024
@zrr1999
Copy link
Member Author

zrr1999 commented Nov 13, 2024

后续需要改进一下log信息
image
#69353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc SOT
Projects
None yet
Development

No branches or pull requests

3 participants