Skip to content

[codex] Improve PTODSL frontend ergonomics and API coverage#100

Draft
zhoubot wants to merge 4 commits into
huawei-csl:mainfrom
PTO-ISA:codex/ptodsl-frontend-api-coverage
Draft

[codex] Improve PTODSL frontend ergonomics and API coverage#100
zhoubot wants to merge 4 commits into
huawei-csl:mainfrom
PTO-ISA:codex/ptodsl-frontend-api-coverage

Conversation

@zhoubot
Copy link
Copy Markdown

@zhoubot zhoubot commented Mar 30, 2026

Summary

  • add constexpr specialization support, generated micro-op wrappers, and a more pythonic pto tensor/tile facade
  • add a public API snapshot plus host-side API/regression coverage, and split CI into fast and full workflows
  • expose the missing pto.barrier_sync helper and add sync-specific frontend/API coverage

Why

PTODSL was missing a coherent contract and regression layer around the frontend surface while the PTO frontend itself was growing in three directions at once: constexpr specialization, micro-op coverage, and a more ergonomic tensor/tile API. This PR packages those frontend changes together and adds the API hygiene gates needed to keep the public surface intentional.

What Changed

  • frontend/runtime surface:
    • Constexpr, const_expr, and range_constexpr specialization flow
    • generated micro module plus pto re-exports from the PTOAS vPTO manifest
    • pythonic pto.ptr, make_tensor, TensorView.slice, make_tile_buffer, and tile-buffer wrappers
    • pto.barrier_sync wrapper added to the public sync surface
  • coverage and tooling:
    • new tests/api contract suite with snapshot-backed public export checks
    • new tests/regression host regression suite
    • shared PTOAS manifest locator for local and CI use
    • snapshot updater script
  • CI:
    • new fast host-only workflow for PRs
    • existing matrix workflow narrowed to full regression on main/manual runs

Validation

  • PYTHONPATH=... python -m pytest -q tests/api -> 48 passed
  • PYTHONPATH=... python -m pytest -q tests/frontend -> 28 passed
  • earlier in this branch: PYTHONPATH=... python -m pytest -q tests/regression -> 4 passed

Notes

  • row_prod / col_prod were removed from tile.__all__ because the installed PTO dialect does not provide backing builders for them; direct attribute access remains unchanged.

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