Skip to content
Merged
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: 1 addition & 1 deletion ci_scripts/check_api_label_cn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ -z ${BRANCH} ]; then
BRANCH="develop"
fi

all_git_files=`git diff --name-only --diff-filter=ACMR upstream/${BRANCH} | sed 's#docs/##g'`
all_git_files=`git diff --name-only --diff-filter=ACMR upstream/${BRANCH} | sed 's#^docs/##'`
echo $all_git_files
echo "Run API_LABEL Checking"
python check_api_label_cn.py ${DOCROOT} ${APIROOT} $all_git_files
2 changes: 1 addition & 1 deletion docs/api_guides/low_level/layers/sparse_update.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
.. image:: ../../../design/dist_train/src/lookup_table_training.png
:scale: 50 %

API 详细使用方法参考 `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>`
API 详细使用方法参考 `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>`
2 changes: 1 addition & 1 deletion docs/api_guides/low_level/layers/sparse_update_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ As shown in the figure: two rows in a Tensor are not 0. In the process of forwar
Example
--------------------------

API reference `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>` .
API reference `paddle.nn.functional.embedding <cn_api_paddle_nn_functional_embedding>` .
78 changes: 39 additions & 39 deletions docs/dev_guides/custom_device_docs/custom_runtime_cn.rst
Copy link
Member

Choose a reason for hiding this comment

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

需要看一下渲染后的表格是否正常,如果渲染有问题可以 VS Code 装一下 shuworks.vscode-table-formatter 格式化一下

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

哇塞,牛哇🤩🤩🤩

Copy link
Collaborator Author

@ooooo-create ooooo-create Oct 6, 2025

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

我又想到一个,是不是可以使用 GitHub action 根据修改的文档文件,自动给出对应预览链接评论,虽然我还不确定触发条件是什么比较好,修改文件数量什么的

Copy link
Member

Choose a reason for hiding this comment

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

可以的,根据修改的是否是 api 文档来触发

Paddle 那边也亟需这种功能,不然每次都得去 log 里搜关键字 PROMPT 才能找到 url

Copy link
Collaborator Author

@ooooo-create ooooo-create Oct 6, 2025

Choose a reason for hiding this comment

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

刚刚这个表格渲染文件不属于 api 的 docs/dev_guides/custom_device_docs/custom_runtime_cn.rst ,是不主动评论,得 api 触发的时候一起评论,还是选择不评论呀,本来想安装 rst 或者 md 文件,但是万一数量太多了评论好像就没意义了(我好像看见了折叠语法)

Copy link
Member

Choose a reason for hiding this comment

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

喔喔,那这边的话不止 API 的,是我搞错了

Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,45 @@
Device 接口
############

+------------------------+--------------------------+------+
| 接口名称 | 功能简介 | 必选 |
+========================+==========================+======+
| initialize | 初始化硬件后端。 | N |
+------------------------+--------------------------+------+
| finalize | 去初始化硬件后端。 | N |
+------------------------+--------------------------+------+
| init_device | 初始化指定硬件设备。 | N |
+------------------------+--------------------------+------+
| deinit_device | 去初始化指定硬件设备。 | N |
+------------------------+--------------------------+------+
| set_device | 设置当前使用的硬件设备。 | Y |
+------------------------+--------------------------+------+
| get_device | 获取当前使用的硬件设备。 | Y |
+------------------------+--------------------------+------+
| synchronize_device | 同步指定的硬件设备。 | Y |
+------------------------+--------------------------+------+
| get_device_count | 查询可用设备数量。 | Y |
+------------------------+--------------------------+------+
| get_device_list | 查询可用设备号。 | Y |
+------------------------+--------------------------+------+
| get_compute_capability | 查询设备算力。 | Y |
+------------------------+--------------------------+------+
| get_runtime_version | 查询运行时版本号。 | Y |
+------------------------+--------------------------+------+
| get_driver_version | 查询驱动版本号。 | Y |
+------------------------+--------------------------+------+
| get_multi_process | 获取设备上的MultiProcessor数量。 | N |
+------------------------+--------------------------+------+
| get_max_threads_per_mp | 获取设备每个MultiProcessor上的最大线程数。| N |
+------------------------+--------------------------+------+
| get_max_threads_per_block | 获取设备每个Block能够运行的最大线程数。 | N |
+------------------------+--------------------------+------+
| get_max_grid_dim_size | 获取设备最大网格维度大小。 | N |
+------------------------+--------------------------+------+
| init_eigen_device | 初始化Eigen GPU设备对象。 | N |
+------------------------+--------------------------+------+
| destroy_eigen_device | 销毁Eigen GPU设备对象。 | N |
+------------------------+--------------------------+------+
+---------------------------+----------------------------------------------+------+
| 接口名称 | 功能简介 | 必选 |
+===========================+==============================================+======+
| initialize | 初始化硬件后端。 | N |
+---------------------------+----------------------------------------------+------+
| finalize | 去初始化硬件后端。 | N |
+---------------------------+----------------------------------------------+------+
| init_device | 初始化指定硬件设备。 | N |
+---------------------------+----------------------------------------------+------+
| deinit_device | 去初始化指定硬件设备。 | N |
+---------------------------+----------------------------------------------+------+
| set_device | 设置当前使用的硬件设备。 | Y |
+---------------------------+----------------------------------------------+------+
| get_device | 获取当前使用的硬件设备。 | Y |
+---------------------------+----------------------------------------------+------+
| synchronize_device | 同步指定的硬件设备。 | Y |
+---------------------------+----------------------------------------------+------+
| get_device_count | 查询可用设备数量。 | Y |
+---------------------------+----------------------------------------------+------+
| get_device_list | 查询可用设备号。 | Y |
+---------------------------+----------------------------------------------+------+
| get_compute_capability | 查询设备算力。 | Y |
+---------------------------+----------------------------------------------+------+
| get_runtime_version | 查询运行时版本号。 | Y |
+---------------------------+----------------------------------------------+------+
| get_driver_version | 查询驱动版本号。 | Y |
+---------------------------+----------------------------------------------+------+
| get_multi_process | 获取设备上的 MultiProcessor 数量。 | N |
+---------------------------+----------------------------------------------+------+
| get_max_threads_per_mp | 获取设备每个 MultiProcessor 上的最大线程数。 | N |
+---------------------------+----------------------------------------------+------+
| get_max_threads_per_block | 获取设备每个 Block 能够运行的最大线程数。 | N |
+---------------------------+----------------------------------------------+------+
| get_max_grid_dim_size | 获取设备最大网格维度大小。 | N |
+---------------------------+----------------------------------------------+------+
| init_eigen_device | 初始化 Eigen GPU 设备对象。 | N |
+---------------------------+----------------------------------------------+------+
| destroy_eigen_device | 销毁 Eigen GPU 设备对象。 | N |
+---------------------------+----------------------------------------------+------+


Memory 接口
Expand Down
32 changes: 16 additions & 16 deletions docs/dev_guides/custom_device_docs/device_api_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ C_Status (*get_multi_process)(const C_Device device, size_t* multi_process);

### 接口说明

获取设备上的MultiProcessor数量
获取设备上的 MultiProcessor 数量

### 参数

device - 需要获取MultiProcessor数量的设备
multi_process - 存储MultiProcessor数量
device - 需要获取 MultiProcessor 数量的设备
multi_process - 存储 MultiProcessor 数量

## get_max_threads_per_mp 【optional】

Expand All @@ -214,12 +214,12 @@ C_Status (*get_max_threads_per_mp)(const C_Device device, size_t* threads_per_mp

### 接口说明

获取设备每个MultiProcessor上的最大线程数
获取设备每个 MultiProcessor 上的最大线程数

### 参数

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

## get_max_threads_per_block 【optional】

Expand All @@ -231,12 +231,12 @@ C_Status (*get_max_threads_per_block)(const C_Device device, size_t* threads_per

### 接口说明

获取设备每个Block能够运行的最大线程数
获取设备每个 Block 能够运行的最大线程数

### 参数

device - 需要获取每个Block能够运行的最大线程数的设备
threads_per_block - 存储Block上最大线程数
device - 需要获取每个 Block 能够运行的最大线程数的设备
threads_per_block - 存储 Block 上最大线程数

## get_max_grid_dim_size 【optional】

Expand Down Expand Up @@ -268,14 +268,14 @@ C_Status (*init_eigen_device)(C_Place place,

### 接口说明

初始化Eigen GPU设备对象
初始化 Eigen GPU 设备对象

### 参数

place - 使用的设备的place对象
eigen_device - 存储Eigen GPU设备对象
stream - Custom Context中stream对象
allocator - Custom Context中的分配器对象
place - 使用的设备的 place 对象
eigen_device - 存储 Eigen GPU 设备对象
stream - Custom Context 中 stream 对象
allocator - Custom Context 中的分配器对象

## destroy_eigen_device 【optional】

Expand All @@ -288,9 +288,9 @@ C_Status (*destroy_eigen_device)(const C_Device device,

### 接口说明

销毁Eigen GPU设备对象
销毁 Eigen GPU 设备对象

### 参数

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