triton-npu-operator-doc-gen

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Triton NPU 算子接口文档生成器

Triton NPU Operator Interface Document Generator

功能说明

Function Description

该Skill用于为昇腾NPU平台的Triton算子生成标准化的接口文档。生成的文档遵循昇腾官方文档格式,包含产品支持情况、功能说明、函数原型、参数说明、约束条件和调用示例等内容。
This Skill is used to generate standardized interface documents for Triton operators on the Ascend NPU platform. The generated documents follow the official Ascend document format, including product support status, function descriptions, function prototypes, parameter descriptions, constraints, and call examples.

使用方法

Usage

基础用法

Basic Usage

  1. 提供算子名称和基本信息
  2. 输入算子的功能描述和计算公式
  3. 提供函数原型和参数说明
  4. 定义约束条件和支持的数据类型
  5. 提供调用示例代码
  1. Provide operator name and basic information
  2. Input the function description and calculation formula of the operator
  3. Provide function prototype and parameter descriptions
  4. Define constraints and supported data types
  5. Provide call example code

文档结构模板

Document Structure Template

生成的文档将包含以下章节:
markdown
undefined
The generated document will include the following sections:
markdown
undefined

{算子名称}

{Operator Name}

📄 查看源码
[📄 View Source Code]({Source Code Link})

产品支持情况

Product Support Status

产品是否支持
<term>Ascend 950PR/Ascend 950DT</term>{是否支持}
<term>Atlas A3 训练系列产品/Atlas A3 推理系列产品</term>{是否支持}
<term>Atlas A2 训练系列产品/Atlas A2 推理系列产品</term>{是否支持}
<term>Atlas 200I/500 A2 推理产品</term>{是否支持}
<term>Atlas 推理系列产品</term>{是否支持}
<term>Atlas 训练系列产品</term>{是否支持}
ProductSupported
<term>Ascend 950PR/Ascend 950DT</term>{Supported}
<term>Atlas A3 Training Series/Atlas A3 Inference Series</term>{Supported}
<term>Atlas A2 Training Series/Atlas A2 Inference Series</term>{Supported}
<term>Atlas 200I/500 A2 Inference Products</term>{Supported}
<term>Atlas Inference Series</term>{Supported}
<term>Atlas Training Series</term>{Supported}

功能说明

Function Description

  • 接口功能:{算子功能详细描述}
  • 计算公式:
    $$ {LaTeX格式的计算公式} $$
  • Interface Function: {Detailed Operator Function Description}
  • Calculation Formula:
    $$ {LaTeX-formatted Calculation Formula} $$

函数原型

Function Prototype

{函数原型}
{Function Prototype}

参数说明

Parameter Description

<table style="undefined;table-layout: fixed; width: 953px"><colgroup> <col style="width: 173px"> <col style="width: 112px"> <col style="width: 668px"> </colgroup> <thead> <tr> <th>参数名</th> <th>输入/输出</th> <th>描述</th> </tr></thead> <tbody> <tr> <td>{参数名}</td> <td>{输入/输出}</td> <td>{参数描述}</td> </tr> </tbody> </table>
<table style="undefined;table-layout: fixed; width: 953px"><colgroup> <col style="width: 173px"> <col style="width: 112px"> <col style="width: 668px"> </colgroup> <thead> <tr> <th>Parameter Name</th> <th>Input/Output</th> <th>Description</th> </tr></thead> <tbody> <tr> <td>{Parameter Name}</td> <td>{Input/Output}</td> <td>{Parameter Description}</td> </tr> </tbody> </table>

约束说明

Constraint Description

  • 各平台支持数据类型说明:
    • <term>Atlas A2 训练系列产品/Atlas A2 推理系列产品</term><term>Atlas A3 训练系列产品/Atlas A3 推理系列产品</term><term>Ascend 950PR/Ascend 950DT</term>
      {参数1}
      数据类型
      {参数2}
      数据类型
      {参数3}
      数据类型
      {参数4}
      数据类型
      {数据类型1}{数据类型2}{数据类型3}{数据类型4}
  • Data type support for each platform:
    • <term>Atlas A2 Training Series/Atlas A2 Inference Series</term>, <term>Atlas A3 Training Series/Atlas A3 Inference Series</term>, <term>Ascend 950PR/Ascend 950DT</term>:
      {Parameter 1}
      Data Type
      {Parameter 2}
      Data Type
      {Parameter 3}
      Data Type
      {Parameter 4}
      Data Type
      {Data Type 1}{Data Type 2}{Data Type 3}{Data Type 4}

调用示例

Call Example

python
{Python调用示例代码}
undefined
python
{Python Call Example Code}