File tree Expand file tree Collapse file tree 4 files changed +70
-0
lines changed Expand file tree Collapse file tree 4 files changed +70
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,9 @@ XPU 相关
126
126
:header: "API 名称", "API 功能"
127
127
:widths: 10, 30
128
128
129
+ " :ref: `Stream <cn_api_paddle_device_xpu_Stream >` ", "XPU ``StreamBase `` 的设备流包装器,该 API 未来计划废弃,不推荐使用"
130
+ " :ref: `Event <cn_api_paddle_device_xpu_Event >` ", "XPU ``StreamBase `` 的设备事件包装器,该 API 未来计划废弃,不推荐使用"
131
+ " :ref: `current_stream <cn_api_paddle_device_xpu_current_stream >` ", "通过 device 返回当前的 XPU stream"
129
132
" :ref: `device_count <cn_api_paddle_device_xpu_device_count >` ", "返回值是 int,表示当前程序可用的 XPU 数量"
130
133
" :ref: `empty_cache <cn_api_paddle_device_xpu_empty_cache >` ", "用于释放显存分配器中空闲的显存"
131
134
" :ref: `max_memory_allocated <cn_api_paddle_device_xpu_max_memory_allocated >` ", "返回给定设备上分配给 Tensor 的显存峰值统计"
Original file line number Diff line number Diff line change
1
+ .. _cn_api_paddle_device_xpu_Event :
2
+
3
+ Event
4
+ -------------------------------
5
+
6
+ .. py :class :: paddle.device.xpu.Event()
7
+
8
+ XPU event 的句柄。
9
+
10
+ 返回
11
+ ::::::::::::
12
+ None
13
+
14
+ 代码示例
15
+ ::::::::::::
16
+
17
+ COPY-FROM: paddle.device.xpu.Event
18
+
19
+
20
+ .. warning ::
21
+ 该 API 未来计划废弃,不推荐使用。
Original file line number Diff line number Diff line change
1
+ .. _cn_api_paddle_device_xpu_Stream :
2
+
3
+ Stream
4
+ -------------------------------
5
+
6
+ .. py :class :: paddle.device.xpu.Stream(device = None )
7
+
8
+ XPU stream 的句柄。
9
+
10
+ 参数
11
+ ::::::::::::
12
+
13
+ - **device ** (paddle.XPUPlace()|int|None,可选) - 希望分配 stream 的设备。如果是 None 或者负数,则设备为当前的设备。如果是正数,则必须小于设备的个数。默认值为 None。
14
+
15
+
16
+ 代码示例
17
+ ::::::::::::
18
+
19
+ COPY-FROM: paddle.device.xpu.Stream
20
+
21
+
22
+
23
+ .. warning ::
24
+ 该 API 未来计划废弃,不推荐使用。
Original file line number Diff line number Diff line change
1
+ .. _cn_api_paddle_device_xpu_current_stream :
2
+
3
+ current_stream
4
+ -------------------------------
5
+
6
+ .. py :function :: paddle.device.xpu.current_stream(device = None )
7
+
8
+ 通过 device 返回当前的 XPU stream。
9
+
10
+
11
+ 参数
12
+ ::::::::::::
13
+
14
+ - **device ** (paddle.XPUPlace()|int,可选) - 希望获取 stream 的设备或者设备 ID。如果为 None,则为当前的设备。默认值为 None。
15
+
16
+ 返回
17
+ ::::::::::::
18
+ XPUStream,设备的 stream。
19
+
20
+ 代码示例
21
+ ::::::::::::
22
+ COPY-FROM: paddle.device.xpu.current_stream
You can’t perform that action at this time.
0 commit comments