triton.language.max_constancy

triton.language.max_constancy(input, values, _semantic=None)

Let the compiler know that the elements of input along dimension d form constant groups of length values[d]. values must have one entry per dimension of input and each entry must be a power of two.

A 1D array of N elements with constancy C is viewed as N/C runs of C identical values. For example, if values is [4], the array [0, 0, 0, 0, 1, 1, 1, 1] satisfies the hint.