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 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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: -- cgit v1.2.1