Skip to content

Commit c3cf3eb

Browse files
authored
[CodeStyle] run pre-commit on all files (#7523)
1 parent c4bdfa3 commit c3cf3eb

File tree

8 files changed

+100
-100
lines changed

8 files changed

+100
-100
lines changed

ci_scripts/check_api_label_cn.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [ -z ${BRANCH} ]; then
1313
BRANCH="develop"
1414
fi
1515

16-
all_git_files=`git diff --name-only --diff-filter=ACMR upstream/${BRANCH} | sed 's#docs/##g'`
16+
all_git_files=`git diff --name-only --diff-filter=ACMR upstream/${BRANCH} | sed 's#^docs/##'`
1717
echo $all_git_files
1818
echo "Run API_LABEL Checking"
1919
python check_api_label_cn.py ${DOCROOT} ${APIROOT} $all_git_files

docs/api_guides/low_level/layers/sparse_update.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
.. image:: ../../../design/dist_train/src/lookup_table_training.png
1515
:scale: 50 %
1616

17-
API 详细使用方法参考 `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>`
17+
API 详细使用方法参考 `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>`

docs/api_guides/low_level/layers/sparse_update_en.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ As shown in the figure: two rows in a Tensor are not 0. In the process of forwar
1717
Example
1818
--------------------------
1919

20-
API reference `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>` .
20+
API reference `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>` .

docs/dev_guides/custom_device_docs/custom_runtime_cn.rst

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,45 +16,45 @@
1616
Device 接口
1717
############
1818

19-
+------------------------+--------------------------+------+
20-
| 接口名称 | 功能简介 | 必选 |
21-
+========================+==========================+======+
22-
| initialize | 初始化硬件后端。 | N |
23-
+------------------------+--------------------------+------+
24-
| finalize | 去初始化硬件后端。 | N |
25-
+------------------------+--------------------------+------+
26-
| init_device | 初始化指定硬件设备。 | N |
27-
+------------------------+--------------------------+------+
28-
| deinit_device | 去初始化指定硬件设备。 | N |
29-
+------------------------+--------------------------+------+
30-
| set_device | 设置当前使用的硬件设备。 | Y |
31-
+------------------------+--------------------------+------+
32-
| get_device | 获取当前使用的硬件设备。 | Y |
33-
+------------------------+--------------------------+------+
34-
| synchronize_device | 同步指定的硬件设备。 | Y |
35-
+------------------------+--------------------------+------+
36-
| get_device_count | 查询可用设备数量。 | Y |
37-
+------------------------+--------------------------+------+
38-
| get_device_list | 查询可用设备号。 | Y |
39-
+------------------------+--------------------------+------+
40-
| get_compute_capability | 查询设备算力。 | Y |
41-
+------------------------+--------------------------+------+
42-
| get_runtime_version | 查询运行时版本号。 | Y |
43-
+------------------------+--------------------------+------+
44-
| get_driver_version | 查询驱动版本号。 | Y |
45-
+------------------------+--------------------------+------+
46-
| get_multi_process | 获取设备上的MultiProcessor数量。 | N |
47-
+------------------------+--------------------------+------+
48-
| get_max_threads_per_mp | 获取设备每个MultiProcessor上的最大线程数。| N |
49-
+------------------------+--------------------------+------+
50-
| get_max_threads_per_block | 获取设备每个Block能够运行的最大线程数。 | N |
51-
+------------------------+--------------------------+------+
52-
| get_max_grid_dim_size | 获取设备最大网格维度大小。 | N |
53-
+------------------------+--------------------------+------+
54-
| init_eigen_device | 初始化Eigen GPU设备对象。 | N |
55-
+------------------------+--------------------------+------+
56-
| destroy_eigen_device | 销毁Eigen GPU设备对象。 | N |
57-
+------------------------+--------------------------+------+
19+
+---------------------------+----------------------------------------------+------+
20+
| 接口名称 | 功能简介 | 必选 |
21+
+===========================+==============================================+======+
22+
| initialize | 初始化硬件后端。 | N |
23+
+---------------------------+----------------------------------------------+------+
24+
| finalize | 去初始化硬件后端。 | N |
25+
+---------------------------+----------------------------------------------+------+
26+
| init_device | 初始化指定硬件设备。 | N |
27+
+---------------------------+----------------------------------------------+------+
28+
| deinit_device | 去初始化指定硬件设备。 | N |
29+
+---------------------------+----------------------------------------------+------+
30+
| set_device | 设置当前使用的硬件设备。 | Y |
31+
+---------------------------+----------------------------------------------+------+
32+
| get_device | 获取当前使用的硬件设备。 | Y |
33+
+---------------------------+----------------------------------------------+------+
34+
| synchronize_device | 同步指定的硬件设备。 | Y |
35+
+---------------------------+----------------------------------------------+------+
36+
| get_device_count | 查询可用设备数量。 | Y |
37+
+---------------------------+----------------------------------------------+------+
38+
| get_device_list | 查询可用设备号。 | Y |
39+
+---------------------------+----------------------------------------------+------+
40+
| get_compute_capability | 查询设备算力。 | Y |
41+
+---------------------------+----------------------------------------------+------+
42+
| get_runtime_version | 查询运行时版本号。 | Y |
43+
+---------------------------+----------------------------------------------+------+
44+
| get_driver_version | 查询驱动版本号。 | Y |
45+
+---------------------------+----------------------------------------------+------+
46+
| get_multi_process | 获取设备上的 MultiProcessor 数量。 | N |
47+
+---------------------------+----------------------------------------------+------+
48+
| get_max_threads_per_mp | 获取设备每个 MultiProcessor 上的最大线程数。 | N |
49+
+---------------------------+----------------------------------------------+------+
50+
| get_max_threads_per_block | 获取设备每个 Block 能够运行的最大线程数。 | N |
51+
+---------------------------+----------------------------------------------+------+
52+
| get_max_grid_dim_size | 获取设备最大网格维度大小。 | N |
53+
+---------------------------+----------------------------------------------+------+
54+
| init_eigen_device | 初始化 Eigen GPU 设备对象。 | N |
55+
+---------------------------+----------------------------------------------+------+
56+
| destroy_eigen_device | 销毁 Eigen GPU 设备对象。 | N |
57+
+---------------------------+----------------------------------------------+------+
5858

5959

6060
Memory 接口

docs/dev_guides/custom_device_docs/device_api_cn.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,12 @@ C_Status (*get_multi_process)(const C_Device device, size_t* multi_process);
197197
198198
### 接口说明
199199
200-
获取设备上的MultiProcessor数量
200+
获取设备上的 MultiProcessor 数量
201201
202202
### 参数
203203
204-
device - 需要获取MultiProcessor数量的设备
205-
multi_process - 存储MultiProcessor数量
204+
device - 需要获取 MultiProcessor 数量的设备
205+
multi_process - 存储 MultiProcessor 数量
206206
207207
## get_max_threads_per_mp 【optional】
208208
@@ -214,12 +214,12 @@ C_Status (*get_max_threads_per_mp)(const C_Device device, size_t* threads_per_mp
214214

215215
### 接口说明
216216

217-
获取设备每个MultiProcessor上的最大线程数
217+
获取设备每个 MultiProcessor 上的最大线程数
218218

219219
### 参数
220220

221-
device - 需要获取每个MultiProcessor上的最大线程数的设备
222-
threads_per_mp - 存储MultiProcessor上最大线程数
221+
device - 需要获取每个 MultiProcessor 上的最大线程数的设备
222+
threads_per_mp - 存储 MultiProcessor 上最大线程数
223223

224224
## get_max_threads_per_block 【optional】
225225

@@ -231,12 +231,12 @@ C_Status (*get_max_threads_per_block)(const C_Device device, size_t* threads_per
231231
232232
### 接口说明
233233
234-
获取设备每个Block能够运行的最大线程数
234+
获取设备每个 Block 能够运行的最大线程数
235235
236236
### 参数
237237
238-
device - 需要获取每个Block能够运行的最大线程数的设备
239-
threads_per_block - 存储Block上最大线程数
238+
device - 需要获取每个 Block 能够运行的最大线程数的设备
239+
threads_per_block - 存储 Block 上最大线程数
240240
241241
## get_max_grid_dim_size 【optional】
242242
@@ -268,14 +268,14 @@ C_Status (*init_eigen_device)(C_Place place,
268268
269269
### 接口说明
270270
271-
初始化Eigen GPU设备对象
271+
初始化 Eigen GPU 设备对象
272272
273273
### 参数
274274
275-
place - 使用的设备的place对象
276-
eigen_device - 存储Eigen GPU设备对象
277-
stream - Custom Context中stream对象
278-
allocator - Custom Context中的分配器对象
275+
place - 使用的设备的 place 对象
276+
eigen_device - 存储 Eigen GPU 设备对象
277+
stream - Custom Context 中 stream 对象
278+
allocator - Custom Context 中的分配器对象
279279
280280
## destroy_eigen_device 【optional】
281281
@@ -288,9 +288,9 @@ C_Status (*destroy_eigen_device)(const C_Device device,
288288

289289
### 接口说明
290290

291-
销毁Eigen GPU设备对象
291+
销毁 Eigen GPU 设备对象
292292

293293
### 参数
294294

295295
device - 使用的设备对象。
296-
eigen_device - 需要销毁的Eigen GPU设备对象
296+
eigen_device - 需要销毁的 Eigen GPU 设备对象

0 commit comments

Comments
 (0)