[XLA] Fix handling of in-place dynamic-update-slice in HloDataflowAnalysis.
The code replaced was trying to determine whether it's safe to do an in-place dynamic-update-slice. It had two bugs. 1. It was assuming that index 1/2 of dynamic-slice/dynamic-update-slice contained all of the slice indices. This used to be true, back when slice indices were an array, but the new scalar-indices form of these instructions can have many index operands. Only checking one operand is busted. 2. It was checking that all uses of the relevant operand were by a dynamic-update-slice op, but it wasn't checking that this user *was in fact the root*. So it was possible to create a fusion with two DUS instructions, one of which was the root, and another of which was not, and confuse this pattern-matcher. PiperOrigin-RevId: 236254299
Loading
Please sign in to comment