aboutsummaryrefslogtreecommitdiff
path: root/src/TosaDeserialize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/TosaDeserialize.cpp')
-rw-r--r--src/TosaDeserialize.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/TosaDeserialize.cpp b/src/TosaDeserialize.cpp
index 1dcd88d..1f24f71 100644
--- a/src/TosaDeserialize.cpp
+++ b/src/TosaDeserialize.cpp
@@ -1202,6 +1202,9 @@ template <>
std::vector<mlir::Value>
TosaMlirOperatorBuilder::build<Op_RESIZE>(TosaSerializationOperator *op) const {
mlir::Value input_val = tensor_map->at(op->GetInputTensorNames()[0]);
+ mlir::Value scale_val = tensor_map->at(op->GetInputTensorNames()[1]);
+ mlir::Value offset_val = tensor_map->at(op->GetInputTensorNames()[2]);
+ mlir::Value border_val = tensor_map->at(op->GetInputTensorNames()[3]);
mlir::RankedTensorType output_type =
tensor_type_map->at(op->GetOutputTensorNames()[0]);
@@ -1210,16 +1213,10 @@ TosaMlirOperatorBuilder::build<Op_RESIZE>(TosaSerializationOperator *op) const {
TosaResizeAttribute *attr =
static_cast<TosaResizeAttribute *>(op->GetAttribute());
- mlir::DenseI64ArrayAttr scale =
- BuildDenseI64ArrayAttr(op_builder, attr->scale());
- mlir::DenseI64ArrayAttr offset =
- BuildDenseI64ArrayAttr(op_builder, attr->offset());
- mlir::DenseI64ArrayAttr border =
- BuildDenseI64ArrayAttr(op_builder, attr->border());
auto mode = op_builder->getStringAttr(ResizeEnum2Str(attr->mode()));
mlir::Operation *mlir_op = op_builder->create<mlir::tosa::ResizeOp>(
- loc, output_type, input_val, scale, offset, border, mode);
+ loc, output_type, input_val, scale_val, offset_val, border_val, mode);
block->push_back(mlir_op);
return std::vector<mlir::Value>({mlir_op->getResult(0)});
}