ascendc-operator-code-gen

Generate AscendC operator host/kernel code from design docs and integrate into PyTorch.

31|1|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/Ascend/agent-skills --skill ascendc-operator-code-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ascendc-operator-code-gen
Source: https://github.com/Ascend/agent-skills/tree/main/skills/ascendc-operator-code-gen
Command: npx skills add https://github.com/Ascend/agent-skills --skill ascendc-operator-code-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of AscendC operator code from design documents and ensures it is wired into the PyTorch framework.

Core Features & Use Cases

  • Design-driven code generation: Generate op_host/op_kernel sources from design docs and place them under the proper directory structure.
  • Framework integration: Register the generated operator with PyTorch through csrc hooks and schema definitions.
  • End-to-end compile/test flow: Trigger the build, install, and test sequences to verify correctness and performance.

Quick Start

Provide a design document path and run the automation to produce host/kernel code and registration.

Frequently Asked Questions about ascendc-operator-code-gen

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

FAQPage Schema
How do I generate AscendC operator code from a design document?

To generate AscendC operator code, you provide a design document path to the automation tool, which then produces op_host and op_kernel sources and places them under the proper directory structure automatically.

How do I register a custom AscendC operator with PyTorch?

You register a custom AscendC operator with PyTorch by using the Skill to generate csrc hooks and schema definitions, wiring the generated host and kernel code directly into the PyTorch framework.

Can I automate the compile and test workflow for PyTorch custom operators?

Yes, you can automate the compile and test workflow for PyTorch custom operators. The automation triggers build, install, and test sequences end-to-end to verify the correctness and performance of the generated AscendC code.

What is needed to start automating AscendC operator code generation?

To start automating AscendC operator code generation, you need to provide a valid design document path. The automation uses this input to produce host and kernel code and execute the PyTorch framework integration.

Does this tool handle both host and kernel code creation for AscendC operators?

Yes, this tool handles both host and kernel code creation for AscendC operators. It generates op_host and op_kernel sources from your design documents and integrates them into the required directory structure.