Where is the source code of torch.randperm?

hello every

I saw from torch import randperm in torch.utils.data.dataset,but I not find randperm in torch.__init__.py, so where is the sources code of torch.randperm ?




I think this (line 431) is the CPU version and this (line 53) is the GPU version.

I want to know what the order of import the code is. why torch.__init__.py.__all__ don‘t have this function but we can use torch.randperm to call.