Skip to content

test(sync): guard TCI scalar-pipe vector consumer sync#772

Open
TaoTao-real wants to merge 1 commit into
hw-native-sys:mainfrom
TaoTao-real:codex/fix-issue771-tci-pipe-sync
Open

test(sync): guard TCI scalar-pipe vector consumer sync#772
TaoTao-real wants to merge 1 commit into
hw-native-sys:mainfrom
TaoTao-real:codex/fix-issue771-tci-pipe-sync

Conversation

@TaoTao-real

Copy link
Copy Markdown
Contributor

Summary

Motivation

Design

  • The new lit test checks InsertSync debug output after sync motion:
    • pto.tci [PIPE_S]
    • set_flag <PIPE_S -> PIPE_V> after TCI
    • wait_flag <PIPE_S -> PIPE_V> before TCVT
    • downstream TCOLEXPANDMUL remains a vector consumer
  • No CLI, IR syntax, or codegen API changes.

Testing

  • PASS: /Users/lishengtao/Documents/PTO/_codex_worktrees/fix-issue735-tci-pipe/build/tools/ptoas/ptoas --pto-arch=a3 --enable-insert-sync --pto-insert-sync-debug=2 test/lit/pto/issue771_tci_vec_consumer_sync.pto -o - 2>&1 | /Users/lishengtao/Documents/PTO/llvm-workspace/llvm-project/build-shared/bin/FileCheck test/lit/pto/issue771_tci_vec_consumer_sync.pto
  • PASS: /Users/lishengtao/Documents/PTO/_codex_worktrees/fix-issue735-tci-pipe/build/tools/ptoas/ptoas --pto-arch=a3 --enable-insert-sync --pto-insert-sync-debug=2 test/lit/pto/issue735_tci_pipe_s_sync.pto -o - 2>&1 | /Users/lishengtao/Documents/PTO/llvm-workspace/llvm-project/build-shared/bin/FileCheck test/lit/pto/issue735_tci_pipe_s_sync.pto
  • NOTE: configuring the current worktree locally succeeded, but ninja -C build ptoas is blocked by the local LLVM/CANN dependency mismatch (SimtEntry and CANN 9.0 LLVM float type symbols missing), unrelated to this docs/test-only change.

Risk / Rollback

  • Risk: low. This PR only adds a regression test and corrects stale documentation.
  • Rollback: revert this PR.

@reedhecre

reedhecre commented Jun 8, 2026

Copy link
Copy Markdown

Codex Review

该评论由 review 机器人自动更新。

  • PR: test(sync): guard TCI scalar-pipe vector consumer sync #772 test(sync): guard TCI scalar-pipe vector consumer sync
  • Author: TaoTao-real
  • Base/Head: main / codex/fix-issue771-tci-pipe-sync
  • Head SHA: c9251b385c00
  • Trigger: 检测到新的 open PR
  • Generated At: 2026-06-08T06:53:11Z
  • Status: failed at codex-review (exit=1)

Summary

Review failed at stage codex-review: exit=1

Findings

未生成结构化 findings,因为 review 过程提前失败。

Log Tail

  let extraClassDeclaration = [{
    ::mlir::pto::PIPE getPipe() { return ::mlir::pto::PIPE::PIPE_V; }
    ::mlir::MutableOperandRange getDpsInitsMutable() { return getDstMutable(); }
  }];
}


def TCIOp : PTO_TOp<"tci", [
  PTO_DpsInitOpInterface,
  OpPipeInterface,
  DeclareOpInterfaceMethods<MemoryEffectsOpInterface>
]> {
  let summary = "Generate contiguous integer sequence into dst tile.";

  let arguments = (ins
    AnyInteger:$S,
exec
/bin/bash -lc "grep -RIn \"Contiguous Integer Sequence\\|pto.tci\\|Executes on the \\*\\*Vector pipeline\\*\\* ("'`PIPE_V`)'"\\|Executes on the \\*\\*Scalar pipeline\\*\\* ("'`PIPE_S`)" docs | head -n 80' in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 30ms:
docs/PTO_IR_manual.md:7697:##### `pto.tci` - Contiguous Integer Sequence
docs/PTO_IR_manual.md:7731:pto.tci ins(%start : i32) outs(%dst : !pto.tile_buf<...>)
exec
/bin/bash -lc "grep -RIn \"issue735_tci_pipe_s_sync\\|issue771_tci_vec_consumer_sync\\|tci_pipe_s_sync\" test/lit/CMakeLists.txt test/CMakeLists.txt test/lit -n | head -n 80" in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:
grep: test/CMakeLists.txt: No such file or directory
exec
/bin/bash -lc 'grep -RIn "tcolexpandmul" lib/PTO/Transforms/InsertSync include/PTO/Transforms/InsertSync lib/PTO/IR | head -n 120' in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:
lib/PTO/IR/PTO.cpp:5184:                                      arch, "tcolexpandmul",
exec
/bin/bash -lc 'grep -RIn "##### `pto.tci`'"\\|Contiguous Integer Sequence\\|PIPE_S\\|PIPE_V\" docs/PTO_IR_manual.md docs 2>/dev/null | head -n 120" in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:
/bin/bash: line 1: pto.tci: command not found
docs/PTO_IR_manual.md:349:##### `pto.ptrtoint` - Convert Pointer to Byte Address
docs/PTO_IR_manual.md:379:##### `pto.inttoptr` - Convert Byte Address to Pointer
docs/PTO_IR_manual.md:426:##### `pto.addptr` - Add Element Offset to Pointer
docs/PTO_IR_manual.md:460:##### `pto.castptr` - Explicit Pointer Cast
docs/PTO_IR_manual.md:493:##### `pto.make_tensor_view` - Create Tensor View
docs/PTO_IR_manual.md:542:##### `pto.get_tensor_view_dim` - Get Tensor View Dimension Size
docs/PTO_IR_manual.md:579:##### `pto.get_tensor_view_stride` - Get Tensor View Dimension Stride
docs/PTO_IR_manual.md:616:##### `pto.partition_view` - Partition Tensor View
docs/PTO_IR_manual.md:659:##### `pto.alloc_tile` - Allocate Tile Buffer
docs/PTO_IR_manual.md:699:##### `pto.subview` - Tile SubView
docs/PTO_IR_manual.md:772:##### `pto.set_validshape` - Update Dynamic Tile Valid Row/Col In Place
docs/PTO_IR_manual.md:821:##### `pto.get_buf` - Acquire Buffer-ID Token (A5)
docs/PTO_IR_manual.md:858:##### `pto.rls_buf` - Release Buffer-ID Token (A5)
docs/PTO_IR_manual.md:911:##### `pto.tload` - Load Partition View to Tile
docs/PTO_IR_manual.md:964:##### `pto.tprefetch` - Prefetch Partition View into Tile
docs/PTO_IR_manual.md:1010:##### `pto.tprefetch_async` - Asynchronous GM Prefetch into L2
docs/PTO_IR_manual.md:1061:##### `pto.tstore` - Store Tile to Partition View
docs/PTO_IR_manual.md:1173:##### `pto.load_scalar` - Load Single Scalar Element
docs/PTO_IR_manual.md:1209:##### `pto.store_scalar` - Store Single Scalar Element
exec
/bin/bash -lc "find docs -type f | sort | grep -E 'PTO_IR_manual|PTO-micro|release|spec'" in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:
docs/PTO_IR_manual.md
docs/release/PTO-micro-Instruction-SPEC-v0.4.md
docs/release/PTO-tile-Instruction-SPEC-v0.4.md
docs/release/vpto-spec-v0.1.md
docs/release/vpto-spec-v0.2.md
docs/release/vpto-spec-v0.3.md
docs/vpto-spec.md
exec
/bin/bash -lc 'grep -RIn "pto.tci" docs | head -n 50' in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:
docs/PTO_IR_manual.md:7697:##### `pto.tci` - Contiguous Integer Sequence
docs/PTO_IR_manual.md:7731:pto.tci ins(%start : i32) outs(%dst : !pto.tile_buf<...>)
exec
/bin/bash -lc "find build -maxdepth 3 -type f 2>/dev/null | grep '/ptoas"'$'"' | head -n 20" in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:

exec
/bin/bash -lc "find . -type f -name ptoas -o -type f -path '*/bin/ptoas' | head -n 20" in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:

exec
/bin/bash -lc 'find .downloads -maxdepth 4 -type f -name lit -o -name FileCheck 2>/dev/null | head -n 20' in /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/repo succeeded in 0ms:

Reconnecting... 1/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, cf-ray: a085f98f8cd73f13-LAX, request id: 54e3d4d9-6bd7-4588-8724-9350083c77af)
Reconnecting... 2/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, cf-ray: a085f9b17b46e9e3-LAX, request id: 60ced807-0d8a-497f-8651-d36ffc041ffd)
Reconnecting... 3/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, cf-ray: a085f9d5cc7d2ee7-LAX, request id: 3e0f54b5-168f-4f38-bf93-1f91aca6b2a9)
Reconnecting... 4/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, cf-ray: a085f9fc2caa792b-LAX, request id: 84de33cc-1129-4ede-aad8-60077ddf3a18)
Reconnecting... 5/5 (unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, cf-ray: a085fa299823be08-LAX, request id: 3584ff25-044a-4d81-90b6-dd057b14b5f6)
ERROR: unexpected status 503 Service Unavailable: Service temporarily unavailable, url: https://codex.0u0o.com/responses, cf-ray: a085fa5dec3f1ad1-LAX, request id: ba509058-64d2-454e-b9da-b8a4af34739a
Warning: no last agent message; wrote empty content to /tmp/ptoas-pr-review-monitor/runs/20260608_145027_pr772/codex_last_message.json
tokens used
55,570
===== END STAGE codex-review rc=1 @ 2026-06-08 14:53:11 =====

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the documentation in 'PTO_IR_manual.md' to correctly specify that the hardware mapping executes on the Scalar pipeline ('PIPE_S') instead of the Vector pipeline ('PIPE_V'). Additionally, it introduces a new lit test 'issue771_tci_vec_consumer_sync.pto' to verify synchronization behavior between the scalar pipeline and vector pipeline consumers. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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.

[Bug] Missing TCI->vector-consumer sync: pto.tci tail columns read stale on a2a3 (intermittent)

2 participants