Skip to content

Support packed VSTS mask granularity#910

Open
mouliangyu wants to merge 3 commits into
hw-native-sys:mainfrom
mouliangyu:codex/vpto-packed-vsts-mask-granularity
Open

Support packed VSTS mask granularity#910
mouliangyu wants to merge 3 commits into
hw-native-sys:mainfrom
mouliangyu:codex/vpto-packed-vsts-mask-granularity

Conversation

@mouliangyu

Copy link
Copy Markdown
Contributor

Summary

  • accept b32 masks for PK_B64 and PK4_B32 VSTS dist forms
  • mirror the same legality in VPTO validation
  • add positive and negative VPTO lit coverage

Validation

  • built ptoas with LLVM21 in the main worktree
  • llvm-lit -v build-llvm21/test/lit --filter 'vsts_packed_dist_mask_granularity'

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 adds support and validation for the PK_B64 and PK4_B32 distributions, mapping them to the b32 mask granularity. It also introduces corresponding LIT tests to verify valid and invalid configurations. The review feedback suggests simplifying the conditional logic in getVstsMaskGranularityOverride by combining the checks for PK_B32, PK_B64, and PK4_B32 since they all return the same value.

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.

Comment thread lib/PTO/IR/VPTO.cpp Outdated
Comment on lines +1742 to +1747
if (dist == "PK_B32")
return StringRef("b32");
if (dist == "PK_B64")
return StringRef("b32");
if (dist == "PK4_B32")
return StringRef("b32");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The if conditions for PK_B32, PK_B64, and PK4_B32 can be combined into a single conditional block since they all return the same mask granularity ("b32"). This simplifies the logic and improves readability.

  if (dist == "PK_B32" || dist == "PK_B64" || dist == "PK4_B32")\n    return StringRef("b32");

@reedhecre

reedhecre commented Jul 7, 2026

Copy link
Copy Markdown

Codex Review

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

  • PR: Support packed VSTS mask granularity #910 Support packed VSTS mask granularity
  • Author: mouliangyu
  • Base/Head: main / codex/vpto-packed-vsts-mask-granularity
  • Head SHA: e4e702065690
  • Trigger: PR 有新提交
  • Generated At: 2026-07-08T07:00:54Z
  • Previous Head SHA: d108117d495e
  • Status: failed at codex-review (exit=1)

Summary

Review failed at stage codex-review: exit=1

Findings

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

Log Tail

git fetch origin 'main' --depth 50 || true
git checkout -f 'pr-910'
git rev-parse HEAD
git diff --stat 'origin/main...HEAD' || true
Cloning into '/tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/repo'...
From https://github.com/hw-native-sys/PTOAS
 * [new ref]           refs/pull/910/head -> pr-910
From https://github.com/hw-native-sys/PTOAS
 * branch              main       -> FETCH_HEAD
Switched to branch 'pr-910'
e4e702065690857eb03d7bcc5c40c446900c5edc
 lib/PTO/IR/VPTO.cpp                                |   2 +-
 lib/PTO/Transforms/PTOValidateVPTOIR.cpp           |  10 ++
 .../lit/vpto/vsts_packed_dist_mask_granularity.pto |  31 ++++++
 .../vsts_packed_dist_mask_granularity_invalid.pto  |  37 ++++++
 .../vsts-packed-dist-mask-granularity/compare.py   |  55 +++++++++
 .../vsts-packed-dist-mask-granularity/golden.py    |  86 ++++++++++++++
 .../vsts-packed-dist-mask-granularity/kernel.pto   |  69 ++++++++++++
 .../vsts-packed-dist-mask-granularity/launch.cpp   |  54 +++++++++
 .../vsts-packed-dist-mask-granularity/main.cpp     | 124 +++++++++++++++++++++
 9 files changed, 467 insertions(+), 1 deletion(-)
===== END STAGE clone rc=0 @ 2026-07-08 15:00:45 =====

===== STAGE codex-review @ 2026-07-08 15:00:45 =====
set -euo pipefail
cd '/tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/repo'
'codex' exec -C '/tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/repo' -s read-only -c 'model_provider="codereview"' -c 'model="gpt-5.4"' -c 'model_reasoning_effort="xhigh"' --output-schema '/tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/review_schema.json' -o '/tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/codex_last_message.json' --color never - < '/tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/review_prompt.txt'
[monitor] stage timeout: 1800s
OpenAI Codex v0.115.0 (research preview)
--------
workdir: /tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/repo
model: gpt-5.4
provider: codereview
approval: never
sandbox: read-only
reasoning effort: xhigh
reasoning summaries: none
session id: 019f4087-72f0-7072-bda3-deb9b0cf1118
--------
user
你现在在审查 GitHub PR。

仓库:hw-native-sys/PTOAS
PR:#910 Support packed VSTS mask granularity
作者:mouliangyu
base branch:origin/main
head branch:HEAD(当前已 checkout 到 PR head)

要求:
1. 只审查这个 PR 相对 origin/main 的改动,必要时可以看上下文文件。
2. 重点找真实的 correctness / regression / contract mismatch / CI / runtime / compatibility 问题。
3. 不要提纯风格建议,不要提低价值猜测。
4. 严格按优先级输出:
   - P1:高概率会导致错误结果、编译/运行失败、严重回归、发布阻断
   - P2:重要缺陷、行为回归、遗漏校验/测试、较大兼容性问题
   - P3:次要但明确可改的问题
5. 如果没有问题,summary 直接写:未检查到 PR #910 存在问题,并返回 findings=[]。
6. 如果有问题,summary 简洁概括,findings 里每条都要给出:
   - severity
   - title
   - body(说明为什么是问题,尽量具体)
   - file(尽量给相对路径)
   - line(能确定就填整数,否则 null)

建议先查看:
- git status --short
- git diff --stat origin/main...HEAD
- git diff --unified=80 origin/main...HEAD

最终输出必须严格匹配 JSON schema。

mcp startup: no servers
Reconnecting... 1/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a17d36bf9929d7a8-LAX, request id: a93f54ed-2921-4e27-bd81-21ec09828997)
Reconnecting... 2/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a17d36c259c0964b-LAX, request id: ba384968-3e95-4b1c-af49-ee8ad2e91a1d)
Reconnecting... 3/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a17d36c63adbbe08-LAX, request id: 51a75039-0cd6-4db0-a5e5-7d0e582dac45)
Reconnecting... 4/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a17d36cccbfec253-LAS, request id: c2ecffff-4e91-4d52-9119-5621f8ef3bd6)
Reconnecting... 5/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a17d36d82cd6cb94-LAX, request id: fc1a1f21-4d55-41c3-becf-e75f47230433)
ERROR: unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a17d36ed0bc112ad-LAX, request id: 8b17998a-3d2a-4ca8-a34f-bcd81f407e3b
Warning: no last agent message; wrote empty content to /tmp/ptoas-pr-review-monitor/runs/20260708_150037_pr910/codex_last_message.json
===== END STAGE codex-review rc=1 @ 2026-07-08 15:00:54 =====

@mouliangyu mouliangyu marked this pull request as ready for review July 8, 2026 01:56
@mouliangyu mouliangyu force-pushed the codex/vpto-packed-vsts-mask-granularity branch 2 times, most recently from 7124cc2 to d108117 Compare July 8, 2026 06:13
@mouliangyu mouliangyu force-pushed the codex/vpto-packed-vsts-mask-granularity branch from d108117 to e4e7020 Compare July 8, 2026 06:47
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