From 861474afc389df63b454cc121376ad5bfd0deb5e Mon Sep 17 00:00:00 2001 From: geyuqiang Date: Fri, 26 Sep 2025 12:41:35 +0000 Subject: [PATCH 1/4] fix chart --- .../custom_device_docs/custom_runtime_cn.rst | 78 ++++++------- .../custom_device_docs/custom_runtime_en.rst | 12 ++ .../custom_device_docs/device_api_en.md | 108 ++++++++++++++++++ 3 files changed, 159 insertions(+), 39 deletions(-) diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst index c2c78c4d993..48c3036d126 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst @@ -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 接口 diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_en.rst b/docs/dev_guides/custom_device_docs/custom_runtime_en.rst index ec9e423b1cf..b6c5d683d15 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_en.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_en.rst @@ -41,6 +41,18 @@ Device APIs +------------------------+----------------------------------------+----------+ | get_driver_version | To get the driver version | Y | +------------------------+----------------------------------------+----------+ +| get_multi_process | To get the number of MultiProcessors on the device | N | ++------------------------+----------------------------------------+----------+ +| get_max_threads_per_mp | To get the max threads per MultiProcessor | N | ++------------------------+----------------------------------------+----------+ +| get_max_threads_per_block | To get the max threads per block | N | ++------------------------+----------------------------------------+----------+ +| get_max_grid_dim_size | To get the max grid dimension size | N | ++------------------------+----------------------------------------+----------+ +| init_eigen_device | To initialize the Eigen GPU device object | N | ++------------------------+----------------------------------------+----------+ +| destroy_eigen_device | To destroy the Eigen GPU device object | N | ++------------------------+----------------------------------------+----------+ Memory APIs diff --git a/docs/dev_guides/custom_device_docs/device_api_en.md b/docs/dev_guides/custom_device_docs/device_api_en.md index 8ee2f32416a..6e47bf89ba9 100644 --- a/docs/dev_guides/custom_device_docs/device_api_en.md +++ b/docs/dev_guides/custom_device_docs/device_api_en.md @@ -183,3 +183,111 @@ It gets the driver version. ### Parameter version - the version of the stored driver + +## get_multi_process 【optional】 + +### Definition + +```c++ +C_Status (*get_multi_process)(const C_Device device, size_t* multi_process); +``` + +### Description + +Get the number of MultiProcessors on the device. + +### Parameter + +device - the device to query. +multi_process - to store the number of MultiProcessors. + +## get_max_threads_per_mp 【optional】 + +### Definition + +```c++ +C_Status (*get_max_threads_per_mp)(const C_Device device, size_t* threads_per_mp); +``` + +### Description + +Get the maximum number of threads per MultiProcessor on the device. + +### Parameter + +device - the device to query. +threads_per_mp - to store the maximum threads per MultiProcessor. + +## get_max_threads_per_block 【optional】 + +### Definition + +```c++ +C_Status (*get_max_threads_per_block)(const C_Device device, size_t* threads_per_block); +``` + +### Description + +Get the maximum number of threads per block that can run on the device. + +### Parameter + +device - the device to query. +threads_per_block - to store the maximum threads per block. + +## get_max_grid_dim_size 【optional】 + +### Definition + +```c++ +C_Status (*get_max_grid_dim_size)(const C_Device device, std::array* grid_dim_size); +``` + +### Description + +Get the maximum grid dimension size of the device. + +### Parameter + +device - the device to query. +grid_dim_size - to store the maximum grid dimension size. + +## init_eigen_device 【optional】 + +### Definition + +```c++ +C_Status (*init_eigen_device)(C_Place place, + C_EigenDevice* eigen_device, + C_Stream stream, + C_Allocator allocator); +``` + +### Description + +Initialize the Eigen GPU device object. + +### Parameter + +place - the place object of the device to use. +eigen_device - to store the Eigen GPU device object. +stream - the stream object in Custom Context. +allocator - the allocator object in Custom Context. + +## destroy_eigen_device 【optional】 + +### Definition + +```c++ +C_Status (*destroy_eigen_device)(const C_Device device, + C_EigenDevice* eigen_device); +``` + +### Description + +Destroy the Eigen GPU device object. + +### Parameter + +device - the device object to use. +eigen_device - the Eigen GPU device object to be destroyed. From 848cc8cf29840cd4a2ce33558aba7bba0c965f50 Mon Sep 17 00:00:00 2001 From: geyuqiang Date: Sun, 28 Sep 2025 02:38:07 +0000 Subject: [PATCH 2/4] precommmit --- .../custom_device_docs/custom_runtime_cn.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst index 48c3036d126..8e411b27d78 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst @@ -43,17 +43,17 @@ Device 接口 +--------------------------+--------------------------------------------+------+ | get_driver_version | 查询驱动版本号。 | Y | +--------------------------+--------------------------------------------+------+ -| get_multi_process | 获取设备上的MultiProcessor数量。 | N | +| get_multi_process | 获取设备上的 MultiProcessor 数量。 | N | +--------------------------+--------------------------------------------+------+ -| get_max_threads_per_mp | 获取设备每个MultiProcessor上的最大线程数。 | N | +| get_max_threads_per_mp | 获取设备每个 MultiProcessor 上的最大线程数。 | N | +--------------------------+--------------------------------------------+------+ -| get_max_threads_per_block| 获取设备每个Block能够运行的最大线程数。 | N | +| get_max_threads_per_block| 获取设备每个 Block 能够运行的最大线程数。 | N | +--------------------------+--------------------------------------------+------+ | get_max_grid_dim_size | 获取设备最大网格维度大小。 | N | +--------------------------+--------------------------------------------+------+ -| init_eigen_device | 初始化Eigen GPU设备对象。 | N | +| init_eigen_device | 初始化 Eigen GPU 设备对象。 | N | +--------------------------+--------------------------------------------+------+ -| destroy_eigen_device | 销毁Eigen GPU设备对象。 | N | +| destroy_eigen_device | 销毁 Eigen GPU 设备对象。 | N | +--------------------------+--------------------------------------------+------+ From 0d3f7f0c0d109bb12caa04f30ab35e3b102cc8e2 Mon Sep 17 00:00:00 2001 From: geyuqiang Date: Sun, 28 Sep 2025 08:10:57 +0000 Subject: [PATCH 3/4] fix chart --- .../custom_device_docs/custom_runtime_cn.rst | 76 +++++++++--------- .../custom_device_docs/custom_runtime_en.rst | 78 +++++++++---------- 2 files changed, 77 insertions(+), 77 deletions(-) diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst index 8e411b27d78..3833f8390a5 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst @@ -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 接口 diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_en.rst b/docs/dev_guides/custom_device_docs/custom_runtime_en.rst index b6c5d683d15..bae74a9a23d 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_en.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_en.rst @@ -14,45 +14,45 @@ Custom Runtime offers a new method to register the runtime of new devices via pl Device APIs ############ -+------------------------+----------------------------------------+----------+ -| API | Function | Required | -+========================+========================================+==========+ -| initialize | To initialize the device backend | N | -+------------------------+----------------------------------------+----------+ -| finalize | To de-initialize the device backend | N | -+------------------------+----------------------------------------+----------+ -| init_device | To initialize the designated device | N | -+------------------------+----------------------------------------+----------+ -| deinit_device | To de-initialize the designated device | N | -+------------------------+----------------------------------------+----------+ -| set_device | To set the current device | Y | -+------------------------+----------------------------------------+----------+ -| get_device | To get the current device | Y | -+------------------------+----------------------------------------+----------+ -| synchronize_device | To synchronize the desginated device | Y | -+------------------------+----------------------------------------+----------+ -| get_device_count | To count available devices | Y | -+------------------------+----------------------------------------+----------+ -| get_device_list | To get the list of available devices | Y | -+------------------------+----------------------------------------+----------+ -| get_compute_capability | To get computing capability of devices | Y | -+------------------------+----------------------------------------+----------+ -| get_runtime_version | To get the runtime version | Y | -+------------------------+----------------------------------------+----------+ -| get_driver_version | To get the driver version | Y | -+------------------------+----------------------------------------+----------+ -| get_multi_process | To get the number of MultiProcessors on the device | N | -+------------------------+----------------------------------------+----------+ -| get_max_threads_per_mp | To get the max threads per MultiProcessor | N | -+------------------------+----------------------------------------+----------+ -| get_max_threads_per_block | To get the max threads per block | N | -+------------------------+----------------------------------------+----------+ -| get_max_grid_dim_size | To get the max grid dimension size | N | -+------------------------+----------------------------------------+----------+ -| init_eigen_device | To initialize the Eigen GPU device object | N | -+------------------------+----------------------------------------+----------+ -| destroy_eigen_device | To destroy the Eigen GPU device object | N | -+------------------------+----------------------------------------+----------+ ++---------------------------+----------------------------------------------------------+----------+ +| API | Function | Required | ++===========================+==========================================================+==========+ +| initialize | To initialize the device backend | N | ++---------------------------+----------------------------------------------------------+----------+ +| finalize | To de-initialize the device backend | N | ++---------------------------+----------------------------------------------------------+----------+ +| init_device | To initialize the designated device | N | ++---------------------------+----------------------------------------------------------+----------+ +| deinit_device | To de-initialize the designated device | N | ++---------------------------+----------------------------------------------------------+----------+ +| set_device | To set the current device | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_device | To get the current device | Y | ++---------------------------+----------------------------------------------------------+----------+ +| synchronize_device | To synchronize the desginated device | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_device_count | To count available devices | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_device_list | To get the list of available devices | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_compute_capability | To get computing capability of devices | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_runtime_version | To get the runtime version | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_driver_version | To get the driver version | Y | ++---------------------------+----------------------------------------------------------+----------+ +| get_multi_process | To get the number of MultiProcessors on the device | N | ++---------------------------+----------------------------------------------------------+----------+ +| get_max_threads_per_mp | To get the max threads per MultiProcessor | N | ++---------------------------+----------------------------------------------------------+----------+ +| get_max_threads_per_block | To get the max threads per block | N | ++---------------------------+----------------------------------------------------------+----------+ +| get_max_grid_dim_size | To get the max grid dimension size | N | ++---------------------------+----------------------------------------------------------+----------+ +| init_eigen_device | To initialize the Eigen GPU device object | N | ++---------------------------+----------------------------------------------------------+----------+ +| destroy_eigen_device | To destroy the Eigen GPU device object | N | ++---------------------------+----------------------------------------------------------+----------+ Memory APIs From 4abdf72bc2a8c564d7e051aff1b041bb83c35d6d Mon Sep 17 00:00:00 2001 From: geyuqiang Date: Mon, 29 Sep 2025 02:49:13 +0000 Subject: [PATCH 4/4] fix format --- .../custom_device_docs/custom_runtime_cn.rst | 36 +++++++++---------- .../custom_device_docs/custom_runtime_en.rst | 36 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst index 3833f8390a5..48c42704e43 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_cn.rst @@ -17,41 +17,41 @@ Device 接口 ############ +---------------------------+--------------------------------------------+------+ -| 接口名称 | 功能简介 | 必选 | +| 接口名称 | 功能简介 | 必选 | +===========================+============================================+======+ -| initialize | 初始化硬件后端。 | N | +| initialize | 初始化硬件后端。 | N | +---------------------------+--------------------------------------------+------+ -| finalize | 去初始化硬件后端。 | N | +| finalize | 去初始化硬件后端。 | N | +---------------------------+--------------------------------------------+------+ -| init_device | 初始化指定硬件设备。 | N | +| init_device | 初始化指定硬件设备。 | N | +---------------------------+--------------------------------------------+------+ -| deinit_device | 去初始化指定硬件设备。 | N | +| deinit_device | 去初始化指定硬件设备。 | N | +---------------------------+--------------------------------------------+------+ -| set_device | 设置当前使用的硬件设备。 | Y | +| set_device | 设置当前使用的硬件设备。 | Y | +---------------------------+--------------------------------------------+------+ -| get_device | 获取当前使用的硬件设备。 | Y | +| get_device | 获取当前使用的硬件设备。 | Y | +---------------------------+--------------------------------------------+------+ -| synchronize_device | 同步指定的硬件设备。 | Y | +| synchronize_device | 同步指定的硬件设备。 | Y | +---------------------------+--------------------------------------------+------+ -| get_device_count | 查询可用设备数量。 | Y | +| get_device_count | 查询可用设备数量。 | Y | +---------------------------+--------------------------------------------+------+ -| get_device_list | 查询可用设备号。 | Y | +| get_device_list | 查询可用设备号。 | Y | +---------------------------+--------------------------------------------+------+ -| get_compute_capability | 查询设备算力。 | Y | +| get_compute_capability | 查询设备算力。 | Y | +---------------------------+--------------------------------------------+------+ -| get_runtime_version | 查询运行时版本号。 | Y | +| get_runtime_version | 查询运行时版本号。 | Y | +---------------------------+--------------------------------------------+------+ -| get_driver_version | 查询驱动版本号。 | Y | +| get_driver_version | 查询驱动版本号。 | Y | +---------------------------+--------------------------------------------+------+ -| get_multi_process | 获取设备上的 MultiProcessor 数量。 | N | +| get_multi_process | 获取设备上的 MultiProcessor 数量。 | N | +---------------------------+--------------------------------------------+------+ -| get_max_threads_per_mp | 获取设备每个 MultiProcessor 上的最大线程数。 | N | +| get_max_threads_per_mp | 获取设备每个 MultiProcessor 上的最大线程数。 | N | +---------------------------+--------------------------------------------+------+ -| get_max_threads_per_block | 获取设备每个 Block 能够运行的最大线程数。 | N | +| get_max_threads_per_block | 获取设备每个 Block 能够运行的最大线程数。 | N | +---------------------------+--------------------------------------------+------+ -| get_max_grid_dim_size | 获取设备最大网格维度大小。 | N | +| get_max_grid_dim_size | 获取设备最大网格维度大小。 | N | +---------------------------+--------------------------------------------+------+ -| init_eigen_device | 初始化 Eigen GPU 设备对象。 | N | +| init_eigen_device | 初始化 Eigen GPU 设备对象。 | N | +---------------------------+--------------------------------------------+------+ | destroy_eigen_device | 销毁 Eigen GPU 设备对象。 | N | +---------------------------+--------------------------------------------+------+ diff --git a/docs/dev_guides/custom_device_docs/custom_runtime_en.rst b/docs/dev_guides/custom_device_docs/custom_runtime_en.rst index bae74a9a23d..54c6f9b7834 100644 --- a/docs/dev_guides/custom_device_docs/custom_runtime_en.rst +++ b/docs/dev_guides/custom_device_docs/custom_runtime_en.rst @@ -15,43 +15,43 @@ Device APIs ############ +---------------------------+----------------------------------------------------------+----------+ -| API | Function | Required | +| API | Function | Required | +===========================+==========================================================+==========+ | initialize | To initialize the device backend | N | +---------------------------+----------------------------------------------------------+----------+ -| finalize | To de-initialize the device backend | N | +| finalize | To de-initialize the device backend | N | +---------------------------+----------------------------------------------------------+----------+ -| init_device | To initialize the designated device | N | +| init_device | To initialize the designated device | N | +---------------------------+----------------------------------------------------------+----------+ -| deinit_device | To de-initialize the designated device | N | +| deinit_device | To de-initialize the designated device | N | +---------------------------+----------------------------------------------------------+----------+ -| set_device | To set the current device | Y | +| set_device | To set the current device | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_device | To get the current device | Y | +| get_device | To get the current device | Y | +---------------------------+----------------------------------------------------------+----------+ -| synchronize_device | To synchronize the desginated device | Y | +| synchronize_device | To synchronize the desginated device | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_device_count | To count available devices | Y | +| get_device_count | To count available devices | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_device_list | To get the list of available devices | Y | +| get_device_list | To get the list of available devices | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_compute_capability | To get computing capability of devices | Y | +| get_compute_capability | To get computing capability of devices | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_runtime_version | To get the runtime version | Y | +| get_runtime_version | To get the runtime version | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_driver_version | To get the driver version | Y | +| get_driver_version | To get the driver version | Y | +---------------------------+----------------------------------------------------------+----------+ -| get_multi_process | To get the number of MultiProcessors on the device | N | +| get_multi_process | To get the number of MultiProcessors on the device | N | +---------------------------+----------------------------------------------------------+----------+ -| get_max_threads_per_mp | To get the max threads per MultiProcessor | N | +| get_max_threads_per_mp | To get the max threads per MultiProcessor | N | +---------------------------+----------------------------------------------------------+----------+ -| get_max_threads_per_block | To get the max threads per block | N | +| get_max_threads_per_block | To get the max threads per block | N | +---------------------------+----------------------------------------------------------+----------+ -| get_max_grid_dim_size | To get the max grid dimension size | N | +| get_max_grid_dim_size | To get the max grid dimension size | N | +---------------------------+----------------------------------------------------------+----------+ -| init_eigen_device | To initialize the Eigen GPU device object | N | +| init_eigen_device | To initialize the Eigen GPU device object | N | +---------------------------+----------------------------------------------------------+----------+ -| destroy_eigen_device | To destroy the Eigen GPU device object | N | +| destroy_eigen_device | To destroy the Eigen GPU device object | N | +---------------------------+----------------------------------------------------------+----------+