Solved by ptrblck in post #2 
              
              
                You could unsqueeze v compare the tensors directly (v will be broadcasted) and then check the columns for any match: 
print((M == v.unsqueeze(1)).any(1))
> tensor([ True,  True, False, False])