-
Notifications
You must be signed in to change notification settings - Fork 777
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
add_dtensor_from_fn_cn_doc #6130
Changes from 5 commits
af186d6
4da3257
d8a23bb
a17bed7
8352690
1a35a33
5b1d7a8
8ffa05a
35b16b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,30 @@ | ||||||||||||
.. _cn_api_distributed_dtensor_from_fn: | ||||||||||||
|
||||||||||||
dtensor_from_fn | ||||||||||||
------------------------------- | ||||||||||||
|
||||||||||||
.. py:class:: paddle.distributed.dtensor_from_fn(fn, dist_attr, *args, **kwargs) | ||||||||||||
|
||||||||||||
通过一个paddle API(一般是Tensor创建类的API)结合分布式属性dist_attr创建一个带有分布式属性的Tensor。 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 中英文间需要保留空格,保证写作风格统一,也检查下其余的地方有没有类似的问题
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||||||||
|
||||||||||||
参数 | ||||||||||||
::::::::: | ||||||||||||
|
||||||||||||
- **fn** - paddle公开的可创建Tensor的API。例如:`paddle.empty`_、`paddle.ones`_、`paddle.zeros`_等paddle API | ||||||||||||
.. _paddle.empty:https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/creation.py | ||||||||||||
.. _paddle.ones:https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/creation.py | ||||||||||||
.. _paddle.zeros:https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/tensor/creation.py | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 既然是中文文档,引用的相关 API 文档也请用中文的,即
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||||||||
- **dist_attr** (paddle.distributed.DistAttr) - 描述 Tensor 在 ProcessMesh 上的分布或切片方式。 | ||||||||||||
- ***args** - fn函数的输入参数(Tuple形式) | ||||||||||||
- ****kwargs** - fn函数的输入参数(Dict形式) | ||||||||||||
|
||||||||||||
|
||||||||||||
返回 | ||||||||||||
::::::::: | ||||||||||||
带有分布式信息的 Tensor | ||||||||||||
|
||||||||||||
|
||||||||||||
|
||||||||||||
**代码示例** | ||||||||||||
|
||||||||||||
COPY-FROM: paddle.distributed.dtensor_from_fn |
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.
该 api_label 和路径对齐
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.
done