1#pragma once
2#include <cstdint>
3
4#include <c10/macros/Macros.h>
5
6namespace c10 {
7
8/**
9 * This is the data type for quantized Tensors. Right now we only have
10 * qint8 which is for 8 bit Tensors, and qint32 for 32 bit int Tensors,
11 * we might have 4 bit, 2 bit or 1 bit data types in the future.
12 */
13struct alignas(1) qint8 {
14 using underlying = int8_t;
15 int8_t val_;
16 qint8() = default;
17 C10_HOST_DEVICE explicit qint8(int8_t val) : val_(val) {}
18};
19
20} // namespace c10
21