Skip to content

[PTO] Add TileBufArray type and array-style dynamic indexing#227

Open
TaoTao-real wants to merge 1 commit intozhangstevenunity:mainfrom
TaoTao-real:codex/tile-buf-array-pr
Open

[PTO] Add TileBufArray type and array-style dynamic indexing#227
TaoTao-real wants to merge 1 commit intozhangstevenunity:mainfrom
TaoTao-real:codex/tile-buf-array-pr

Conversation

@TaoTao-real
Copy link
Contributor

Summary

  • add new IR type !pto.tile_buf_array<N x !pto.tile_buf<...>>
  • add container ops pto.make_tile_buf_array and pto.tile_buf_array_get
  • add verifiers for array construction/get semantics
  • add C API + Python bindings for TileBufArrayType
  • add Python ergonomic helpers: TileBufArray, make_tile_buf_array, tile_buf_array_get
  • add PTOViewToMemref lowering for tile_buf_array_get:
    • constant index: direct replacement
    • dynamic index: lower to scf.if ladder over element choices (MVP: direct no-result users)
  • add sample test/samples/TileBufArray/tile_buf_array_basic.py

Why

This introduces a first-class way to represent an array of homogeneous tile buffers with dynamic indexing while allowing non-contiguous physical addresses.

Validation

  • python3 -m py_compile python/pto/dialects/pto.py test/samples/TileBufArray/tile_buf_array_basic.py
  • git diff --check

Notes

  • scope is TileBufArray only; no InsertSync/A5 sync behavior changes.

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