-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[AutoParallel] Generate spmd rule and reshard impl in phi api #56831
[AutoParallel] Generate spmd rule and reshard impl in phi api #56831
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
… ap/generate_spmd_and_reshard
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
…Paddle#56831) * add spmd and reshard code gen * add backward reshard code gen * test matmul forward success * polish test impl * add unsafe mutable value * polish details and add test * fix unittest time out * fix typo * refactor reshard input generate impl * resolve conflict with develop * fix compile error
PR types
New features
PR changes
Others
Description
Pcard-73145
[AutoParallel] Generate spmd rule and reshard impl in phi api
在PHI前向API中生成切分推导与切分转换的逻辑实现。
具体地,以matmul为例,切分推导规则所对应函数增加到了yaml的infer_meta字段下
考虑如下:
然后在前向API实现中生成对MatmulSpmdInferForward的调用:
前向API仅需要对Input进行切分转换,对原来假设的流程进行了微调,生成代码如下:
调整后的前向API动半分支生成结果:
TODO(下个PR进行):