Relax thistogram verifier for ui32 byte 3#714
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the pto.thistogram verification logic and documentation to bypass layout and shape constraints on the idx operand when the source element type is ui32 and byte is set to 3. A test case is also added to verify this behavior. The reviewer suggested adding a range check for byte to ensure it falls within the valid [0, 3] range, preventing invalid values from bypassing the verification checks.
| if (!hasCompatibleKnownExtent(idxShape[0], expectedIdxRows) || | ||
| !hasCompatibleKnownExtent(idxValid[0], expectedIdxRows)) | ||
| return emitOpError("expects idx rows/valid rows to match the byte-selected filter depth when src element type is ui32"); | ||
| if (byte != 3) { |
There was a problem hiding this comment.
If byte is not validated to be within the valid range [0, 3] for ui32 inputs, an invalid value (such as 4 or negative values) could bypass the layout and shape checks, potentially leading to undefined behavior or compiler crashes downstream. Adding a range check for byte ensures robustness.
if (byte < 0 || byte > 3)
return emitOpError("expects byte to be in the range [0, 3] when src element type is ui32");
if (byte != 3) {
Codex Review该评论由 review 机器人自动更新。
SummaryPR #714 放宽了 Findings
这里把
这个测试的 RUN 行是 |
A5 板测成功
|
A3 板测失败
失败用例
|
A3 板测失败详情:PR #714syncall_binding
tprefetch_async_binding
|
No description provided.