| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][vector] vector.splat and vector.broadcast folding/canonicalizing parity (#150284) This PR ensures parity in folding/canonicalizing of vector.broadcast (from a scalar) and vector.splat. This means that by using vector.broadcast instead of vector.splat (which is currently deprecated), there is no loss in optimizations performed. All tests which were previously checking folding/canonicalizing of vector.splat are now done for vector.broadcast. The vector.splat canonicalization tests are now in a separate file, ready for removal when, in the future, we remove vector.splat completely. This PR also adds a canonicalizer to vector.splat to always convert it to vector.broadcast. This is to reduce the 'traffic' through vector.splat. There is a chance that this PR will break downstream users who create/expect for vector.splat. Changing all such logic to work just vector.broadcast instead should fix. | 11 个月前 | |
[mlir][Vector] Fold vector.step compared to constant (#161615) This PR adds a canonicalizer to vector.step that folds vector.step iff the result of the fold is a splat value. An alternative would be to always constant fold it, but that might result in some very large/cumbersome constants. I do wonder if vector.step might be better represented as some sort of attribute in the arith dialect, like %step = arith.constant iota<32> : vector<32xindex>. --------- Signed-off-by: James Newling <james.newling@gmail.com> | 9 个月前 | |
[mlir][ArmSME] Remove ConvertIllegalShapeCastOpsToTransposes (#139706) As a follow-up to PR #135841 (see discussion for background), this patch removes the ConvertIllegalShapeCastOpsToTransposes pattern from the SME legalization pass. This change unblocks folding for ShapeCastOp involving scalable vectors. Originally, the ConvertIllegalShapeCastOpsToTransposes pattern was introduced to rewrite certain vector.shape_cast ops that could not be lowered otherwise. Based on local end-to-end testing, this workaround is no longer required, and the pattern can now be safely removed. This patch also removes a special case from ShapeCastOp::fold, simplifying the fold logic. As a side effect of removing ConvertIllegalShapeCastOpsToTransposes, we lose the mechanism that enabled lowering of certain ops like: mlir %res = vector.transfer_read %mem[%a, %b] (...) : memref<?x?xf32>, vector<[4]x1xf32> Previously, such cases were handled by: * Rewriting a nearby vector.shape_cast to a vector.transpose (via ConvertIllegalShapeCastOpsToTransposes) * Then lowering the result with LiftIllegalVectorTransposeToMemory. This patch introduces a new dedicated pattern, LowerColumnTransferReadToLoops, that directly handles illegal vector.transfer_read ops involving leading scalable dimensions. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 11 个月前 | ||
| 9 个月前 | ||
| 1 年前 |