Skip to content

feat(pto): implement tpush/tpop direct TPipe flow (rebased)#230

Closed
HecreReed wants to merge 8 commits intozhangstevenunity:mainfrom
HecreReed:codex/pr213-merge-main
Closed

feat(pto): implement tpush/tpop direct TPipe flow (rebased)#230
HecreReed wants to merge 8 commits intozhangstevenunity:mainfrom
HecreReed:codex/pr213-merge-main

Conversation

@HecreReed
Copy link
Contributor

Rebased/forward-merged variant of #213 onto latest main (resolves current merge conflicts) + adds a regression guard for plain pto.bind_tile lowering.

Key points:

  • Syncs PR213 changes with current main (conflict in tools/ptoas/ptoas.cpp resolved while keeping A5 tfree insertion).
  • Adds test/samples/BindTile/bind_tile_wrap_pointer_cast.py + a runop.sh guard so plain bind_tile never lowers to TRESHAPE(dst, src) (only SSA pto.treshape should emit TRESHAPE).

Context:

  • We saw unexpected TRESHAPE sequences (Tile A; TASSIGN(A, addr); Tile B; TRESHAPE(B, A);) appear in generated C++ for non-reshape bind_tile wrappers, which can break downstream pto-isa static checks and matches v0.5 integration failures (matmul/softmax).

If you prefer, we can close this PR and instead apply the small bind_tile guard commit directly onto #213 head branch.

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.


/// Find the last operation in the same block (after startOp) that reads `tile`
/// via MemoryEffectsOpInterface.
static Operation *findLastReadOf(Value tile, Operation *startOp) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 tile 被 控制流使用 或 跨 block 使用 时是不安全的?

@HecreReed HecreReed closed this Mar 10, 2026
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.

2 participants