If you do not want to convert m to a tensor you can use
def fn(): 
    t = torch.randn(10000) 
    m = np.random.rand(10000) < 0.5 
    return (t==t[m].max()).type(torch.FloatTensor).argmax()  

timeit.timeit(fn, number = 10000)                                                                                                                                                    
   3.285314051026944


while if you convert m to tensor (using K. Franks code : )
In [43]: def gn(): 
    ...:     t = torch.randn(10000) 
    ...:     m = torch.from_numpy(np.random.rand(10000) < 0.5) 
    ...:     large = torch.finfo(t.dtype).max 
    ...:     return (t - large * (~m) - large * (~m)).argmax() 

timeit.timeit(gn, number = 10000)                                                                                                                                                    
    2.864162279991433


Note - benchmarking done on cpu