Skip to content

[codex] Generate per-tile-op PTO micro examples#6

Merged
zhoubot merged 2 commits into
mainfrom
codex/ptodsl-generate-tile-op-pto
Mar 31, 2026
Merged

[codex] Generate per-tile-op PTO micro examples#6
zhoubot merged 2 commits into
mainfrom
codex/ptodsl-generate-tile-op-pto

Conversation

@zhoubot

@zhoubot zhoubot commented Mar 31, 2026

Copy link
Copy Markdown

Summary

  • add a dedicated generator for one .pto file per public tile op that already has a micro-backed implementation
  • check in the generated tile-op corpus under ptodsl/lib/a5/generated/tile_ops
  • add regression coverage that locks the generated files to the current micro-backed tile-op set

Why

The repo already had micro-backed A5 tile helpers, but it only emitted a small fixed example set. This change makes the tile-op coverage concrete by generating one .pto artifact per supported tile op so each file shows the micro instructions that build that tile op.

What changed

  • added ptodsl/lib/a5/tile_op_kernels.py as the per-op builder table
  • added scripts/generate_tile_op_pto.py to regenerate the tile-op corpus
  • checked in generated .pto files under ptodsl/lib/a5/generated/tile_ops
  • added TILE_OP_GENERATION_INDEX.md to record generated vs blocked/not-applicable tile ops
  • added tests/regression/test_generated_tile_op_pto.py

Validation

  • PYTHONPATH=/Users/zhoubot/github/.llvm-19.1.7/build-mlir-py312/tools/mlir/python_packages/mlir_core:/Users/zhoubot/github/pto-org/PTOAS/install-src312:/Users/zhoubot/github/pto-org/PTOAS/build-src312/python /Users/zhoubot/github/.venv-ptoas-src312/bin/python scripts/generate_tile_op_pto.py
  • PYTHONPATH=/Users/zhoubot/github/.llvm-19.1.7/build-mlir-py312/tools/mlir/python_packages/mlir_core:/Users/zhoubot/github/pto-org/PTOAS/install-src312:/Users/zhoubot/github/pto-org/PTOAS/build-src312/python /Users/zhoubot/github/.venv-ptoas-src312/bin/python -m pytest -q tests/regression
  • result: 61 passed in 2.10s

@zhoubot zhoubot marked this pull request as ready for review March 31, 2026 06:52
@zhoubot zhoubot merged commit 1ce7b2f into main Mar 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant