triton
triton copied to clipboard
histogram allows the creation of non-power-of-two tensor sizes
The histogram function takes a parameter for the number of bins it should collect results in, then returns a tensor of that size. Unfortunately it has no checks on what this parameter is, so you can pass in a number that is not a power of two and get a broken tensor back. I say broken because Triton actively tries to obviate these existing in the first place, and you cannot actually operate on these tensors–every other operation will reject it for size mismatch, including the functions that would allow for changing its shape. So it doesn't really make sense to allow the creation of these at all.