SuperAPI AI Directory

triton-npu-operator-doc-gen

General & other

View repository

Updated 10-15 19:57

About this skill

Triton NPU Operator Interface Documentation Generator

Function Description

This Skill is used to generate standardized interface documentation for Triton operators on the Ascend NPU platform. The generated documentation follows the official Ascend documentation format and includes product support information, function descriptions, function prototypes, parameter descriptions, constraints, and call examples.

Usage

Basic Usage

  1. Provide the operator name and basic information
  2. Input the operator's function description and calculation formula
  3. Provide the function prototype and parameter descriptions
  4. Define the constraints and supported data types
  5. Provide example call code

Documentation Structure Template

The generated documentation will include the following sections:

# {算子名称}

[📄 查看源码]({源码链接})

## 产品支持情况

|产品             |  是否支持  |
|:-------------------------|:----------:|
|  <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>    |     {是否支持}    |

## 功能说明

- 接口功能:{算子功能详细描述}
- 计算公式:

  $$
  {LaTeX格式的计算公式}
  $$

## 函数原型

  {函数原型}

## 参数说明

  <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>

## 约束说明

- 各平台支持数据类型说明:
  - <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} |

## 调用示例

```python
{Python调用示例代码}