fix: restore missing tile shape verifier helper#474
fix: restore missing tile shape verifier helper#474zhangstevenunity merged 2 commits intohw-native-sys:mainfrom
Conversation
There was a problem hiding this comment.
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.
lib/PTO/IR/PTO.cpp
Outdated
| if (getShapeVec(lhs) != getShapeVec(rhs)) | ||
| return op->emitOpError() << "expects " << lhsName << " and " << rhsName | ||
| << " to have the same shape"; |
There was a problem hiding this comment.
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;|
/run a3 |
A3 板测失败
失败用例
|
A3 板测失败详情:PR #474mrgsort_format2
|
A3 板测完成(有跳过)
|
A3 板测完成(有跳过)
|
…toas-helper fix: restore missing tile shape verifier helper
…toas-helper fix: restore missing tile shape verifier helper
|
/run sim |
|
A5 SIM 手动板测当前要求显式指定 case。请使用 |
Summary
verifyTileBufSameShapeAndElemhelper inlib/PTO/IR/PTO.cppbuild-ptoason currentmainafter the recent verifier additionsNotes