[XLA] Fix invalid assumption in HloComputation::CloneWithReplacements.
CloneWithReplacements assumed that the `extras` instructions came before all other instructions in the postorder traversal. This is not true in general. In the course of fixing this, I ended up removing the `extras` parameter entirely, which makes the function easier to call. I also augmented the interface a bit to make CloneWithReplacements easier to call when you just have one or two replacements to make. I will use these overloads in a future patch. PiperOrigin-RevId: 220390779
Loading
Please sign in to comment