File tree Expand file tree Collapse file tree 6 files changed +21
-2
lines changed Expand file tree Collapse file tree 6 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,14 @@ enum ScalarType : byte {
2424 QINT32 = 14,
2525 QUINT4X2 = 16,
2626 QUINT2X4 = 17,
27+ BITS16 = 22,
2728 // Types currently not implemented.
2829 // COMPLEXHALF = 8,
2930 // COMPLEXFLOAT = 9,
3031 // COMPLEXDOUBLE = 10,
3132 // BFLOAT16 = 15,
33+ // BITS1x8 = 18,
34+ // BITS2x4 = 19,
35+ // BITS4x2 = 20,
36+ // BITS8 = 21,
3237}
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ executorch_flatbuffer_ScalarType_enum_t get_flatbuffer_scalar_type(
5555 return executorch_flatbuffer_ScalarType_DOUBLE;
5656 case exec_aten::ScalarType::Bool:
5757 return executorch_flatbuffer_ScalarType_BOOL;
58+ case exec_aten::ScalarType::Bits16:
59+ return executorch_flatbuffer_ScalarType_BITS16;
5860 default :
5961 ET_CHECK_MSG (
6062 0 ,
Original file line number Diff line number Diff line change @@ -24,9 +24,14 @@ enum ScalarType : byte {
2424 QINT32 = 14,
2525 QUINT4X2 = 16,
2626 QUINT2X4 = 17,
27+ BITS16 = 22,
2728 // Types currently not implemented.
2829 // COMPLEXHALF = 8,
2930 // COMPLEXFLOAT = 9,
3031 // COMPLEXDOUBLE = 10,
3132 // BFLOAT16 = 15,
33+ // BITS1x8 = 18,
34+ // BITS2x4 = 19,
35+ // BITS4x2 = 20,
36+ // BITS8 = 21,
3237}
Original file line number Diff line number Diff line change 44# This source code is licensed under the BSD-style license found in the
55# LICENSE file in the root directory of this source tree.
66
7+ # pyre-unsafe
8+
79from enum import IntEnum
810
911
@@ -26,4 +28,4 @@ class ScalarType(IntEnum):
2628 BFLOAT16 = 15
2729 QUINT4x2 = 16
2830 QUINT2x4 = 17
29- Bits16 = 22
31+ BITS16 = 22
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 .BITS16 ,
266266}
267267
268268
Original file line number Diff line number Diff line change @@ -24,9 +24,14 @@ enum ScalarType : byte {
2424 QINT32 = 14,
2525 QUINT4X2 = 16,
2626 QUINT2X4 = 17,
27+ BITS16 = 22,
2728 // Types currently not implemented.
2829 // COMPLEXHALF = 8,
2930 // COMPLEXFLOAT = 9,
3031 // COMPLEXDOUBLE = 10,
3132 // BFLOAT16 = 15,
33+ // BITS1x8 = 18,
34+ // BITS2x4 = 19,
35+ // BITS4x2 = 20,
36+ // BITS8 = 21,
3237}
You can’t perform that action at this time.
0 commit comments