#include "Transforms/Duplicate.h"
#include "Transforms/FeatureUnification.h"
#include "Transforms/Rewrite.h"
-#include "Transforms/Normalize.h"
+#include "Transforms/DataLayoutConversion.h"
#include "Transforms/IndirectCopyElimination.h"
#include "Transforms/IdenticalObjectReduction.h"
#include "Transforms/DuplicatedObjectReduction.h"
avgpool_rewrite.runOnCode(code(sess));
// Insert data ordering if necessary
- NormalizePass normalize;
- normalize.runOnCode(code(sess));
+ convert_data_layout(code(sess));
eliminate_indirect_copy(code(sess));
reduce_identical_object(code(sess));
* limitations under the License.
*/
-#include "Normalize.h"
+#include "DataLayoutConversion.h"
#include <coco/IR/FeatureLayouts.h>
} // namespace
-namespace enco
+namespace
{
+class NormalizePass
+{
+private:
+ void runOnModule(coco::Module *m) const;
+
+public:
+ void runOnCode(enco::Code *) const;
+};
void NormalizePass::runOnModule(coco::Module *m) const
{
void NormalizePass::runOnCode(enco::Code *code) const { runOnModule(code->module()); }
+} // namespace
+
+namespace enco
+{
+
+void convert_data_layout(enco::Code *code)
+{
+ NormalizePass pass;
+ pass.runOnCode(code);
+}
+
} // namespace enco
* limitations under the License.
*/
-#ifndef __NORMALIZE_H__
-#define __NORMALIZE_H__
+#ifndef __ENCO_TRANSFORM_DATA_LAYOUT_CONVERSION_H__
+#define __ENCO_TRANSFORM_DATA_LAYOUT_CONVERSION_H__
#include "Code.h"
/**
* @brief Insert data reordering if necessary
*/
-class NormalizePass
-{
-private:
- void runOnModule(coco::Module *m) const;
-
-public:
- void runOnCode(enco::Code *) const;
-};
+void convert_data_layout(enco::Code *code);
} // namespace enco
-#endif // __NORMALIZE_H__
+#endif // __ENCO_TRANSFORM_DATA_LAYOUT_CONVERSION_H__