Skip to content

fix: restore missing tile shape verifier helper#474

Merged
zhangstevenunity merged 2 commits intohw-native-sys:mainfrom
HecreReed:codex/fix-build-ptoas-helper
Apr 13, 2026
Merged

fix: restore missing tile shape verifier helper#474
zhangstevenunity merged 2 commits intohw-native-sys:mainfrom
HecreReed:codex/fix-build-ptoas-helper

Conversation

@HecreReed
Copy link
Copy Markdown
Collaborator

Summary

  • restore the missing verifyTileBufSameShapeAndElem helper in lib/PTO/IR/PTO.cpp
  • keep the helper behavior aligned with the pre-refactor implementation
  • unblock build-ptoas on current main after the recent verifier additions

Notes

  • this is a minimal compile-fix only
  • it does not change the newer verifier call sites or broader op semantics

Copy link
Copy Markdown

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

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 introduces the verifyTileBufSameShapeAndElem function to ensure that two types have matching element types and shapes. Feedback suggests optimizing the check with an early identity comparison and improving the error message by including the actual types to facilitate debugging.

Comment on lines +2301 to +2303
if (getShapeVec(lhs) != getShapeVec(rhs))
return op->emitOpError() << "expects " << lhsName << " and " << rhsName
<< " to have the same shape";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

When a shape verification fails, it is highly beneficial to include the actual types (which contain the shapes) in the error message to aid debugging. Additionally, for better performance in the common case where the types are identical, an early identity check can be added.

  if (lhs == rhs)
    return success();
  if (getShapeVec(lhs) != getShapeVec(rhs))
    return op->emitOpError() << "expects " << lhsName << " and " << rhsName
                             << " to have the same shape, but got " << lhs << " and " << rhs;

@HecreReed HecreReed marked this pull request as ready for review April 13, 2026 08:48
@HecreReed
Copy link
Copy Markdown
Collaborator Author

/run a3

@reedhecre
Copy link
Copy Markdown

A3 板测失败

  • 触发方式:manual
  • 源码提交:97bfe491e168
  • 结果汇总:OK 183 / FAIL 1 / SKIP 1
  • 日志:/home/zhongxuan/ptoas-board-monitor/logs/20260413_163724_manual_pr474.log
  • 手动指令:/run a3
  • 触发人:zhongxuan
  • 失败阶段:board-validation / exit=1

失败用例

  • mrgsort_format2 (run, exit=2)

@reedhecre
Copy link
Copy Markdown

A3 板测失败详情:PR #474

mrgsort_format2

stage=run info=exit=2

[ERROR] Mismatch: golden_v5.bin vs v5.bin, max diff=3.390000104904175 at idx=637 (golden=3.140000104904175, out=-0.25, dtype=float32)
[ERROR] compare failed
[2026-04-13 16:47:00] ERROR: testcase failed (exit 2): mrgsort_format2

@reedhecre
Copy link
Copy Markdown

A3 板测完成(有跳过)

  • 触发方式:manual
  • 源码提交:97bfe491e168
  • 结果汇总:OK 184 / FAIL 0 / SKIP 1
  • 日志:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260413_164905_manual_pr474.log
  • 结果 TSV:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260413_164905_manual_pr474.tsv
  • 手动指令:/run a3
  • 触发人:HecreReed
  • 触发评论:fix: restore missing tile shape verifier helper #474 (comment)

@zhangstevenunity zhangstevenunity merged commit 8c5f037 into hw-native-sys:main Apr 13, 2026
11 checks passed
@reedhecre
Copy link
Copy Markdown

A3 板测完成(有跳过)

  • 触发方式:merged
  • 源码提交:8c5f037aeb96
  • 结果汇总:OK 184 / FAIL 0 / SKIP 1
  • 日志:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260413_172505_merged_pr474.log
  • 结果 TSV:/home/zhongxuan/ptoas-board-monitor/runtime/logs/20260413_172505_merged_pr474.tsv

KurrinQu pushed a commit to KurrinQu/PTOAS that referenced this pull request Apr 13, 2026
…toas-helper

fix: restore missing tile shape verifier helper
KurrinQu pushed a commit to mouliangyu/PTOAS that referenced this pull request Apr 13, 2026
…toas-helper

fix: restore missing tile shape verifier helper
@HecreReed
Copy link
Copy Markdown
Collaborator Author

/run sim

@reedhecre
Copy link
Copy Markdown

A5 SIM 手动板测当前要求显式指定 case。请使用 /run sim <case>/run sim case1,case2

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