Hi,
argssort is implemented by doing sort(same_args)[1]  You can see that implementation here: pytorch/LegacyDefinitions.cpp at 22a34bcf4e5eaa348f0117c414c3dd760ec64b13 · pytorch/pytorch · GitHub 1
And for sort, you can see here that it comes from the old THC library: pytorch/native_functions.yaml at master · pytorch/pytorch · GitHub 1
And you can find the THC implementation in a couple files there: pytorch/THCTensorSort.cu at 070a30b265c1f4f404081ffefa7c41383750cc2e · pytorch/pytorch · GitHub 1