aboutsummaryrefslogtreecommitdiff
path: root/src/TosaSerialize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/TosaSerialize.cpp')
-rw-r--r--src/TosaSerialize.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp
index 3569893..9a6cf84 100644
--- a/src/TosaSerialize.cpp
+++ b/src/TosaSerialize.cpp
@@ -1238,26 +1238,21 @@ TosaSerializationOperator *
TosaSerializationOperatorBuilder::build<mlir::tosa::ResizeOp>(
mlir::Operation &op) const {
std::string input_name = GetTensorName(op.getOperand(0));
+ std::string scale_name = GetTensorName(op.getOperand(1));
+ std::string offset_name = GetTensorName(op.getOperand(2));
+ std::string border_name = GetTensorName(op.getOperand(3));
std::string output_name = GetTensorName(op.getResult(0));
- auto scale = getDenseI64ArrayAttr<int16_t>(op.getAttr("scale"));
- ASSERT_VECTOR_LENGTH(scale, 4);
-
- auto offset = getDenseI64ArrayAttr<int16_t>(op.getAttr("offset"));
- ASSERT_VECTOR_LENGTH(offset, 2);
-
- auto border = getDenseI64ArrayAttr<int16_t>(op.getAttr("border"));
- ASSERT_VECTOR_LENGTH(border, 2);
-
auto mode_str =
op.getAttr("mode").dyn_cast<mlir::StringAttr>().getValue().str();
ResizeMode mode = ResizeModeStr2Enum(mode_str);
- TosaResizeAttribute attribute(scale, offset, border, mode);
+ TosaResizeAttribute attribute({}, {}, {}, mode);
TosaSerializationOperator *tyop = new TosaSerializationOperator(
Op_RESIZE, Attribute_ResizeAttribute, &attribute,
- std::vector<std::string>{input_name},
+ std::vector<std::string>{input_name, scale_name, offset_name,
+ border_name},
std::vector<std::string>{output_name});
return tyop;