mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/166079 Approved by: https://github.com/malfet, https://github.com/cyyever ghstack dependencies: #166076, #166077, #166078
23 lines
434 B
C++
23 lines
434 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
#include <torch/headeronly/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
|
|
|
|
HIDDEN_NAMESPACE_BEGIN(torch, headeronly)
|
|
using c10::qint32;
|
|
HIDDEN_NAMESPACE_END(torch, headeronly)
|