kernel-verifier

Automate kernel verification by running verify.py and benchmark.py for Ascend/NPU.

33|51|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/Just-it/AscendOpGenAgent --skill kernel-verifier
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kernel-verifier
Source: https://github.com/Just-it/AscendOpGenAgent/tree/main/skills/kernel-verifier
Command: npx skills add https://github.com/Just-it/AscendOpGenAgent --skill kernel-verifier

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, torch_npu, and includes scripts (resource) components.

What problem does it solve?

算子代码验证 Skill — 按照标准验证流程验证生成的内核代码。创建验证项目文件,调用 scripts/verify.py 运行验证,验证通过后调用 scripts/benchmark.py 进行性能测试并收集结果。

Core Features & Use Cases

  • Scaffolds a validation workflow that compares framework outputs with generated kernel outputs to ensure correctness.
  • Performs AST-based Triton verification, project creation, and subsequent performance benchmarking for Ascend/NPU kernels.
  • Suitable for CI pipelines and manual validation of new kernels before deployment.

Quick Start

Launch the verifier to generate a validation project, run verify.py, and then run benchmark.py to collect performance data.

Frequently Asked Questions about kernel-verifier

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

FAQPage Schema
How do I automate kernel verification for generated Triton operators on Ascend?

Kernel verification for generated Triton operators on Ascend is automated by scaffolding a validation project, running verify.py to check correctness against a reference implementation, and then executing benchmark.py to collect performance data.

What is the standard workflow for benchmarking NPU kernel performance?

Benchmarking NPU kernel performance involves first validating the generated kernel outputs against framework reference outputs using an AST-based verification script, followed by running a dedicated benchmarking script to output a structured performance report.

Do I need PyTorch and torch_npu to validate generated Ascend kernels?

Yes, validating generated Ascend kernels requires a PyTorch and torch_npu environment, as the verification scripts depend on these frameworks to compare framework outputs with generated kernel outputs for correctness.

Can I integrate automated kernel validation into my CI pipeline?

Yes, automated kernel validation is suitable for CI pipelines, utilizing the provided verify.py and benchmark.py scripts to ensure generated operators are validated and benchmarked before deployment.

How does AST-based Triton verification work for generated operators?

AST-based Triton verification works by parsing the generated kernel code structure to validate correctness before execution, ensuring the generated operators match the expected logic and are ready for project creation and benchmarking.