Solved by ZhengdiYu in post #7 
              
              
                Yes, I think the code below could solve the problem: 
((pointset1[:, None, :] == pointset2[None, ...]).all(dim=2)).nonzero() 
this would return a tensor with shape of [ [index1_in_set1, index1_in_set2], [], [], …, []] 
where each [index_in_set1 and index_in_set2] stands for a correspondence. And the…