MLIR  15.0.0git
Functions
FakeQuantSupport.cpp File Reference
#include "mlir/Dialect/Quant/FakeQuantSupport.h"
#include "mlir/Dialect/Quant/QuantTypes.h"
+ Include dependency graph for FakeQuantSupport.cpp:

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 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

Definition at line 66 of file FakeQuantSupport.cpp.

References mlir::presburger::detail::abs().

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