Hi,
I was wondering the same problem today, and I’ve found a tricky workaround (for sure not elegant).
Here’s the example code:
a = torch.rand(2,2)
a = torch.vstack([a, a[0]])
uni, rev_idxs = a.unique(dim=0, return_inverse=True)
first_occ_idxs = rev_idxs.unique()
print(a[first_occ_idxs])

If anyone can suggest a more elegant solution, I would adopt it.