Skip to content

fix(pto): resolve subviews of tpop tiles - #1255

Open
zhangstevenunity wants to merge 1 commit into
mainfrom
codex/fix-issue-1251-subview-tpop
Open

fix(pto): resolve subviews of tpop tiles#1255
zhangstevenunity wants to merge 1 commit into
mainfrom
codex/fix-issue-1251-subview-tpop

Conversation

@zhangstevenunity

Copy link
Copy Markdown
Collaborator

Summary

Validation

  • LLVM/MLIR 19.1.7 compiler build: passed
  • focused issue regression: 1/1 passed
  • subview regression suite: 25/25 passed
  • full check-pto: 1785 passed, 1 unsupported, 0 failed
  • generated A3 C++ compiled with Bisheng against PTO-ISA 83d01313

Fixes #1251

Materialize the runtime address of declare_tile roots so subviews of tpop results lower to addressed tile handles.

Fixes #1251
@zhangstevenunity
zhangstevenunity marked this pull request as ready for review August 14, 2026 04:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ff81d30b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +186 to +188
Value ptr =
rewriter.create<pto::TileBufAddrOp>(loc, ptrType, value).getDst();
return rewriter.create<pto::PtrToIntOp>(loc, ptr).getResult();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent stale CSE of rebound tile addresses

When the same pto.declare_tile handle is rebound by a later pto.tpop and subviewed again, this emits another identical pto.tile_buf_addr %tile even though the tile's runtime address has changed. The shared pipeline runs CSE after pto-resolve-buffer-select, and TileBufAddrOp is marked Pure, so the later extraction can be replaced with the first one, making the later TASSIGN use a stale FIFO-slot address. Please make the generated address value depend on the specific binding/use or otherwise prevent CSE across rebinding tpop operations.

Useful? React with 👍 / 👎.

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.

[Pass Bug] pto.subview over a pto.tpop_from_aic result fails to legalize; a popped tile can only be consumed whole

1 participant