ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mpqsolver::core::SolverHooks Class Referenceabstract

#include <SolverHooks.h>

Public Member Functions

virtual void onBeginSolver (const std::string &model_path, float q8error, float q16error)=0
 called on the start of mpq search
 
virtual void onBeginIteration ()=0
 called on the start of current iteration
 
virtual void onEndIteration (const LayerParams &layers, const std::string &def_dtype, float error)=0
 called at the end of current iteration
 
virtual void onEndSolver (const LayerParams &layers, const std::string &def_dtype, float qerror)=0
 called at the end of mpq search
 

Detailed Description

Definition at line 31 of file SolverHooks.h.

Member Function Documentation

◆ onBeginIteration()

virtual void mpqsolver::core::SolverHooks::onBeginIteration ( )
pure virtual

called on the start of current iteration

Implemented in mpqsolver::core::DumpingHooks.

◆ onBeginSolver()

virtual void mpqsolver::core::SolverHooks::onBeginSolver ( const std::string &  model_path,
float  q8error,
float  q16error 
)
pure virtual

called on the start of mpq search

Parameters
model_pathpath of original float model to quantize
q8errorerror of Q8 quantization (if NAN, then not applicable)
q16errorerror of Q16 quantization (if NAN, then not applicable)

Implemented in mpqsolver::core::DumpingHooks.

◆ onEndIteration()

virtual void mpqsolver::core::SolverHooks::onEndIteration ( const LayerParams layers,
const std::string &  def_dtype,
float  error 
)
pure virtual

called at the end of current iteration

Parameters
layersmodel nodes with specific quantization parameters
def_dtypedefault quantization dtype
errorerror of quantization for current iteration

Implemented in mpqsolver::core::DumpingHooks.

◆ onEndSolver()

virtual void mpqsolver::core::SolverHooks::onEndSolver ( const LayerParams layers,
const std::string &  def_dtype,
float  qerror 
)
pure virtual

called at the end of mpq search

Parameters
layersmodel nodes with specific quantization parameters
def_dtypedefault quantization dtype
qerrorfinal error of quantization (if NAN, then not applicable)

Implemented in mpqsolver::core::DumpingHooks.


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