AscendNPU-IR-DT:基于 Ascend NPU 的测试用例开发项目

可用于在 Ascend NPU 上开发和执行 MLIR 用例及 Triton 内核测试,支持 AI 自动生成 DT 文档与 ST 用例,提供 pytest 框架收集执行、多芯片适配及质量门禁功能。【此简介由AI生成】

Branch2Tags0

AscendNPU-IR-DT

Developer Test workspace for AscendNPU-IR
Triton ST cases, MLIR UT references, feature docs, and AI-assisted DT generation.

中文文档 · English Docs · AI Guide

What This Repo Contains

  • ST (System Test): Triton kernel tests collected by pytest and executed on Ascend NPU.
  • UT (Unit Test) references: DT docs link to MLIR tests in the main AscendNPU-IR repo, triggered by llvm-lit.
  • Feature docs: versioned Markdown docs for spec, AR mapping, commit traceability, and ST/UT organization.
  • Feature config: SR info plus per-AR requirement/commit mapping.
  • AI workflow: TOML config, context collection scripts, templates, and repository-level rules for document/test generation.

Repository Map

Path Purpose
src/modules/ ST cases by module type
docs/206.1.0/ Current feature documents
ai/configs/ AI input templates
ai/scripts/ Context collection and quality checks
ai/skills/ Shared AI rules and generation constraints

Quick Start

# Run all ST cases
make all

# Run A3 or A5 only
make a3
make a5

# Lint + collect + ST quality checks
make check

# Generate a new DT doc / ST case set with AI
cp ai/configs/template.zh.toml ai/configs/my-feature.toml
# edit the TOML: fill SR info, optional SR notes, and each [[feature.ar]] block's title/requirement/commits, then ask your AI:
# "请根据 ai/configs/my-feature.toml 生成 DT 文档和 ST 用例"

Environment

  • Python: 3.11
  • Python deps: pytest, torch, triton
  • System deps: Ascend driver/firmware, CANN runtime/toolkit, torch-npu

pytest will skip Triton ST cases automatically when the target NPU environment is unavailable.

Introduction

可用于在 Ascend NPU 上开发和执行 MLIR 用例及 Triton 内核测试,支持 AI 自动生成 DT 文档与 ST 用例,提供 pytest 框架收集执行、多芯片适配及质量门禁功能。【此简介由AI生成】

Customize your domain