mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56830 Opt into formatting on GitHub and format everything. This is a trial run before turning on formatting for more and eventually all of the codebase. Test Plan: CI Reviewed By: zertosh Differential Revision: D27979080 fbshipit-source-id: a80f0c48691c08ae8ca0af06377b87e6a2351151
20 lines
366 B
C++
20 lines
366 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
#include <c10/macros/Macros.h>
|
|
|
|
namespace c10 {
|
|
|
|
/**
|
|
* quint4x2 is for un-signed 4 bit quantized Tensors that are packed to byte
|
|
* boundary.
|
|
*/
|
|
struct alignas(1) quint4x2 {
|
|
using underlying = uint8_t;
|
|
uint8_t val_;
|
|
quint4x2() = default;
|
|
C10_HOST_DEVICE explicit quint4x2(uint8_t val) : val_(val) {}
|
|
};
|
|
|
|
} // namespace c10
|