pypto-optimization

Optimize PyPTO tile shapes, loop counts, and reduction-axis merging for tensor operators.

6|1|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill pypto-optimization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pypto-optimization
Source: https://github.com/xchang1121/AutoResearch-CC-hook/tree/main/skills/pypto/guides/pypto-optimization
Command: npx skills add https://github.com/xchang1121/AutoResearch-CC-hook --skill pypto-optimization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PyPTO optimization rules provide a structured approach to tuning tensor operation performance by selecting tile shapes, loop counts, and reduction-axis strategies to maximize efficiency while respecting hardware constraints. We also offer guidance on when to merge reduction axes and how to sequence experiments to find the sweet spot for throughput and latency.

Core Features & Use Cases

  • Rule-based tile shaping and auto-tiling guidance for common operators (softmax, logsoftmax, norm, reduction, loss).
  • Loop-count sweep strategies with middle-ground optimization to balance task granularity and scheduling overhead.
  • Guidance on merging consecutive reduction axes to reduce intermediate tensors and improve kernel performance.

Quick Start

Apply the PyPTO optimization rules to your operator to choose tile shapes and loop counts, then profile the results to select the best configuration.

Frequently Asked Questions about pypto-optimization

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

FAQPage Schema
How do I optimize tile shapes and loop counts for tensor operators like softmax and norm?

Optimizing tile shapes and loop counts for tensor operators involves applying rule-based tile shaping and middle-ground loop_count sweeps to balance task granularity with scheduling overhead, then profiling to select the best configuration.

What are the hardware constraints for tensor tile shaping in PyPTO?

Hardware constraints for tensor tile shaping in PyPTO enforce deterministic exploration with limits like prod(tile_shape) <= 16384 and auto_tiles <= 2048 to maximize efficiency while respecting hardware limits.

When should I merge consecutive reduction axes in tensor operations?

Merge consecutive reduction axes in tensor operations to reduce intermediate tensors and improve kernel performance, particularly when handling operators with softmax, norm, and loss patterns.

What is the best way to sequence performance experiments for tensor operator throughput?

The best way to sequence performance experiments for tensor operator throughput is to apply rule-based auto-tiling guidance, sweep loop counts, and merge reduction axes to find the sweet spot for latency and throughput.

Does auto-tiling guidance support common reduction and loss operators?

Auto-tiling guidance supports common operators including softmax, logsoftmax, norm, reduction, and loss by providing structured rules for selecting tile shapes and reduction-axis strategies.

Why does my tensor operator performance drop after selecting tile shapes?

Tensor operator performance may drop after selecting tile shapes if loop counts are not optimized with middle-ground sweeps, causing imbalanced task granularity and scheduling overhead, or if reduction axes are not merged properly.