aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2022-09-28 09:07:29 +0100
committerJeremy Johnson <jeremy.johnson@arm.com>2022-10-13 17:49:57 +0100
commit5e4073f63247b6d63a0937df8764714d45cd5974 (patch)
treeac3e618a21f03e50429f260e43a96447610df3b2
parent9e899bb534956d2d08829beabe58a42a96531d08 (diff)
downloadtosa_mlir_translator-5e4073f63247b6d63a0937df8764714d45cd5974.tar.gz
Rename FLOAT type to FP32
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: I5e45381c8b573d18c2e3241742c663623961c4d6
-rw-r--r--src/TosaSerialize.cpp10
m---------third_party/serialization_lib0
2 files changed, 5 insertions, 5 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<mlir::tosa::ConstOp>(
if (unit_val)
{
std::vector<float> data = { 0.0 };
- type = DType_FLOAT;
+ type = DType_FP32;
TosaSerializationHandler::ConvertF32toU8(data, u8_data);
}
#endif
@@ -393,7 +393,7 @@ TosaSerializationOperatorBuilder::build<mlir::tosa::ConstOp>(
// Update tensor.data array with Const value attribute
std::vector<uint8_t> u8_data;
DType type = ts->GetDtype();
- if (type == DType_FLOAT) {
+ if (type == DType_FP32) {
std::vector<float> data;
auto dense_attr = op.getAttr(llvm::StringRef("value"))
.dyn_cast<mlir::DenseElementsAttr>();
diff --git a/third_party/serialization_lib b/third_party/serialization_lib
-Subproject 485a11d8cb67c8062c632f0987cd31cedbe93d6
+Subproject e1072a9ed871fd474e7b09b7a74ae7be5f0a6f7