What problem does it solve? PyPTO operators on Ascend NPU often ship with suboptimal out-of-box performance due to inefficient loop structures, redundant reshapes, and mismatched TileShape configurations. This Skill provides a disciplined three-phase workflow to diagnose and fix code-level performance issues before deeper pipeline tuning. ## Core Features & Use Cases - Three-Phase Tuning Workflow: Enforces Phase A global analysis (loop structure, constant dependencies, reshape audit, TileShape review), Phase B local data-operation analysis (NZ format, transpose fusion, concat-to-assemble, broadcast combine), and Phase C item-by-item optimization with verification. - Structured Analysis Tables: Produces mandatory artifacts such as loop structure tables, reshape analysis tables, and basic-block TileShape boundary reviews so no optimization is applied without evidence. - Concrete Optimization Catalog: Covers loop unroll/tiling, reshape hoisting with inplace, per-matmul cube TileShape settings, vector TileShape rules, and combine_axis broadcast inlining, backed by real case studies with measured gains. - Use Case: Given a decode attention or matmul-based PyPTO kernel with poor initial latency, run the three-phase analysis to identify that a unified cube TileShape wastes L1 space, then set per-matmul tiles to cut execution time by 7.8%. ## Quick Start Analyze my PyPTO operator kernel code with the frontend tuning workflow and produce the Phase A loop structure and TileShape review tables before suggesting optimizations.