This commit introduces FeatureUnificationPass which wraps unify_feature
optimization function, and uses it instead of unify_feature.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
//
// BagDuplicationPass creates a copy of such bags in order to eliminate such a pair.
pipeline.append(make_unique<BagDuplicationPass>());
+ pipeline.append(make_unique<FeatureUnificationPass>());
// 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()));
- unify_feature(code(sess));
-
lower_avgpool(code(sess));
// Select Intrinsic(API)
#define __ENCO_TRANSFORM_FEATURE_UNIFICATION_H__
#include "Code.h"
+#include "Pass.h"
namespace enco
{
*/
void unify_feature(enco::Code *code);
+struct FeatureUnificationPass final : public Pass
+{
+ PASS_CTOR(FeatureUnificationPass)
+ {
+ // DO NOTHING
+ }
+ void run(const SessionID &sess) const override { unify_feature(code(sess)); }
+};
+
} // namespace enco
#endif // __ENCO_TRANSFORM_FEATURE_UNIFICATION_H__