mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37358 Test Plan: ```lang=bash buck build mode/opt -c fbcode.cuda_use_clang=true //vision/fair/detectron2/tools:benchmark ``` Reviewed By: ngimel Differential Revision: D21262235 fbshipit-source-id: 00633352d87da0881b2cc90759265fa0d0bd96be
19 lines
319 B
C++
19 lines
319 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
#include <c10/macros/Macros.h>
|
|
|
|
namespace c10 {
|
|
|
|
/**
|
|
* qint32 is for signed 32 bit quantized Tensors
|
|
*/
|
|
struct alignas(4) qint32 {
|
|
using underlying = int32_t;
|
|
int32_t val_;
|
|
qint32() = default;
|
|
C10_HOST_DEVICE explicit qint32(int32_t val) : val_(val) {}
|
|
};
|
|
|
|
} // namespace c10
|