[Mlir-commits] [mlir] [mlir][tosa] Change the start and size of slice to tosa shape type (PR #124209)
TatWai Chong
llvmlistbot at llvm.org
Mon Jan 27 11:50:31 PST 2025
================
@@ -268,12 +268,28 @@ class SliceConverter : public OpConversionPattern<tosa::SliceOp> {
ShapedType resultType = cast<ShapedType>(sliceOp.getType());
if (llvm::isa<UnrankedTensorType>(resultType))
return failure();
+
+ ElementsAttr StartElems;
+ ElementsAttr SizeElems;
+
+ if (!matchPattern(sliceOp.getStart(), m_Constant(&StartElems)))
----------------
tatwaichong wrote:
I see. As you have gathered, the dynamic-shaped handling has been implemented internally but the needed shape ops are not included in v1.0 and not published. Yes, non-static legalization will come to a separate patch sometime in the future, but I think the ultimate implementation may different with the current experimental IR when we found better design.
https://github.com/llvm/llvm-project/pull/124209
More information about the Mlir-commits
mailing list