operator-development

Develop, refactor, and validate LPU/NPU operator instruction streams for pymodel, cmodel, and RTL consistency.

7|Updated May 22, 2026
One-click install
npx skills add https://github.com/Dimen01/skills --skill operator-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: operator-development
Source: https://github.com/Dimen01/skills/tree/main/skills/operator-development
Command: npx skills add https://github.com/Dimen01/skills --skill operator-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

该技能解决了在 LPU/NPU/AI 加速器项目中,因算子指令流规划不当、同步机制(set-wait/fence)缺失或 buffer 复用冲突导致的 cmodel 与 RTL 行为不一致问题。

Core Features & Use Cases

  • 算子开发规范: 提供从计算图确认到 task bin 生成的标准化工作流,涵盖 prefill/decode attention 等复杂算子。
  • 同步机制调试: 指导如何正确插入 set_flag、wait_flag 和 fence,确保跨执行单元的数据可见性与安全性。
  • 验证与排查: 包含从 pymodel 编译、cmodel replay 到 UVM 仿真的一整套验证阶梯,帮助快速定位 GM mismatch 与时序问题。

Quick Start

使用 operator-development 技能检查当前算子的 set-wait 同步逻辑并生成对应的 task bin 进行 cmodel replay 验证。

Frequently Asked Questions about operator-development

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

FAQPage Schema
How do I ensure cmodel and RTL behavioral consistency for LPU/NPU operator development?

To ensure cmodel and RTL behavioral consistency for LPU/NPU operator development, follow a standardized verification ladder from pymodel compilation to cmodel replay and UVM simulation. This workflow validates tile/buffer planning and synchronization controls to quickly locate GM mismatch and timing issues.

When do I need to insert set_flag and wait_flag synchronization mechanisms in AI accelerator instructions?

You need to insert set_flag and wait_flag synchronization mechanisms in AI accelerator instructions whenever managing cross-execution-unit data visibility and concurrent scheduling. Proper insertion ensures safe buffer reuse and prevents memory conflicts during complex operators like prefill/decode attention.

How to debug GM mismatch issues during cmodel replay for prefill attention operators?

To debug GM mismatch issues during cmodel replay for prefill attention operators, trace the instruction flow synchronization logic and verify fence insertions. Validating the task bin generation against the pymodel helps isolate incorrect tile/buffer planning or missing synchronization controls.

What is the best way to plan tile and buffer scheduling for complex NPU operators like KV cache and GQA?

The best way to plan tile and buffer scheduling for complex NPU operators like KV cache and GQA is to use a standardized workflow from compute graph confirmation to task bin generation. This ensures correct set-wait synchronization logic and safe cross-execution-unit concurrent dispatch.

Why does my cmodel replay fail with buffer reuse conflicts in decode attention workloads?

Your cmodel replay fails with buffer reuse conflicts in decode attention workloads due to missing or incorrect fence insertions and synchronization mechanisms. Properly inserting set_flag and wait_flag ensures safe data visibility across execution units and resolves these memory hazards.

Can I use this operator development workflow to validate synchronization for both prefill and decode attention?

Yes, you can use this operator development workflow to validate synchronization for both prefill and decode attention. It supports complex operator instruction flows by verifying set-wait logic and generating task bins for rigorous cmodel replay and UVM simulation.