torch.foreach.max#
- torch.foreach.max(inputs: TensorList, /) tuple[Tensor, ...][source]#
Returns the maximum value of each tensor in
inputs.This is semantically equivalent to applying
torch.max()independently at every list position. Does not mutate its arguments and returns a tuple of result tensors.Tensor-list arguments must be non-empty. An accelerated multi-tensor implementation is used only when supported by the inputs; otherwise the operation falls back to per-tensor execution.
This operation reduces every input tensor over all dimensions. It does not accept a dimension or return indices.