aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Ge <jerry.ge@arm.com>2024-02-28 22:16:56 +0000
committerJerry Ge <jerry.ge@arm.com>2024-02-28 22:17:54 +0000
commit7720f24131f5672a1137cc7b17edf017e66b6ae7 (patch)
tree9f36ce39142f6e9eaf8592e534622fc8d69e3438
parent1a7ca55663ef19c95ba9d6bc2a2789414762273d (diff)
downloadtosa_mlir_translator-7720f24131f5672a1137cc7b17edf017e66b6ae7.tar.gz
Update ConstructConstAttr for FP16 case
- With the update of ConvertU8toF16 to store F16 data in - F16 containers instead of F32, need to update the - function caller to have updated signatures Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: Idfb99f238cdc32d4f0a9796e8aa3d4be8038f4c2
-rw-r--r--src/TosaDeserialize.cpp6
m---------third_party/serialization_lib0
2 files changed, 3 insertions, 3 deletions
diff --git a/src/TosaDeserialize.cpp b/src/TosaDeserialize.cpp
index 82c107e..bd9fc9d 100644
--- a/src/TosaDeserialize.cpp
+++ b/src/TosaDeserialize.cpp
@@ -238,10 +238,10 @@ ConstructConstAttr(const mlir::RankedTensorType &output_type,
break;
}
case DType_FP16: {
- std::vector<float> float_data;
- TosaSerializationHandler::ConvertU8toF16(data, out_size, float_data);
+ std::vector<half_float::half> half_data;
+ TosaSerializationHandler::ConvertU8toF16(data, out_size, half_data);
value_attr =
- mlir::DenseElementsAttr::get(output_type, llvm::ArrayRef(float_data));
+ mlir::DenseElementsAttr::get(output_type, llvm::ArrayRef(half_data));
break;
}
case DType_UINT8:
diff --git a/third_party/serialization_lib b/third_party/serialization_lib
-Subproject 81db8ee8f580d30ec0ca53067df32ef046e6f09
+Subproject 758e73e117c5cef17f8f0b1c543efc1df953b2f