ascend-call-generation

Generate Ascend C projects and operator invocation code from functional PyTorch code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Convert functional PyTorch code into a ready-to-run Ascend operator invocation and a corresponding Ascend C project, streamlining integration into the OpenCode environment.

Core Features & Use Cases

  • Reads functional PyTorch code and example outputs to derive an Ascend operator implementation.
  • Generates project JSON, Python bindings, and a runnable Ascend C project using msopgen tooling.
  • Produces a structured output directory ready for deployment and testing in Ascend C workflows.

Quick Start

Run the generation script with the operator name and the project JSON to build the Ascend C project.

Frequently Asked Questions about ascend-call-generation

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

FAQPage Schema
How do I convert functional PyTorch code into an Ascend C operator project?

You can convert functional PyTorch code into an Ascend C project by automatically generating project JSON, Python bindings, and a model wrapper. This process invokes msopgen to produce a runnable project ready for testing.

What is needed to generate Ascend operator invocation code from PyTorch?

Generating Ascend operator invocation code requires functional PyTorch code and example outputs. The generation script reads these inputs to derive the operator implementation and produce the corresponding project configuration.

Does the generated Ascend C project include pybind11 registration for Python bindings?

Yes, the generated Ascend C project includes pybind11 registration for Python bindings. It satisfies the requirement for correct binding registration and maintains a 1-to-1 correspondence between module_fn arguments and project inputs.

How do I build the Ascend C project generated from my PyTorch operator?

You build the generated Ascend C project using gen_project.py. The generation process creates a structured output directory configured with the necessary project JSON and wrapper files to run this build script.

Can I use msopgen to create a runnable project from a functional PyTorch operator?

Yes, you can use msopgen to create a runnable project from a functional PyTorch operator. The generation workflow invokes msopgen tooling to produce the runnable Ascend C project from your derived operator implementation.