My Project
Static Public Member Functions | Protected Member Functions | List of all members
mlir::quantizer::FxpMathTargetConfig Class Reference

#include <FxpMathConfig.h>

Inheritance diagram for mlir::quantizer::FxpMathTargetConfig:
Inheritance graph
[legend]
Collaboration diagram for mlir::quantizer::FxpMathTargetConfig:
Collaboration graph
[legend]

Static Public Member Functions

static std::unique_ptr< FxpMathTargetConfigcreate (SolverContext &context)
 Creates an FxpMathTargetConfig instance which can be further customized. More...
 

Protected Member Functions

 FxpMathTargetConfig (SolverContext &context)
 
- Protected Member Functions inherited from mlir::quantizer::TargetConfiguration
virtual void addValueIdentityOpByName (StringRef opName)=0
 
void addOpHandlerByName (StringRef name, OpHandlerFn fn)
 

Additional Inherited Members

- Public Types inherited from mlir::quantizer::TargetConfiguration
using OpHandlerFn = std::function< void(Operation *op, CAGSlice &cag)>
 
- Public Member Functions inherited from mlir::quantizer::TargetConfiguration
 TargetConfiguration (SolverContext &context)
 
virtual ~TargetConfiguration ()=default
 
unsigned addCandidateType (quant::AnyQuantizedType quantizedType, CandidateQuantizedType::Scheme scheme)
 Adds a candidate type, returning its ordinal. More...
 
const CandidateQuantizedTypegetCandidateType (unsigned index) const
 Gets a prototype scheme by index. More...
 
ArrayRef< CandidateQuantizedTypegetCandidateTypes () const
 
llvm::SmallBitVector getAllCandidateTypesMask () const
 Gets a mask of all enabled candidate types by ordinal. More...
 
llvm::SmallBitVector getCandidateTypeDisabledExceptMask (ArrayRef< unsigned > exceptOrdinals) const
 Gets a mask with every candidate type except those in the given mask. More...
 
template<typename OpTy >
void addOpHandler (OpHandlerFn fn)
 Adds an op handler. More...
 
template<typename OpTy >
void addRequireStatsOp ()
 
bool isRequireStatsOp (Operation *op) const
 Returns whether opName is a RequireStatsOp. More...
 
template<typename OpTy >
void addValueIdentityOp ()
 
void handleOp (Operation *op, CAGSlice &cag) const
 Handles the operation if a handler is defined for it. More...
 
virtual void finalizeAnchors (CAGSlice &cag) const
 Finalizes the CAG after all anchors have been added. More...
 
virtual bool isHandledType (Type t) const =0
 Whether an operand or result type is subject to analysis by this config. More...
 
- Static Public Attributes inherited from mlir::quantizer::TargetConfiguration
static constexpr size_t MaxSchemeIndex = 31
 

Detailed Description

Target configuration for a reference affine/fixed-point quantization scheme defined in terms of the FxpMathOps dialect. This can be extended with select ops from other dialects by way of the following public methods:

Constructor & Destructor Documentation

◆ FxpMathTargetConfig()

mlir::quantizer::FxpMathTargetConfig::FxpMathTargetConfig ( SolverContext context)
inlineprotected

Member Function Documentation

◆ create()

std::unique_ptr< FxpMathTargetConfig > FxpMathTargetConfig::create ( SolverContext context)
static

Creates an FxpMathTargetConfig instance which can be further customized.


The documentation for this class was generated from the following files: