torch-npu-fusion-optimizer

Community

Automates PyTorch fusion-operator optimization.

Authortuliang1024
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill analyzes PyTorch model code to identify and optimize compute patterns by mapping them to torch_npu fusion operators, reducing inference time and resource usage.

Core Features & Use Cases

  • Pattern discovery: detects common fusion opportunities in QKV, RoPE, KV cache, and FFN paths.
  • Replacement blueprint: generates a plan for operator substitutions with validation hooks for safety.
  • Use Case: optimize an existing Transformer model to leverage fused Torch-NPU kernels for faster inference on Ascend hardware.

Quick Start

Provide a PyTorch model and let the skill analyze it to propose and generate fusion-operator replacements.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: torch-npu-fusion-optimizer
Download link: https://github.com/tuliang1024/cann-recipes-infer/archive/main.zip#torch-npu-fusion-optimizer

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.