triton.experimental.gluon.language.any

triton.experimental.gluon.language.any(input, axis=None, keep_dims=False)

Returns whether any element in input is 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.any(...) instead of any(x, ...).