载入中...
搜索中...
未找到
AffineQuant.h 文件参考
#include "common/Export.h"
#include "common/Result.h"
#include <cstdint>
#include <span>
#include <vector>

浏览源代码.

类

struct  eve::tensor::affine::QuantizedActivation
 ONNX unsigned activation quantization; owns bytes and scalar parameters. 更多...
 
struct  eve::tensor::affine::ByteView
 Borrowed packed 8-bit values, valid for the duration of a synchronous call. 更多...
 
struct  eve::tensor::affine::ConvShape
 Explicit 1D/2D NCHW convolution geometry; missing 1D height is one. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::tensor
 
namespace  eve::tensor::affine
 

函数

Result< QuantizedActivation > eve::tensor::affine::dynamicQuantize (std::span< const float > input)
 Quantize finite FP32 activations with ONNX DynamicQuantizeLinear semantics.
 
Result< std::vector< uint8_t > > eve::tensor::affine::quantize (std::span< const float > input, float scale, int zeroPoint, bool signedValues)
 Affine quantization to int8/uint8 bytes, saturating and rounding ties to even.
 
Result< std::vector< float > > eve::tensor::affine::dequantize (ByteView input, std::span< const float > scales, std::span< const int32_t > zeros, size_t inner=1)
 Affine dequantization using scalar or per-axis scale/zero point.
 
Result< std::vector< int32_t > > eve::tensor::affine::matmul (ByteView a, ByteView b, size_t m, size_t k, size_t n, int aZero=0, int bZero=0, OnnxCompute *compute=nullptr)
 Integer row-major [M,K] x [K,N], subtracting scalar zero points.
 
Result< std::vector< int32_t > > eve::tensor::affine::conv (ByteView x, ByteView w, const ConvShape &shape, int xZero, std::span< const int32_t > wZeros, OnnxCompute *compute=nullptr)
 Integer Conv, supporting groups, asymmetric padding and dilation.