Imported Upstream version 1.25.0
[platform/core/ml/nnfw.git] / compiler / circle-mpqsolver / src / core / Quantizer.cpp
@@ -19,7 +19,7 @@
 
 #include <iostream>
 
-using namespace mpqsolver::bisection;
+using namespace mpqsolver::core;
 using AlgorithmParameters = luci::CircleQuantizer::Options::AlgorithmParameters;
 using Algorithms = luci::CircleQuantizer::Options::Algorithm;
 
@@ -54,6 +54,8 @@ Quantizer::Quantizer(const std::string &input_dtype, const std::string &output_d
 {
 }
 
+void Quantizer::set_hook(const QuantizerHook *hook) { _hook = hook; }
+
 /**
  * @brief quantize recorded module (min/max initialized) with specified parameters
  * returns true on success
@@ -104,6 +106,11 @@ bool Quantizer::quantize(luci::Module *module, const std::string &quant_dtype,
     }
   }
 
+  if (_hook)
+  {
+    _hook->on_quantized(module);
+  }
+
   return true;
 }