From 5e4073f63247b6d63a0937df8764714d45cd5974 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Wed, 28 Sep 2022 09:07:29 +0100 Subject: Rename FLOAT type to FP32 Signed-off-by: Jeremy Johnson Change-Id: I5e45381c8b573d18c2e3241742c663623961c4d6 --- src/TosaSerialize.cpp | 10 +++++----- third_party/serialization_lib | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/TosaSerialize.cpp b/src/TosaSerialize.cpp index 7ba4bf2..21c0f93 100644 --- a/src/TosaSerialize.cpp +++ b/src/TosaSerialize.cpp @@ -73,7 +73,7 @@ static ResizeMode ResizeModeStr2Enum(const std::string &mode_str) { static DType Type2DType(mlir::Type element_type) { if (element_type.isF64() || element_type.isF32() || element_type.isF16() || element_type.isBF16()) { - return DType_FLOAT; + return DType_FP32; } else if (element_type.isUnsignedInteger(8)) { return DType_UINT8; } else if (element_type.isInteger(4)) { @@ -97,7 +97,7 @@ static DType Type2DType(mlir::Type element_type) { static DType Type2AccumDType(mlir::Type element_type) { if (element_type.isF64() || element_type.isF32() || element_type.isF16() || element_type.isBF16()) { - return DType_FLOAT; + return DType_FP32; } else if (element_type.isInteger(8)) { return DType_INT32; } else if (element_type.isInteger(16)) { @@ -109,7 +109,7 @@ static DType Type2AccumDType(mlir::Type element_type) { static DType Type2PoolAccumDType(mlir::Type element_type) { if (element_type.isF64() || element_type.isF32() || element_type.isF16() || element_type.isBF16()) { - return DType_FLOAT; + return DType_FP32; } else if (element_type.isInteger(8) || element_type.isInteger(16)) { return DType_INT32; } @@ -385,7 +385,7 @@ TosaSerializationOperatorBuilder::build( if (unit_val) { std::vector data = { 0.0 }; - type = DType_FLOAT; + type = DType_FP32; TosaSerializationHandler::ConvertF32toU8(data, u8_data); } #endif @@ -393,7 +393,7 @@ TosaSerializationOperatorBuilder::build( // Update tensor.data array with Const value attribute std::vector u8_data; DType type = ts->GetDtype(); - if (type == DType_FLOAT) { + if (type == DType_FP32) { std::vector data; auto dense_attr = op.getAttr(llvm::StringRef("value")) .dyn_cast(); diff --git a/third_party/serialization_lib b/third_party/serialization_lib index 485a11d..e1072a9 160000 --- a/third_party/serialization_lib +++ b/third_party/serialization_lib @@ -1 +1 @@ -Subproject commit 485a11d8cb67c8062c632f0987cd31cedbe93d6d +Subproject commit e1072a9ed871fd474e7b09b7a74ae7be5f0a6f78 -- cgit v1.2.1