hi dear XLA folks,
I'm trying to understand some GPU optimzation passes. And this piece of code is a myth to me.
fusion.AddPass<GpuInstructionFusion>(/*may_duplicate=*/false);
fusion.AddPass<GpuInstructionFusion>(/*may_duplicate=*/true);
I kinda understand what the `may_duplicate` parameter does and how it affect the fusion pass.
What I can't get is the calling sequence.
Why is GpuInstructionFusion called twice with may_duplicate=false first and then may_duplicate=true.
what is the design philosophy behind this? This code is like almost 5 years old from the initial commit.
I can't extract much information from the git commit log.
Your help is much appreciated.
Thanks a lot.
Kevin