From 3ff06442cac6898cd23de126d774a7d7c085e64b Mon Sep 17 00:00:00 2001 From: Bart Chrzaszcz Date: Fri, 10 Jan 2025 03:06:37 -0800 Subject: [PATCH] Fix typo regarding `ImportConstantsPass` comment. The pass is still operating on `mhlo` constants not `stablehlo` constants. This is because we need to call `mhlo::createFlattenTuplePass` after which is a greedy pattern with folding. PiperOrigin-RevId: 713982378 --- .../spmd/shardy/round_trip_common/pipeline_passes.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xla/service/spmd/shardy/round_trip_common/pipeline_passes.cc b/xla/service/spmd/shardy/round_trip_common/pipeline_passes.cc index 1438d40cf61fc8..e8970270353550 100644 --- a/xla/service/spmd/shardy/round_trip_common/pipeline_passes.cc +++ b/xla/service/spmd/shardy/round_trip_common/pipeline_passes.cc @@ -38,11 +38,11 @@ void addCommonPreImportPasses(mlir::OpPassManager& pm) { // changes happen before shardings are added to operations, to ensure the // correct shardings are added and that they are not lost by this pass. pm.addNestedPass(mlir::mhlo::createPrepareForExportPass()); - // We import `stablehlo.constant` ops to `sdy.constant` ops so that constants + // We import `mhlo.constant` ops to `sdy.constant` ops so that constants // aren't folded in greedy pattern rewriters, which would lift them outside of // nested regions (this undoes `WhileLoopConstantSinking` HLO pass). - // Therefore, this pass needs to be applied after any stablehlo pass that - // expects `stablehlo.constant`, and before any pass that has a greedy pattern + // Therefore, this pass needs to be applied after any MHLO pass that + // expects `mhlo.constant`, and before any pass that has a greedy pattern // rewriter. pm.addNestedPass(createImportConstantsPass()); pm.addNestedPass(mlir::mhlo::createFlattenTuplePass());