ascendc-st-design

Generates L0/L1/L2 system test cases for Ascend C operators from aclnn interface documentation.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill ascendc-st-design-wangwindow
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ascendc-st-design
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/ascendc-st-design
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill ascendc-st-design-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve? Designing comprehensive system tests for Ascend C operators requires manually extracting parameters, test factors, and constraint relationships from aclnn interface documentation, which is error-prone and time-consuming. This Skill automates the full ST design pipeline from parameter definition to test case generation. ## Core Features & Use Cases - Parameter Definition: Parses aclnn interface docs to define Tensor, TensorList, Array, and Scalar parameters with dtype, format, dimensions, and value ranges. - Constraint Analysis & Solving: Models parameter dependencies (calculate, broadcast, match, inferable, existential) in YAML, builds a factor dependency graph, and solves constraints to produce valid factor values. - Test Case Generation: Produces L0 (single-factor), L1 (pairwise combination), and L2 (exception) test case CSVs with coverage reports, including automatically derived empty-tensor cases. - Use Case: Given a new BatchMatmulMaxSum operator, run the pipeline to output 03_参数定义.yaml through 07_因子值.csv plus L0/L1/L2 test case CSVs under operators/{operator_name}/tests/st/. ## Quick Start Ask the assistant to design ST test cases for an Ascend C operator by providing its aclnn interface document path.

Frequently Asked Questions about ascendc-st-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate ST test cases for an Ascend C operator?▼

Provide the operator's REQUIREMENTS.md and aclnn interface document, then follow the pipeline: define parameters, extract test factors with generate_test_factors.py, analyze constraints, generate implicit constraints and solver config, solve factor values, and finally run generate_test_cases.py for L0, L1, and L2 levels.

What is the difference between L0, L1, and L2 test cases?▼

L0 cases are gate tests covering core functionality with single-factor coverage, capped at 200 cases. L1 cases use pairwise factor combination for functional, precision, and boundary testing, targeting 500-700 cases. L2 cases cover exception scenarios such as invalid dtype or dimension inputs, with at most 20 cases.

What constraint types are supported for parameter dependency analysis?▼

Nine constraint types are supported: calculate, broadcast_dim, broadcast_shape, conditional, match, existential, convertible, inferable_filter, and inferable. Each is defined in YAML with sources, target, and type-specific fields, and solved via topological ordering of the factor dependency graph.

How are empty tensor test cases generated?▼

Empty tensor cases are derived from existing normal L0/L1 cases rather than built from scratch. The script analyzes shape constraints to identify zero-able dimensions per operator type (matmul-like, reduce-like, or general), then modifies one template case per scenario so constraints remain satisfied.

Where are the test design outputs stored?▼

All outputs go under operators/{operator_name}/tests/st/. Intermediate design artifacts (parameter definitions, factors, constraints, solver config, factor values) go in design/, while final L0/L1/L2 test case CSVs and coverage reports go in testcases/.