Skip to content

Conversation

@DesmonDay
Copy link
Contributor

@DesmonDay DesmonDay commented Nov 17, 2021

Add doc for paddle.incubate.graph_send_recv api.
The origin PR is Paddle PR 37205.

中文文档:
image

英文文档:
image

@paddle-bot-old
Copy link

Thanks for your contribution!


.. py:function:: paddle.incubate.send_recv(x, src_index, dst_index, pool_type="sum", name=None)

此API主要应用于图领域,目的是为了减少在消息传递过程中带来的中间变量显存或内存的损耗。其中,``x``作为输入Tensor,首先利用``src_index``作为索引来gather出在``x``中相应位置的条目,随后再将gather出的结果利用``dst_index``来scatter到对应的输出结果中,其中``pool_type``表示scatter的不同处理方式,包括sum、mean、max、min共计4种处理模式。
Copy link
Contributor

Choose a reason for hiding this comment

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

图领域->图学习领域,条目-> 数据

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

.. code-block:: python

import paddle
import numpy as np
Copy link
Contributor

Choose a reason for hiding this comment

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

numpy提前

在import后面留一个空行

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已删除 numpy

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2021

CLA assistant check
All committers have signed the CLA.

@DesmonDay DesmonDay changed the title Add paddle.incubate.send_recv API docs Add paddle.incubate.graph_send_recv API docs Nov 18, 2021
Copy link
Contributor

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

@wawltor wawltor merged commit 79874e0 into PaddlePaddle:develop Nov 23, 2021
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.

4 participants