Improve comment for Sort with more than one operand.

PiperOrigin-RevId: 234967461
This commit is contained in:
Adrian Kuegel 2019-02-21 03:53:28 -08:00 committed by TensorFlower Gardener
parent 86c8647f11
commit 641d3f1ed1

View File

@ -1719,9 +1719,11 @@ XlaOp Sort(const XlaOp& keys, absl::Span<const XlaOp> values = {},
// * All operands must be tensors with the same dimensions. The element types of
// the tensors may be different.
// * The result is a tuple that consists of the operands in sorted order (along
// the provided dimension, as above). When comparing, 'comparator' is called
// with 2 * n scalar parameters, where parameter 2 * i and 2 * i + 1
// correspond to the value of operand i at two index positions.
// the provided dimension, as above). The same permutation as implied by the
// comparison computation is applied to all operand tensors. When comparing
// two index positions, 'comparator' is called with 2 * n scalar parameters,
// where parameter 2 * i and 2 * i + 1 correspond to the value of operand i at
// two index positions.
// Default comparator computations can be found in lib/comparators.h
XlaOp Sort(absl::Span<const XlaOp> operands, const XlaComputation& comparator,
int64 dimension = -1, bool is_stable = false);