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

Construct dist tensor #54425

Merged
merged 2 commits into from
Jun 13, 2023
Merged

Construct dist tensor #54425

merged 2 commits into from
Jun 13, 2023

Conversation

LiYuRio
Copy link
Contributor

@LiYuRio LiYuRio commented Jun 7, 2023

PR types

New features

PR changes

Others

Description

新增基础的DistTensor数据结构,paddle.Tensor对应新增dist_attr和is_dist两个分布式属性。
PCard-70447

@paddle-bot
Copy link

paddle-bot bot commented Jun 7, 2023

你的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.

@LiYuRio LiYuRio force-pushed the dev_dist_tensor branch 23 times, most recently from 30ced8f to fa6cd14 Compare June 9, 2023 06:46
@LiYuRio LiYuRio force-pushed the dev_dist_tensor branch from fa6cd14 to 945231f Compare June 9, 2023 08:30
Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM. no docs changes

Copy link
Member

@ForFishes ForFishes 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

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM overall,细节后续修改

class TestDistTensor(unittest.TestCase):
def test_dist_tensor_creation(self):
shape = [10, 5]
dist_attr = paddle.fluid.core.TensorDistAttr()
Copy link
Contributor

Choose a reason for hiding this comment

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

python层的fluid API即将被清理,不建议将TensorDistAttr放到fluid目录下,
可以放到paddle.distributed目录下

dist_attr = paddle.fluid.core.TensorDistAttr()

# create dist tensor using numpy
dist_tensor_with_numpy = paddle.Tensor(
Copy link
Contributor

Choose a reason for hiding this comment

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

这里不建议用padde.Tensor来创建DistTensor,对返回的数据类型会有疑惑。

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@LiYuRio LiYuRio merged commit e32c437 into PaddlePaddle:develop Jun 13, 2023
@LiYuRio LiYuRio deleted the dev_dist_tensor branch June 13, 2023 13:42
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.

5 participants