nonzero() would return you the indices of all non-zero entries (in that case True):
x = torch.bernoulli(torch.ones(3, 3) * 0.5).bool()
print(x)
> tensor([[ True,  True, False],
        [False, False,  True],
        [ True, False, False]])
print(x.nonzero())
> tensor([[0, 0],
        [0, 1],
        [1, 2],
        [2, 0]])