Skip to content

Conversation

@zhangbo9674
Copy link
Contributor

@zhangbo9674 zhangbo9674 commented Aug 5, 2024

PR Category

Auto Parallel

PR Types

New features

Description

为 PIR dist program 支持 save & load,具体工作包括:

  • 支持 DistTensorType 的序列化及反序列化
  • 支持 ProcessMeshAttribute、TensorDistAttribute、OperationDistAttribute 的序列化及反序列化
  • 添加相关单测

后续扩展分布式属性的 save 及 load 的方法:

  • GetOpDistAttr 函数中添加分布式属性的关键字
  • 在 serialize_utils 及 deserialize_utils 中添加相关属性的序列化及反序列化接口

Pcard-73145

@paddle-bot
Copy link

paddle-bot bot commented Aug 5, 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.

using Base::Base;
using LoD = pir::DenseTensorTypeStorage::LoD;

static std::string name() { return "t_dist_dense_tensor"; }
Copy link
Contributor

Choose a reason for hiding this comment

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

这个可以改成t_dist_dtensor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

for (auto key : GetOpDistAttr()) {
if (op.attributes().count(key) > 0) {
op_json[key] = pir::writeAttr(op.attributes().at(key));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

这个地方应该加在op_json[ATTRS] 里,不能给op_json 起新的key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, tks!

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhangbo9674 zhangbo9674 merged commit 3fd43fb into PaddlePaddle:develop Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants