Skip to content

Commit 8e6c383

Browse files
ekayaaslancopybara-github
authored andcommitted
Push shardy outliner up past ConstantOrScalarMerger pass.
ConstantOrScalarMerger combines constants and constant-likes that are sharded the same way. It is not critical for final performance but it is important to keep the graph smaller. Hence, unlike ConstantOrScalarSplitter, it does not take NamedComputations/Funcs/Calls as parts of constant expressions. PiperOrigin-RevId: 905027384
1 parent 28c208c commit 8e6c383

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shardy/dialect/sdy/transforms/export/export_pipeline.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ void runShardyPartitioner(OpPassManager& pm, int& dumpIndex,
7070

7171
void addExportPipeline(OpPassManager& pm, int& dumpIndex,
7272
const ExportOptions& options) {
73-
pm.addNestedPass<func::FuncOp>(createConstantOrScalarMergerPass());
7473
pm.addPass(createExportNamedComputationsPass());
74+
pm.addNestedPass<func::FuncOp>(createConstantOrScalarMergerPass());
7575
if (!options.avoidExportForPartitioning) {
7676
pm.addPass(createRemoveShardingGroupsPass());
7777
pm.addNestedPass<func::FuncOp>(createShardingConstraintToReshardPass());

0 commit comments

Comments
 (0)