latency-optimizer

Analyze Triton kernels for Ascend NPU and generate optimized versions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Efficiently identify and apply performance optimizations to Triton kernels for Ascend NPU, ensuring correctness and preserved accuracy.

Core Features & Use Cases

  • Analyze input Triton code patterns (constexpr parameters, vectorization, load-order, vector comparisons) and generate optimized kernels for Ascend NPU.
  • Validate functional and numerical equivalence between original and optimized code, providing comparison reports and notes.
  • Use cases include optimizing single kernels, benchmarking before/after performance, and applying targeted optimizations guided by referenced docs.

Quick Start

Provide the Triton kernel file path to latency-optimizer to receive an optimized kernel and validation notes.

Frequently Asked Questions about latency-optimizer

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

FAQPage Schema
How do I optimize Triton kernel performance for Ascend NPU?

To optimize Triton kernel performance for Ascend NPU, you provide the kernel file path for analysis. It identifies bottlenecks in patterns like constexpr parameters and int32 vectorization, then generates an optimized version with numerical equivalence notes.

What Triton patterns cause performance bottlenecks on Ascend NPU?

Performance bottlenecks in Triton kernels on Ascend NPU often stem from constexpr parameters, int32 vectorization, load-order, and vector comparisons. The optimizer detects these specific patterns and generates targeted improvements.

Can I validate accuracy after optimizing Triton ops for Ascend NPU?

Yes, validating accuracy after optimizing Triton ops for Ascend NPU is built into the process. The optimizer provides comparison reports and notes to ensure functional and numerical equivalence between original and optimized code.

Does the Ascend NPU Triton optimizer work with frameworks other than PyTorch?

The Ascend NPU Triton optimizer currently operates under a fixed configuration with PyTorch as the framework. It specifically processes Triton DSL code targeting the Ascend backend, ensuring optimized performance within this specific environment.

Why is my Triton kernel running slow on Ascend NPU?

Your Triton kernel might run slow on Ascend NPU due to suboptimal load-order, unoptimized int32 vectorization, or inefficient constexpr parameters. Analyzing the code file identifies these specific bottlenecks and generates a faster version.