Skip to content

fix: delete tile shape verifier helper, inplaced by validshape check#465

Open
FangRui0 wants to merge 1 commit intohw-native-sys:mainfrom
FangRui0:fix_verify
Open

fix: delete tile shape verifier helper, inplaced by validshape check#465
FangRui0 wants to merge 1 commit intohw-native-sys:mainfrom
FangRui0:fix_verify

Conversation

@FangRui0
Copy link
Copy Markdown
Contributor

@FangRui0 FangRui0 commented Apr 9, 2026

问题来源: https://gitcode.com/cann/pto-as/issues/11
pto-isa中仅对validshape做检查,pto-as与其对齐

修复方式:
删除通用verify helper中对logical shape的检查,保留valideshape的检查,valideshape的检查通常没有common约束,散布在各个op的verify函数中

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 refactors the verifyTileBufSameShapeAndElem function into verifyTileBufSameElemType by removing the internal shape equality check. All call sites across numerous operations have been updated to reflect this change. Feedback suggests that the verifyVecTileBinaryOp static function appears to be unused dead code and should be removed to improve maintainability.

Comment on lines +2355 to 2357
if (failed(verifyTileBufSameElemType(op, src0Ty, src1Ty, "src0", "src1")) ||
failed(verifyTileBufSameElemType(op, src0Ty, dstTy, "src0", "dst")))
return failure();
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

在您重构此部分代码时,我注意到整个 verifyVecTileBinaryOp 函数似乎在此文件中未被使用。由于它是一个 static 函数,这很可能是可以移除的死代码,以提高代码的可维护性。

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.

1 participant