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 {
18
18
FLOAT = 6,
19
19
DOUBLE = 7,
20
20
BOOL = 11,
21
- // TODO(jakeszwe): Verify these are unused and then remove support
22
21
QINT8 = 12,
23
22
QUINT8 = 13,
24
23
QINT32 = 14,
25
24
QUINT4X2 = 16,
26
25
QUINT2X4 = 17,
27
26
BITS16 = 22,
27
+ FLOAT8E5M2 = 23,
28
+ FLOAT8E4M3FN = 24,
29
+ FLOAT8E5M2FNUZ = 25,
30
+ FLOAT8E4M3FNUZ = 26,
31
+ UINT16 = 27,
32
+ UINT32 = 28,
33
+ UINT64 = 29,
28
34
// Types currently not implemented.
29
35
// COMPLEXHALF = 8,
30
36
// 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(
57
57
return executorch_flatbuffer_ScalarType_BOOL;
58
58
case exec_aten::ScalarType::Bits16:
59
59
return executorch_flatbuffer_ScalarType_BITS16;
60
+ case exec_aten::ScalarType::UInt16:
61
+ return executorch_flatbuffer_ScalarType_UINT16;
60
62
default :
61
63
ET_CHECK_MSG (
62
64
0 ,
Original file line number Diff line number Diff line change @@ -18,13 +18,19 @@ enum ScalarType : byte {
18
18
FLOAT = 6,
19
19
DOUBLE = 7,
20
20
BOOL = 11,
21
- // TODO(jakeszwe): Verify these are unused and then remove support
22
21
QINT8 = 12,
23
22
QUINT8 = 13,
24
23
QINT32 = 14,
25
24
QUINT4X2 = 16,
26
25
QUINT2X4 = 17,
27
26
BITS16 = 22,
27
+ FLOAT8E5M2 = 23,
28
+ FLOAT8E4M3FN = 24,
29
+ FLOAT8E5M2FNUZ = 25,
30
+ FLOAT8E4M3FNUZ = 26,
31
+ UINT16 = 27,
32
+ UINT32 = 28,
33
+ UINT64 = 29,
28
34
// Types currently not implemented.
29
35
// COMPLEXHALF = 8,
30
36
// COMPLEXFLOAT = 9,
Original file line number Diff line number Diff line change @@ -29,3 +29,10 @@ class ScalarType(IntEnum):
29
29
QUINT4x2 = 16
30
30
QUINT2x4 = 17
31
31
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:
262
262
torch .qint32 : ScalarType .QINT32 ,
263
263
torch .bfloat16 : ScalarType .BFLOAT16 ,
264
264
torch .quint4x2 : ScalarType .QUINT4x2 ,
265
- torch .uint16 : ScalarType .BITS16 ,
265
+ torch .uint16 : ScalarType .UINT16 ,
266
266
}
267
267
268
268
Original file line number Diff line number Diff line change @@ -18,13 +18,19 @@ enum ScalarType : byte {
18
18
FLOAT = 6,
19
19
DOUBLE = 7,
20
20
BOOL = 11,
21
- // TODO(jakeszwe): Verify these are unused and then remove support
22
21
QINT8 = 12,
23
22
QUINT8 = 13,
24
23
QINT32 = 14,
25
24
QUINT4X2 = 16,
26
25
QUINT2X4 = 17,
27
26
BITS16 = 22,
27
+ FLOAT8E5M2 = 23,
28
+ FLOAT8E4M3FN = 24,
29
+ FLOAT8E5M2FNUZ = 25,
30
+ FLOAT8E4M3FNUZ = 26,
31
+ UINT16 = 27,
32
+ UINT32 = 28,
33
+ UINT64 = 29,
28
34
// Types currently not implemented.
29
35
// COMPLEXHALF = 8,
30
36
// COMPLEXFLOAT = 9,
You can’t perform that action at this time.
0 commit comments