-
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
Construct dist tensor #54425
Construct dist tensor #54425
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
30ced8f
to
fa6cd14
Compare
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. no docs changes
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 overall,细节后续修改
class TestDistTensor(unittest.TestCase): | ||
def test_dist_tensor_creation(self): | ||
shape = [10, 5] | ||
dist_attr = paddle.fluid.core.TensorDistAttr() |
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.
python层的fluid API即将被清理,不建议将TensorDistAttr放到fluid目录下,
可以放到paddle.distributed目录下
dist_attr = paddle.fluid.core.TensorDistAttr() | ||
|
||
# create dist tensor using numpy | ||
dist_tensor_with_numpy = paddle.Tensor( |
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.
这里不建议用padde.Tensor来创建DistTensor,对返回的数据类型会有疑惑。
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
PR types
New features
PR changes
Others
Description
新增基础的DistTensor数据结构,paddle.Tensor对应新增dist_attr和is_dist两个分布式属性。
PCard-70447