1# Copyright (c) Meta Platforms, Inc. and affiliates. 2# All rights reserved. 3# 4# This source code is licensed under the BSD-style license found in the 5# LICENSE file in the root directory of this source tree. 6 7# pyre-unsafe 8 9from enum import IntEnum 10 11 12class ScalarType(IntEnum): 13 BYTE = 0 14 CHAR = 1 15 SHORT = 2 16 INT = 3 17 LONG = 4 18 HALF = 5 19 FLOAT = 6 20 DOUBLE = 7 21 COMPLEX32 = 8 22 COMPLEX64 = 9 23 COMPLEX128 = 10 24 BOOL = 11 25 QINT8 = 12 26 QUINT8 = 13 27 QINT32 = 14 28 BFLOAT16 = 15 29 QUINT4x2 = 16 30 QUINT2x4 = 17 31 BITS16 = 22 32 FLOAT8E5M2 = 23 33 FLOAT8E4M3FN = 24 34 FLOAT8E5M2FNUZ = 25 35 FLOAT8E4M3FNUZ = 26 36 UINT16 = 27 37 UINT32 = 28 38 UINT64 = 29 39