From f5f00a9dd8bf6c4ad6256c2332e01662972b3fab Mon Sep 17 00:00:00 2001 From: TatWai Chong Date: Wed, 24 Jan 2024 11:33:22 -0800 Subject: Change the start and size of slice to tosa shape type Change-Id: Ifcb33a238ae3acdab9c33e039fb05f45aeb4df1c Signed-off-by: TatWai Chong --- src/TosaSerialize.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/TosaSerialize.cpp') diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp index de301fe..04709b7 100644 --- a/src/TosaSerialize.cpp +++ b/src/TosaSerialize.cpp @@ -1291,17 +1291,14 @@ template <> TosaSerializationOperator * TosaSerializationOperatorBuilder::build( mlir::Operation &op) const { - auto start = getDenseI64ArrayAttr(op.getAttr("start")); - auto size = getDenseI64ArrayAttr(op.getAttr("size")); - - TosaSliceAttribute attribute(start, size); - std::string input_name = GetTensorName(op.getOperand(0)); + std::string start_name = GetTensorName(op.getOperand(1)); + std::string size_name = GetTensorName(op.getOperand(2)); std::string output_name = GetTensorName(op.getResult(0)); TosaSerializationOperator *tyop = new TosaSerializationOperator( - Op_SLICE, Attribute_SliceAttribute, &attribute, - std::vector{input_name}, + Op_SLICE, Attribute_NONE, nullptr, + std::vector{input_name, start_name, size_name}, std::vector{output_name}); return tyop; -- cgit v1.2.1