// BagDuplicationPass creates a copy of such bags in order to eliminate such a pair.
pipeline.append(make_unique<BagDuplicationPass>());
pipeline.append(make_unique<FeatureUnificationPass>());
+ pipeline.append(make_unique<AvgPoolLoweringPass>());
// Apply transforms in the pipeline
for (uint32_t n = 0; n < pipeline.size(); ++n)
// that share the same bag as their underlying bag
assert(!has_inout_bag(code(sess)->module()));
- lower_avgpool(code(sess));
-
// Select Intrinsic(API)
select_intrinsic(code(sess));
#define __REWRITE_H__
#include "Code.h"
+#include "Pass.h"
namespace enco
{
*/
void lower_avgpool(enco::Code *);
+struct AvgPoolLoweringPass final : public Pass
+{
+ PASS_CTOR(AvgPoolLoweringPass)
+ {
+ // DO NOTHING
+ }
+
+ void run(const SessionID &sess) const override { lower_avgpool(code(sess)); }
+};
+
} // namespace enco
#endif // __REWRITE_H__