MLIR  19.0.0git
Functions
FakeQuantSupport.cpp File Reference
#include "mlir/Dialect/Quant/FakeQuantSupport.h"
#include "mlir/Dialect/Quant/QuantTypes.h"

Go to the source code of this file.

Functions

static bool getDefaultStorageParams (unsigned numBits, bool narrowRange, bool isSigned, MLIRContext *ctx, Type &storageType, int64_t &qmin, int64_t &qmax)
 
static void getNudgedScaleAndZeroPoint (int64_t qmin, int64_t qmax, double rmin, double rmax, double &scale, int64_t &nudgedZeroPoint)
 

Function Documentation

◆ getDefaultStorageParams()

static bool getDefaultStorageParams ( unsigned  numBits,
bool  narrowRange,
bool  isSigned,
MLIRContext ctx,
Type storageType,
int64_t &  qmin,
int64_t &  qmax 
)
static

Definition at line 15 of file FakeQuantSupport.cpp.

References mlir::get(), max(), and min().

Referenced by mlir::quant::fakeQuantAttrsToType().

◆ getNudgedScaleAndZeroPoint()

static void getNudgedScaleAndZeroPoint ( int64_t  qmin,
int64_t  qmax,
double  rmin,
double  rmax,
double &  scale,
int64_t &  nudgedZeroPoint 
)
static