File tree Expand file tree Collapse file tree 6 files changed +31
-4
lines changed Expand file tree Collapse file tree 6 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,19 @@ enum ScalarType : byte {
1818 FLOAT = 6,
1919 DOUBLE = 7,
2020 BOOL = 11,
21- // TODO(jakeszwe): Verify these are unused and then remove support
2221 QINT8 = 12,
2322 QUINT8 = 13,
2423 QINT32 = 14,
2524 QUINT4X2 = 16,
2625 QUINT2X4 = 17,
2726 BITS16 = 22,
27+ FLOAT8E5M2 = 23,
28+ FLOAT8E4M3FN = 24,
29+ FLOAT8E5M2FNUZ = 25,
30+ FLOAT8E4M3FNUZ = 26,
31+ UINT16 = 27,
32+ UINT32 = 28,
33+ UINT64 = 29,
2834 // Types currently not implemented.
2935 // COMPLEXHALF = 8,
3036 // COMPLEXFLOAT = 9,
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ executorch_flatbuffer_ScalarType_enum_t get_flatbuffer_scalar_type(
5757 return executorch_flatbuffer_ScalarType_BOOL;
5858 case exec_aten::ScalarType::Bits16:
5959 return executorch_flatbuffer_ScalarType_BITS16;
60+ case exec_aten::ScalarType::UInt16:
61+ return executorch_flatbuffer_ScalarType_UINT16;
6062 default :
6163 ET_CHECK_MSG (
6264 0 ,
Original file line number Diff line number Diff line change @@ -18,13 +18,19 @@ enum ScalarType : byte {
1818 FLOAT = 6,
1919 DOUBLE = 7,
2020 BOOL = 11,
21- // TODO(jakeszwe): Verify these are unused and then remove support
2221 QINT8 = 12,
2322 QUINT8 = 13,
2423 QINT32 = 14,
2524 QUINT4X2 = 16,
2625 QUINT2X4 = 17,
2726 BITS16 = 22,
27+ FLOAT8E5M2 = 23,
28+ FLOAT8E4M3FN = 24,
29+ FLOAT8E5M2FNUZ = 25,
30+ FLOAT8E4M3FNUZ = 26,
31+ UINT16 = 27,
32+ UINT32 = 28,
33+ UINT64 = 29,
2834 // Types currently not implemented.
2935 // COMPLEXHALF = 8,
3036 // COMPLEXFLOAT = 9,
Original file line number Diff line number Diff line change @@ -29,3 +29,10 @@ class ScalarType(IntEnum):
2929 QUINT4x2 = 16
3030 QUINT2x4 = 17
3131 BITS16 = 22
32+ FLOAT8E5M2 = 23
33+ FLOAT8E4M3FN = 24
34+ FLOAT8E5M2FNUZ = 25
35+ FLOAT8E4M3FNUZ = 26
36+ UINT16 = 27
37+ UINT32 = 28
38+ UINT64 = 29
Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ def memory_format_enum(memory_format: torch.memory_format) -> int:
262262 torch .qint32 : ScalarType .QINT32 ,
263263 torch .bfloat16 : ScalarType .BFLOAT16 ,
264264 torch .quint4x2 : ScalarType .QUINT4x2 ,
265- torch .uint16 : ScalarType .BITS16 ,
265+ torch .uint16 : ScalarType .UINT16 ,
266266}
267267
268268
Original file line number Diff line number Diff line change @@ -18,13 +18,19 @@ enum ScalarType : byte {
1818 FLOAT = 6,
1919 DOUBLE = 7,
2020 BOOL = 11,
21- // TODO(jakeszwe): Verify these are unused and then remove support
2221 QINT8 = 12,
2322 QUINT8 = 13,
2423 QINT32 = 14,
2524 QUINT4X2 = 16,
2625 QUINT2X4 = 17,
2726 BITS16 = 22,
27+ FLOAT8E5M2 = 23,
28+ FLOAT8E4M3FN = 24,
29+ FLOAT8E5M2FNUZ = 25,
30+ FLOAT8E4M3FNUZ = 26,
31+ UINT16 = 27,
32+ UINT32 = 28,
33+ UINT64 = 29,
2834 // Types currently not implemented.
2935 // COMPLEXHALF = 8,
3036 // COMPLEXFLOAT = 9,
You can’t perform that action at this time.
0 commit comments