Skip to content

Support arith select in VPTO LLVM lowering#890

Merged
zhangstevenunity merged 1 commit into
hw-native-sys:mainfrom
mouliangyu:feature-vpto-support-arith-select
Jul 2, 2026
Merged

Support arith select in VPTO LLVM lowering#890
zhangstevenunity merged 1 commit into
hw-native-sys:mainfrom
mouliangyu:feature-vpto-support-arith-select

Conversation

@mouliangyu

Copy link
Copy Markdown
Contributor

Summary

  • support lowering arith.select in VPTO LLVM emitters
  • add a VPTO lit coverage case for arith.select

Validation

  • git diff --check hw-native-sys/main...HEAD

@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 for converting arith.select operations with VPTO-convertible types (such as vector registers and masks) under scalar i1 conditions in both VPTOCANN900LLVMEmitter and VPTOLLVMEmitter. It also includes corresponding lit tests. The feedback suggests removing the deprecated and redundant mkdir -p %T command from the lit test RUN line to prevent potential race conditions.

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.

// INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
// See LICENSE in the root of the software repository for the full text of the License.

// RUN: ( mkdir -p %T && ptoas --pto-arch=a5 --pto-backend=vpto %s -o %t --mlir-print-ir-after=convert-func-to-llvm 2>&1 || true ) | FileCheck %s

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 use of %T is deprecated in LLVM lit because it is a shared directory across tests and can lead to race conditions or flakiness. Since lit automatically creates the directory containing %t before running the test, mkdir -p %T is redundant and can be safely removed.

// RUN: ( ptoas --pto-arch=a5 --pto-backend=vpto %s -o %t --mlir-print-ir-after=convert-func-to-llvm 2>&1 || true ) | FileCheck %s

@reedhecre

reedhecre commented Jul 1, 2026

Copy link
Copy Markdown

Codex Review

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

  • PR: Support arith select in VPTO LLVM lowering #890 Support arith select in VPTO LLVM lowering
  • Author: mouliangyu
  • Base/Head: main / feature-vpto-support-arith-select
  • Head SHA: de6fc78f9a92
  • Trigger: 检测到新的 open PR
  • Generated At: 2026-07-01T10:10:53Z
  • Status: failed at codex-review (exit=1)

Summary

Review failed at stage codex-review: exit=1

Findings

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

Log Tail

===== STAGE clone @ 2026-07-01 18:10:39 =====
set -euo pipefail
rm -rf '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/repo'
git clone --branch 'main' --depth 50 'https://github.com/hw-native-sys/PTOAS.git' '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/repo'
cd '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/repo'
git fetch origin 'refs/pull/890/head:pr-890' --depth 50
git fetch origin 'main' --depth 50 || true
git checkout -f 'pr-890'
git rev-parse HEAD
git diff --stat 'origin/main...HEAD' || true
Cloning into '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/repo'...
From https://github.com/hw-native-sys/PTOAS
 * [new ref]           refs/pull/890/head -> pr-890
From https://github.com/hw-native-sys/PTOAS
 * branch              main       -> FETCH_HEAD
Switched to branch 'pr-890'
de6fc78f9a92ce296f5eeea860c2cdb5c24009f6
 lib/PTO/Transforms/VPTOCANN900LLVMEmitter.cpp | 36 ++++++++++++++++++
 lib/PTO/Transforms/VPTOLLVMEmitter.cpp        | 36 ++++++++++++++++++
 test/lit/vpto/arith_select_vpto_llvm.pto      | 54 +++++++++++++++++++++++++++
 3 files changed, 126 insertions(+)
===== END STAGE clone rc=0 @ 2026-07-01 18:10:44 =====

===== STAGE codex-review @ 2026-07-01 18:10:44 =====
set -euo pipefail
cd '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/repo'
'codex' exec -C '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/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/20260701_181037_pr890/review_schema.json' -o '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/codex_last_message.json' --color never - < '/tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/review_prompt.txt'
[monitor] stage timeout: 1800s
OpenAI Codex v0.115.0 (research preview)
--------
workdir: /tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/repo
model: gpt-5.4
provider: codereview
approval: never
sandbox: read-only
reasoning effort: xhigh
reasoning summaries: none
session id: 019f1d28-dc07-7870-8820-370233935fe0
--------
user
你现在在审查 GitHub PR。

仓库:hw-native-sys/PTOAS
PR:#890 Support arith select in VPTO LLVM lowering
作者: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 #890 存在问题,并返回 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: a1449f678eeba158-LAX, request id: 39cac576-59fd-4cfd-a4a5-64f845918594)
Reconnecting... 2/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a1449f6b0aee0910-LAX, request id: af18dba9-7f02-4c7b-b938-907d7ce6c7d1)
Reconnecting... 3/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a1449f6fcc675901-LAX, request id: 32124445-0779-4c8e-b6e6-342e844421d6)
Reconnecting... 4/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a1449f7729f89dfc-LAX, request id: 9f0b7a14-e660-401a-9418-f5d65aa5c7ef)
Reconnecting... 5/5 (unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a1449f82fed9c74e-LAX, request id: 49faa9d6-487c-43a8-9cfd-effe8a60b128)
ERROR: unexpected status 403 Forbidden: {"code":"INSUFFICIENT_BALANCE","message":"Insufficient account balance"}, url: https://codex.0u0o.com/responses, cf-ray: a1449f9b29e688bd-LAX, request id: d1417f94-dc05-4a16-805f-f56ee0f2122b
Warning: no last agent message; wrote empty content to /tmp/ptoas-pr-review-monitor/runs/20260701_181037_pr890/codex_last_message.json
===== END STAGE codex-review rc=1 @ 2026-07-01 18:10:53 =====

@mouliangyu mouliangyu marked this pull request as ready for review July 2, 2026 04:37
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@zhangstevenunity zhangstevenunity merged commit 4259f31 into hw-native-sys:main Jul 2, 2026
14 of 16 checks passed
@reedhecre

Copy link
Copy Markdown

A3 板测完成(有跳过)

  • 触发方式:merged
  • 源码提交:4259f31e915a
  • 结果汇总:OK 220 / FAIL 0 / SKIP 2
  • 日志:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260702_124208_merged_pr890.log
  • LLVM cache:/home/zhongxuan/ptoas-board-monitor/cache/llvm-project-vpto-llvm21/build-shared
  • 结果 TSV:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260702_124208_merged_pr890.tsv

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.

3 participants