Skip to content

Commit

Permalink
[luci] Propagate qparam forward iteratively (#14518)
Browse files Browse the repository at this point in the history
This iteratively propagates qparam forward.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong <[email protected]>
  • Loading branch information
jinevening authored Jan 3, 2025
1 parent 0dc8806 commit 5bffe08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/luci/pass/src/QuantizeOnnxFakeQuantModelPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "QuantizeActivation.h"
#include "QuantizationUtils.h"

#include <logo/Phase.h>
#include <luci/IR/CircleNodes.h>
#include <luci/Service/Nodes/CircleConst.h>
#include <luci/Log.h>
Expand Down Expand Up @@ -89,8 +90,11 @@ bool QuantizeOnnxFakeQuantModelPass::run(loco::Graph *g)

// Quantize nodes using their predecessors' qparams
{
QuantizeWithPredecessorPass pass;
pass.run(g);
logo::Phase phase;
phase.emplace_back(std::make_unique<QuantizeWithPredecessorPass>());

logo::PhaseRunner<logo::PhaseStrategy::Saturate> phase_runner{g};
phase_runner.run(phase);
}

// Backward propagation of activation qparam
Expand Down

0 comments on commit 5bffe08

Please sign in to comment.