triton.experimental.gluon.language.histogram

triton.experimental.gluon.language.histogram(input, num_bins, mask=None, layout=None, _semantic=None, _generator=None)

Compute a histogram of a 1D integer tensor.

Parameters:
  • input (tensor) – 1D tensor of integer values.

  • num_bins (int) – Number of bins. Bins have width 1 and start at 0.

  • mask (Optional[tensor]) – Boolean mask to exclude elements when False.

  • layout (DistributedLayout) – Destination layout of the output histogram.

Returns:

1D int32 tensor of length num_bins with the requested layout.

Return type:

tensor