载入中...
搜索中...
未找到
AffineQuant.h
浏览该文件的文档.
35[[nodiscard]] EVENGINE_API_DOMAINS Result<QuantizedActivation> dynamicQuantize(std::span<const float> input);
42[[nodiscard]] EVENGINE_API_DOMAINS Result<std::vector<uint8_t>> quantize(std::span<const float> input, float scale,
51[[nodiscard]] Result<std::vector<float>> dequantize(ByteView input, std::span<const float> scales,
60[[nodiscard]] EVENGINE_API_DOMAINS Result<std::vector<int32_t>> matmul(ByteView a, ByteView b, size_t m, size_t k,
78[[nodiscard]] EVENGINE_API_DOMAINS Result<std::vector<int32_t>> conv(ByteView x, ByteView w, const ConvShape& shape,
Move-only, checked operation results for the common layer.
GPU execution boundary for native ONNX; retains no model and retains compiled resources for the lifet...
Definition OnnxCompute.h:25
Definition AffineQuant.cpp:9
Result< std::vector< int32_t > > conv(ByteView x, ByteView w, const ConvShape &s, int xZero, std::span< const int32_t > wZeros, OnnxCompute *compute)
Integer Conv, supporting groups, asymmetric padding and dilation.
Definition AffineQuant.cpp:159
Result< std::vector< uint8_t > > quantize(std::span< const float > input, float scale, int zero, bool sign)
Affine quantization to int8/uint8 bytes, saturating and rounding ties to even.
Definition AffineQuant.cpp:24
Result< std::vector< float > > dequantize(ByteView input, std::span< const float > scales, std::span< const int32_t > zeros, size_t inner)
Affine dequantization using scalar or per-axis scale/zero point.
Definition AffineQuant.cpp:62
Result< std::vector< int32_t > > matmul(ByteView a, ByteView b, size_t m, size_t k, size_t n, int aZero, int bZero, OnnxCompute *compute)
Integer row-major [M,K] x [K,N], subtracting scalar zero points.
Definition AffineQuant.cpp:80
Result< QuantizedActivation > dynamicQuantize(std::span< const float > input)
Quantize finite FP32 activations with ONNX DynamicQuantizeLinear semantics.
Definition AffineQuant.cpp:41
Definition AffineQuant.cpp:9
Borrowed packed 8-bit values, valid for the duration of a synchronous call.
Definition AffineQuant.h:24
Explicit 1D/2D NCHW convolution geometry; missing 1D height is one.
Definition AffineQuant.h:65
ONNX unsigned activation quantization; owns bytes and scalar parameters.
Definition AffineQuant.h:17
std::vector< uint8_t > values
Definition AffineQuant.h:18