triton.language.histogram(input, num_bins)

computes an histogram based on input tensor with num_bins bins, the bins have a width of 1 and start at 0.

  • input – the input tensor

  • num_bins – number of histogram bins

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