My Project
Classes | Typedefs | Functions
mlir::quantizer Namespace Reference

Classes

class  AbstractTensorStatistics
 Base class for querying statistics about a tensor. More...
 
class  AttributeTensorStatistics
 
class  BasePropagatedFact
 
class  CAGAnchorNode
 
class  CAGConstraintNode
 Base class for constraint nodes. More...
 
class  CAGNode
 
class  CAGOperandAnchor
 
class  CAGResultAnchor
 
class  CAGSlice
 A slice of a CAG (which may be the whole graph). More...
 
struct  CAGUniformMetadata
 
struct  CandidateQuantizedType
 Candidate for a quantized type conversion. More...
 
struct  DiscreteReducer
 
struct  ExpandingMinMaxReducer
 
class  FxpMathTargetConfig
 
struct  MaximizingNumericReducer
 A binary reducer that maximizes a numeric type. More...
 
struct  MinimizingNumericReducer
 A binary reducer that minimizing a numeric type. More...
 
struct  ModificationResult
 Typed indicator of whether a mutator produces a modification. More...
 
class  SolverContext
 
class  TargetConfiguration
 
struct  TensorAxisStatistics
 Statistics about a tensor axis (or the whole tensor). More...
 
class  UniformConstraintsBuilder
 
class  UniformParamsFromMinMaxSolver
 
struct  UniformStorageParams
 

Typedefs

using ExpandingMinMaxFact = BasePropagatedFact< ExpandingMinMaxReducer >
 
using MinimizingDoubleFact = BasePropagatedFact< MinimizingNumericReducer< double > >
 
using MinimizingIntFact = BasePropagatedFact< MinimizingNumericReducer< int > >
 
using MaximizingDoubleFact = BasePropagatedFact< MaximizingNumericReducer< double > >
 
using MaximizingIntFact = BasePropagatedFact< MaximizingNumericReducer< int > >
 
template<typename T >
using DiscreteFact = BasePropagatedFact< DiscreteReducer< T > >
 
using DiscreteScaleZeroPointFact = DiscreteFact< std::pair< double, int64_t > >
 Discrete scale/zeroPoint fact. More...
 

Functions

raw_ostream & operator<< (raw_ostream &os, const CAGNode &node)
 
ModificationResult modify (bool isModified=true)
 
bool modified (ModificationResult m)
 
raw_ostream & operator<< (raw_ostream &os, const TensorAxisStatistics &stats)
 
Type getElementOrPrimitiveType (Type t)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const UniformStorageParams &p)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const UniformParamsFromMinMaxSolver &s)
 
std::unique_ptr< OpPassBase< ModuleOp > > createInferQuantizedTypesPass (SolverContext &solverContext, const TargetConfiguration &config)
 
std::unique_ptr< OpPassBase< FuncOp > > createRemoveInstrumentationPass ()
 
std::unique_ptr< OpPassBase< FuncOp > > createAddDefaultStatsPass ()
 

Typedef Documentation

◆ DiscreteFact

template<typename T >
using mlir::quantizer::DiscreteFact = typedef BasePropagatedFact<DiscreteReducer<T> >

◆ DiscreteScaleZeroPointFact

using mlir::quantizer::DiscreteScaleZeroPointFact = typedef DiscreteFact<std::pair<double, int64_t> >

Discrete scale/zeroPoint fact.

◆ ExpandingMinMaxFact

◆ MaximizingDoubleFact

◆ MaximizingIntFact

◆ MinimizingDoubleFact

◆ MinimizingIntFact

Function Documentation

◆ createAddDefaultStatsPass()

std::unique_ptr< OpPassBase< FuncOp > > mlir::quantizer::createAddDefaultStatsPass ( )

Adds default (dummy) statistics to ops that can benefit from runtime stats. Meant for testing.

◆ createInferQuantizedTypesPass()

std::unique_ptr< OpPassBase< ModuleOp > > mlir::quantizer::createInferQuantizedTypesPass ( SolverContext solverContext,
const TargetConfiguration config 
)

Creates a pass that infers quantized types based on metadata discovered in the computation.

◆ createRemoveInstrumentationPass()

std::unique_ptr< OpPassBase< FuncOp > > mlir::quantizer::createRemoveInstrumentationPass ( )

Creates a pass which removes any instrumentation and hint ops which have no effect on final runtime.

◆ getElementOrPrimitiveType()

Type mlir::quantizer::getElementOrPrimitiveType ( Type  t)

Given an arbitrary container or primitive type, returns the element type, where the element type is just the type for non-containers.

◆ modified()

bool mlir::quantizer::modified ( ModificationResult  m)
inline

◆ modify()

ModificationResult mlir::quantizer::modify ( bool  isModified = true)
inline

◆ operator<<() [1/4]

llvm::raw_ostream& mlir::quantizer::operator<< ( llvm::raw_ostream &  os,
const UniformStorageParams p 
)

◆ operator<<() [2/4]

raw_ostream & mlir::quantizer::operator<< ( raw_ostream &  os,
const TensorAxisStatistics stats 
)

◆ operator<<() [3/4]

llvm::raw_ostream& mlir::quantizer::operator<< ( llvm::raw_ostream &  os,
const UniformParamsFromMinMaxSolver s 
)

◆ operator<<() [4/4]

raw_ostream& mlir::quantizer::operator<< ( raw_ostream &  os,
const CAGNode node 
)
inline