diff options
Diffstat (limited to 'src/TosaSerialize.cpp')
-rw-r--r-- | src/TosaSerialize.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
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::tosa::SliceOp>( mlir::Operation &op) const { - auto start = getDenseI64ArrayAttr<int>(op.getAttr("start")); - auto size = getDenseI64ArrayAttr<int>(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<std::string>{input_name}, + Op_SLICE, Attribute_NONE, nullptr, + std::vector<std::string>{input_name, start_name, size_name}, std::vector<std::string>{output_name}); return tyop; |