What's the time complexity of Tensor.topk?

Thanks for the efforts! If these are indeed the backends used by the topk function, it points to an O(n+k) implementation.

1 Like