Skip to content

Commit

Permalink
[luci/pass] Enable CanonicalizePass in Optimizer (#13508)
Browse files Browse the repository at this point in the history
This will enable CanonicalizePass to run in Optimizer.

ONE-DCO-1.0-Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Jul 28, 2024
1 parent 8f37c80 commit 64f1b6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/luci/pass/src/CircleOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "luci/CircleOptimizer.h"

#include "luci/Pass/CanonicalizePass.h"
#include "luci/Pass/ConvertNCHWToNHWCPass.h"
#include "luci/Pass/CommonSubExpressionEliminationPass.h"
#include "luci/Pass/ExpandBroadcastConstPass.h"
Expand Down Expand Up @@ -260,6 +261,9 @@ void CircleOptimizer::optimize(loco::Graph *g) const
phase.emplace_back(std::make_unique<luci::CircleShapeInferencePass>());
phase.emplace_back(std::make_unique<luci::CircleTypeInferencePass>());

// Run canonicalization
phase.emplace_back(std::make_unique<luci::CanonicalizePass>());

if (_options->query(Options::Algorithm::CommonSubExpressionElimination))
{
phase.emplace_back(std::make_unique<luci::CommonSubExpressionEliminationPass>());
Expand Down

0 comments on commit 64f1b6e

Please sign in to comment.