Solved by albanD in post #2 
              
              
                Hi, 
argssort is implemented by doing sort(same_args)[1]  You can see that implementation here: pytorch/LegacyDefinitions.cpp at 22a34bcf4e5eaa348f0117c414c3dd760ec64b13 · pytorch/pytorch · GitHub 
And for sort, you can see here that it comes from the old THC library: pytorch/native_functions.yaml a…