Skip to content

[XPU] update paddle.device.xpu doc for new Stream Event api #7379

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/api/paddle/device/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ XPU 相关
:header: "API 名称", "API 功能"
:widths: 10, 30

" :ref:`Stream <cn_api_paddle_device_xpu_Stream>` ", "XPU ``StreamBase`` 的设备流包装器,该 API 未来计划废弃,不推荐使用"
" :ref:`Event <cn_api_paddle_device_xpu_Event>` ", "XPU ``EventBase`` 的设备事件包装器,该 API 未来计划废弃,不推荐使用"
" :ref:`device_count <cn_api_paddle_device_xpu_device_count>` ", "返回值是 int,表示当前程序可用的 XPU 数量"
" :ref:`empty_cache <cn_api_paddle_device_xpu_empty_cache>` ", "用于释放显存分配器中空闲的显存"
" :ref:`max_memory_allocated <cn_api_paddle_device_xpu_max_memory_allocated>` ", "返回给定设备上分配给 Tensor 的显存峰值统计"
Expand Down
21 changes: 21 additions & 0 deletions docs/api/paddle/device/xpu/Event_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _cn_api_paddle_device_xpu_Event:

Event
-------------------------------

.. py:class:: paddle.device.xpu.Event()

XPU event 的句柄。

返回
::::::::::::
None

代码示例
::::::::::::

COPY-FROM: paddle.device.xpu.Event


.. warning::
该 API 未来计划废弃,不推荐使用。
24 changes: 24 additions & 0 deletions docs/api/paddle/device/xpu/Stream_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. _cn_api_paddle_device_xpu_Stream:

Stream
-------------------------------

.. py:class:: paddle.device.xpu.Stream(device=None)

XPU stream 的句柄。

参数
::::::::::::

- **device** (paddle.XPUPlace()|int|None,可选) - 希望分配 stream 的设备。如果是 None 或者负数,则设备为当前的设备。如果是正数,则必须小于设备的个数。默认值为 None。


代码示例
::::::::::::

COPY-FROM: paddle.device.xpu.Stream



.. warning::
该 API 未来计划废弃,不推荐使用。