tilelang2ascend-case-simplifier

Reduces operator test cases in JSON Lines files to under ten while preserving coverage.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Operator test suites often contain too many input cases, slowing down validation cycles. This Skill trims the cases stored in an operator's .json file to at most ten representative entries without losing dtype, attribute, shape, or broadcasting coverage. ## Core Features & Use Cases - Automatic Target Detection: Locates the correct .json file by parsing the json_path reference inside model.py's get_input_groups() function, falling back to scanning the output directory. - Coverage-Preserving Reduction: Selects cases that collectively cover every dtype, attribute value category, tensor dimensionality, extreme shape size, and broadcasting pattern found in the original set. - Safe Backup Workflow: Creates a .json.bak backup before rewriting, enabling full-case restoration for later verification. - Use Case: After generating an Ascend C operator project with hundreds of test cases, run this Skill to shrink the suite to ten cases for fast iteration, then restore the backup for final full validation. ## Quick Start Simplify the test cases in my operator output directory so the JSON file keeps at most ten representative cases with full dtype and shape coverage.

Frequently Asked Questions about tilelang2ascend-case-simplifier

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

FAQPage Schema
How do I reduce the number of test cases in a JSON Lines file?

Parse each line as an independent JSON object, analyze the dtype, attribute, and shape distribution, then select a representative subset covering all categories. This Skill automates that process and writes the filtered cases back in the original JSON Lines format.

How to keep test coverage when trimming operator test cases?

Prioritize coverage dimensions in order: every tensor dtype, representative attribute values, each tensor dimensionality, extreme small and large shapes, and at least one broadcasting case. Pick cases that each cover multiple dimensions at once.

Does the case simplifier modify model.py or other project files?

No, it only reads model.py to locate the target JSON file and never modifies it. The only file changed is the identified .json file inside the output directory, and a .json.bak backup is created first.

Can I restore the original full test cases after simplification?

Yes, the Skill creates a backup with the .json.bak extension before rewriting anything. Copy the backup back over the simplified .json file to restore the complete original case set for full validation.

What happens if no valid JSON case file is found in the output directory?

The Skill reports an error and stops without modifying anything. It first checks the json_path reference in model.py's get_input_groups() function, then falls back to scanning the directory for .json files excluding backups.