tune-orchestrator

Orchestrates PyPTO operator performance tuning through a strict three-level state machine.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill tune-orchestrator-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tune-orchestrator
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/pypto-op-perf-tune/tune-orchestrator
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill tune-orchestrator-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? PyPTO operator performance tuning involves many phases, iterations, and rollback decisions that are easy to skip or execute out of order. This Skill enforces a rigid state-machine-driven workflow so every tuning round is verified, measured, recorded, and judged before proceeding. ## Core Features & Use Cases - Three-Level State Machine: Controls the main flow (INIT through S5_REPORT), S4_TUNE sub-phases (FRONTEND, SWIMLANE, INCORE), and per-iteration loops (ITER_START through ITER_JUDGE) with hard transition gates. - Todo List Enforcement: Mandates complete upfront Todo creation covering all three outer-loop rounds, with real-time updates after every measurement, rollback, and phase summary. - Phase Handoff Isolation: Generates structured phase-summary handoffs and launches isolated Task subagents per phase, preventing context bloat and cross-phase packing. - Use Case: When tuning a PyPTO operator on Ascend NPU, the orchestrator ensures each optimization point comes from the analysis-derived tuning list, each code change modifies only one parameter, and accuracy failures trigger automatic rollback before continuing. ## Quick Start Ask the assistant to orchestrate a complete PyPTO operator performance tuning run from environment check through final report, following the enforced state machine.

Frequently Asked Questions about tune-orchestrator

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

FAQPage Schema
How does the PyPTO tuning orchestrator control the optimization workflow?

It uses a three-level state machine: a main flow from INIT to DONE, S4_TUNE sub-phases (FRONTEND, SWIMLANE, INCORE), and per-iteration loops. Each transition requires verified completion conditions, and skipping phases is prohibited.

What is the iteration loop in PyPTO operator performance tuning?

Each iteration runs ITER_START (select optimization point), ITER_MODIFY (change one parameter), ITER_VERIFY (check accuracy), ITER_MEASURE (collect performance), ITER_RECORD (update Todo), and ITER_JUDGE (evaluate exit conditions). Failures route through ITER_ROLLBACK.

When does the tuning process exit an iteration phase?

A phase exits when performance meets the target, when the tuning-point list is fully attempted plus a no-improvement threshold is reached (5 for FRONTEND/INCORE, 8 for SWIMLANE), or when the user explicitly stops. The orchestrator never asks the user whether to continue.

Why must each tuning phase run in a separate Task subagent?

Each PHASE_SUMMARY is an independent routing checkpoint where the main agent decides whether to continue or finish. Packing multiple phases into one Task bypasses these checkpoints, breaks the outer-loop counter, and causes context overflow from accumulated debug logs.

What are the limitations of the tuning orchestrator?

It does not provide optimization suggestions or modify code itself; it only controls flow, validates completion conditions, and maintains the Todo list. Concrete analysis and tuning come from the tune-frontend, tune-swimlane, and tune-incore sub-skills it loads.