Skip to content

Commit

Permalink
[XLA:GPU] Add while-loop-simplifier before while loop double buffering.
Browse files Browse the repository at this point in the history
It's not needed for anything in particular, but it's a nice property to work on the simplified IR in subsequent passes.

PiperOrigin-RevId: 678613784
  • Loading branch information
golechwierowicz authored and Google-ML-Automation committed Sep 25, 2024
1 parent 41c58a5 commit ccdb368
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xla/service/gpu/gpu_compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ absl::Status RunPostFusionPasses(
unroll_strategy = DoubleBufferLoopUnrolling::UnrollStrategy::kAuto;
}
if (unroll_strategy != std::nullopt) {
pipeline.AddPass<WhileLoopSimplifier>();
pipeline.AddPass<DoubleBufferLoopUnrolling>(*unroll_strategy);
pipeline.AddPass<TupleSimplifier>();
pipeline.AddPass<HloDCE>();
Expand Down

0 comments on commit ccdb368

Please sign in to comment.