triton.language.histogram

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.

Parameters:
  • input (Tensor) – the input tensor

  • num_bins (int) – number of histogram bins

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