kernel-generator

Convert KernelBench operator descriptions into Triton Ascend kernels with a ModelNew class.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of high-performance Triton Ascend kernels from KernelBench style operator descriptions, reducing manual kernel development time and ensuring consistency with KernelBench specifications.

Core Features & Use Cases

  • Automated kernel generation: Produces a complete ModelNew-based Triton Ascend kernel implementation from a KernelBench task description.
  • Iterative improvement: Supports error feedback loop using verifier_error and conductor_suggestion to refine the kernel.
  • Knowledge integration: Loads hardware references and Triton Ascend fundamentals to guide optimization for ascend backends.
  • Use Case: Given a KernelBench op_desc, generate a full kernel plus a ModelNew class that mirrors the original model's forward signature.

Quick Start

Run the kernel-generator skill with a KernelBench task description to generate a complete ModelNew kernel.

Frequently Asked Questions about kernel-generator

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

FAQPage Schema
How do I generate Triton Ascend kernels from operator descriptions?

Triton Ascend kernel generation requires inputs like op_name, task_desc, and arch. It outputs a self-contained Python file with the kernel implementation and a ModelNew class mirroring the original forward signature.

Can I refine generated Triton kernels automatically using error feedback?

You can refine generated Triton kernels by supplying verifier_error and conductor_suggestion inputs. This error-driven loop automatically updates the kernel implementation to resolve identified issues.

What inputs are required to automate Triton Ascend kernel generation?

Kernel generation requires op_name, task_desc, and arch, while strictly enforcing backend=ascend and framework=torch. These inputs ensure the output aligns with KernelBench specifications.

Does Triton Ascend kernel generation work with frameworks other than PyTorch?

No, Triton Ascend kernel generation strictly enforces framework=torch. The output ModelNew class is specifically designed to integrate with PyTorch model architectures.

Why does my generated kernel include a ModelNew class?

The ModelNew class is included to mirror the original model's forward signature, ensuring seamless integration into existing PyTorch pipelines. This structure is required for KernelBench style implementations.