33{
35
36
37 if (moco::tf::get<moco::tf::Knob::ResolveFusedBatchNorm>())
38 {
39 phase.emplace_back(std::make_unique<moco::ResolveFusedBatchNorm>());
40 }
41 if (moco::tf::get<moco::tf::Knob::FuseBinaryIntoPreceding>())
42 {
43 phase.emplace_back(std::make_unique<moco::FuseBinaryIntoPreceding>());
44 }
45 if (moco::tf::get<moco::tf::Knob::ResolveConstantShape>())
46 {
47 phase.emplace_back(std::make_unique<moco::ResolveConstantShape>());
48 }
49 if (moco::tf::get<moco::tf::Knob::ResolveReshapeWildcardDim>())
50 {
51 phase.emplace_back(std::make_unique<moco::ResolveReshapeWildcardDim>());
52 }
53 if (moco::tf::get<moco::tf::Knob::ResolveSquaredDifference>())
54 {
55 phase.emplace_back(std::make_unique<moco::ResolveSquaredDifference>());
56 }
57 if (moco::tf::get<moco::tf::Knob::RemoveTFIdentityNode>())
58 {
59 phase.emplace_back(std::make_unique<moco::RemoveTFIdentityNode>());
60 }
61 if (moco::tf::get<moco::tf::Knob::RemoveDeadNode>())
62 {
63 phase.emplace_back(std::make_unique<logo::RemoveDeadNodePass>());
64 }
65 if (moco::tf::get<moco::tf::Knob::SqueezeReduceNode>())
66 {
67 phase.emplace_back(std::make_unique<moco::SqueezeReduceNode>());
68 }
69
70 phase.emplace_back(std::make_unique<moco::tf::ShapeInferencePass>());
71 phase.emplace_back(std::make_unique<moco::tf::TypeInferencePass>());
72
73
76 phase_runner.attach(&prog);
77 phase_runner.run(phase);
78}
std::vector< std::unique_ptr< Pass > > Phase