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/TosaDeserialize.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/TosaDeserialize.cpp') diff --git a/src/TosaDeserialize.cpp b/src/TosaDeserialize.cpp index 5956bc8..b80e2cb 100644 --- a/src/TosaDeserialize.cpp +++ b/src/TosaDeserialize.cpp @@ -1139,13 +1139,9 @@ TosaMlirOperatorBuilder::build(TosaSerializationOperator *op) const { assert(op->GetAttributeType() == Attribute_SliceAttribute); // double check attribute type - TosaSliceAttribute *attr = - static_cast(op->GetAttribute()); - mlir::DenseI64ArrayAttr start = - BuildDenseI64ArrayAttr(op_builder, attr->start()); - mlir::DenseI64ArrayAttr size = - BuildDenseI64ArrayAttr(op_builder, attr->size()); + mlir::Value start = tensor_map->at(op->GetInputTensorNames()[1]); + mlir::Value size = tensor_map->at(op->GetInputTensorNames()[2]); mlir::Operation *mlir_op = op_builder->create( loc, output_type, input_val, start, size); -- cgit v1.2.1