Add an HLO Pass to make Sort stable.
Also add a new is_stable boolean to the Sort HLO. The pass either adds a Iota operand to the sort op or reuses such an operand if there is one that can be used. Then the comparison computation is modified to add a tie breaker in case the comparison determines that the relevant values used in the comparison computation are equal. PiperOrigin-RevId: 233911034
Loading
Please sign in to comment