triton.language.all

triton.language.all(input, axis=None, keep_dims=False)

Returns whether all elements in input are nonzero along the provided axis.

The result has dtype int1. NaN and infinity are treated as nonzero.

Parameters:
  • input (Tensor) – the input values

  • axis (int | None) – the dimension to reduce. If None, reduce all dimensions

  • keep_dims (bool) – if true, keep the reduced dimensions with length 1

This function can also be called as a member function on tensor, as x.all(...) instead of all(x, ...).