From 7720f24131f5672a1137cc7b17edf017e66b6ae7 Mon Sep 17 00:00:00 2001 From: Jerry Ge Date: Wed, 28 Feb 2024 22:16:56 +0000 Subject: 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 Change-Id: Idfb99f238cdc32d4f0a9796e8aa3d4be8038f4c2 --- src/TosaDeserialize.cpp | 6 +++--- third_party/serialization_lib | 2 +- 2 files changed, 4 insertions(+), 4 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_data; - TosaSerializationHandler::ConvertU8toF16(data, out_size, float_data); + std::vector 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 index 81db8ee..758e73e 160000 --- a/third_party/serialization_lib +++ b/third_party/serialization_lib @@ -1 +1 @@ -Subproject commit 81db8ee8f580d30ec0ca53067df32ef046e6f09e +Subproject commit 758e73e117c5cef17f8f0b1c543efc1df953b2fa -- cgit v1.2.1