feat: align tcvt/random/mrgsort/matmulmx with pto-isa#483
feat: align tcvt/random/mrgsort/matmulmx with pto-isa#483HecreReed wants to merge 4 commits intohw-native-sys:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the SaturationMode attribute and the TRandomOp operation to the PTO dialect. It also updates TCvtOp and TMrgSortOp to include an optional tmp operand and adds saturation mode support to TCvtOp. Furthermore, matrix multiplication intrinsics have been unified under the TMATMUL_MX name. A critical bug was found in the TMrgSortOp parser where the excuted operand is parsed but not resolved into the operation's operands list.
| if (parser.resolveOperands(srcs, srcTypes, parser.getCurrentLocation(), result.operands) || | ||
| parser.resolveOperand(dstOp, dstTy, result.operands) || | ||
| parser.resolveOperand(tmpOp, tmpTy, result.operands) || |
There was a problem hiding this comment.
The excutedOp operand is parsed on line 5906 but it is not resolved into result.operands. This will cause the operation to be created without the excuted operand, leading to verification failures or incorrect code generation.
| if (parser.resolveOperands(srcs, srcTypes, parser.getCurrentLocation(), result.operands) || | |
| parser.resolveOperand(dstOp, dstTy, result.operands) || | |
| parser.resolveOperand(tmpOp, tmpTy, result.operands) || | |
| if (parser.resolveOperands(srcs, srcTypes, parser.getCurrentLocation(), result.operands) || | |
| parser.resolveOperand(dstOp, dstTy, result.operands) || | |
| parser.resolveOperand(tmpOp, tmpTy, result.operands) || | |
| parser.resolveOperand(excutedOp, excutedTy, result.operands)) | |
| return failure(); |
Codex Review该评论由 review 机器人自动更新。
Summary检查到 2 个与 correctness/contract 相关的问题: Findings
本 PR 将 format2 改为
|
|
/run a3 |
A3 板测完成(有跳过)
|
Summary
pto.tcvtto cover allpto-isacall forms, including optional tmp tile and optional saturation modepto.trandomop and lower it toTRANDOMpto.tmrgsortformat2 sotmpis aninsoperand, matchingpto-isaTMATMUL_MX(...)so generated C++ matchespto-isaValidation
cmake --build build-codex --target ptoas -j8cmake --build build-codex --target PTOPythonModules PTOCAPI -j8./build-codex/tools/ptoas/ptoas --pto-arch=a3 test/basic/tcvt_emitc.pto | FileCheck ... --check-prefix=A3./build-codex/tools/ptoas/ptoas --pto-arch=a5 test/basic/tcvt_emitc.pto | FileCheck ... --check-prefix=A5./build-codex/tools/ptoas/ptoas --pto-arch=a3 test/basic/tcvt_e2e.pto | FileCheck ... --check-prefix=A3./build-codex/tools/ptoas/ptoas --pto-arch=a5 test/basic/tcvt_e2e.pto | FileCheck ... --check-prefix=A5./build-codex/tools/ptoas/ptoas --pto-arch=a3 test/basic/tmrgsort_variants_emitc.pto | FileCheck ... --check-prefix=A3./build-codex/tools/ptoas/ptoas --pto-arch=a5 test/basic/tmatmul_mx_emitc.pto | FileCheck ... --check-prefix=A5./build-codex/tools/ptoas/ptoas --pto-arch=a5 test/basic/trandom_emitc.pto | FileCheck ... --check-prefix=A5Notes