With the new release, you can also do:
a = torch.FloatTensor([1,2])
b = torch.rand(3,2)
b[a]

It gives the same output than the one you obtained with index_select.
However, I have no idea of what is the most efficient way.