forked from pytorch/executorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscalar_type.py
More file actions
38 lines (34 loc) · 710 Bytes
/
scalar_type.py
File metadata and controls
38 lines (34 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
# pyre-unsafe
from enum import IntEnum
class ScalarType(IntEnum):
BYTE = 0
CHAR = 1
SHORT = 2
INT = 3
LONG = 4
HALF = 5
FLOAT = 6
DOUBLE = 7
COMPLEX32 = 8
COMPLEX64 = 9
COMPLEX128 = 10
BOOL = 11
QINT8 = 12
QUINT8 = 13
QINT32 = 14
BFLOAT16 = 15
QUINT4x2 = 16
QUINT2x4 = 17
BITS16 = 22
FLOAT8E5M2 = 23
FLOAT8E4M3FN = 24
FLOAT8E5M2FNUZ = 25
FLOAT8E4M3FNUZ = 26
UINT16 = 27
UINT32 = 28
UINT64 = 29