-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[OpAttr]Add SupportTensor for OpMaker with whitelist mechanism #45084
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
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.
LGTM
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.
LGTM
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.
LGTM
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.
LGTM for whl size
PR types
Others
PR changes
Others
Describe
What's New?
1. 拆分attribute.h
将TypedChecker 相关逻辑从 attribute.h 中拆分独立到 attribute_checker.h中。考虑到后续checker逻辑可能会持续完善,依赖的头文件会更多,影响 attribute.h 作为最底层头文件的作用,故将其拆分,避免 attribute.h 依赖更多头文件。
2. 扩展OpProto.Attr
在OpProto.Attr 中添加了
support_tensor
字段,用于标记一个Attribute是否具备「支持可变Attribute」的能力。为什么要在 Proto 里标记?
答:因为飞桨的一些下游组件与主框架基本解耦的。比如Paddle2ONNX组件,其仅依赖于主框架中的 framework.proto。在Proto添加此标记,可以更便捷地与下游组件进行信息同步,也可避免对下游组件侵入式的代码修改。
3. TypedVarInfoChecker
添加了
TypedVarInfoChecker
逻辑,主要用于可变Attribute的必要性检查,包括:4. 其他
关于Coverage CI中提到此PR会导致coverage的build size增长3G的原因,目前怀疑是在framework.proto增加了字段,为底层逻辑修改,导致上层编译单元均依赖了此头文件(proto.pb.h)