Rename FLOAT type to FP32
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: I2cd6ae85f59fd62a62b7f03ae9667228b54e82db
diff --git a/include/tosa_generated.h b/include/tosa_generated.h
index f0d04d0..2b9d0ea 100644
--- a/include/tosa_generated.h
+++ b/include/tosa_generated.h
@@ -92,7 +92,7 @@
DType_INT16 = 5,
DType_INT32 = 6,
DType_INT48 = 7,
- DType_FLOAT = 8,
+ DType_FP32 = 8,
DType_UINT16 = 9,
DType_FP16 = 10,
DType_MIN = DType_UNKNOWN,
@@ -109,7 +109,7 @@
DType_INT16,
DType_INT32,
DType_INT48,
- DType_FLOAT,
+ DType_FP32,
DType_UINT16,
DType_FP16
};
@@ -126,7 +126,7 @@
"INT16",
"INT32",
"INT48",
- "FLOAT",
+ "FP32",
"UINT16",
"FP16",
nullptr
diff --git a/python/serializer/tosa_serializer.py b/python/serializer/tosa_serializer.py
index fb89563..f4e146c 100644
--- a/python/serializer/tosa_serializer.py
+++ b/python/serializer/tosa_serializer.py
@@ -56,7 +56,7 @@
"INT16",
"INT32",
"INT48",
- "FLOAT",
+ "FP32",
"UINT16",
"FP16",
]
@@ -378,7 +378,7 @@
self.shape = shape
self.dtype = dtype
- if dtype == DType.FLOAT:
+ if dtype == DType.FP32:
fntype = np.float32
elif dtype == DType.FP16:
fntype = np.float16
@@ -466,7 +466,7 @@
elif self.dtype == DType.FP16:
np_arr = np.array(self.data, dtype=np.float16)
u8_data.extend(np_arr.view(np.uint8))
- elif self.dtype == DType.FLOAT:
+ elif self.dtype == DType.FP32:
for val in self.data:
b = struct.pack("!f", val)
u8_data.extend([b[3], b[2], b[1], b[0]])
diff --git a/python/tosa/DType.py b/python/tosa/DType.py
index 27d28c4..89669b7 100644
--- a/python/tosa/DType.py
+++ b/python/tosa/DType.py
@@ -11,6 +11,6 @@
INT16 = 5
INT32 = 6
INT48 = 7
- FLOAT = 8
+ FP32 = 8
UINT16 = 9
FP16 = 10
diff --git a/schema/tosa.fbs b/schema/tosa.fbs
index b3ab991..eb76f75 100644
--- a/schema/tosa.fbs
+++ b/schema/tosa.fbs
@@ -29,7 +29,7 @@
INT16,
INT32,
INT48,
- FLOAT,
+ FP32,
UINT16,
FP16,
}