Usually you would like to normalize the probabilities (log probabilities) in the feature dimension (dim1) and treat the samples in the batch independently (dim0).
If you apply F.softmax(logits, dim=1), the probabilities for each sample will sum to 1:
# 4 samples, 2 output classes
logits = torch.randn(4, 2)
print(F.softmax(logits, dim=1))
> tensor([[0.7869, 0.2131],
        [0.4869, 0.5131],
        [0.2928, 0.7072],
        [0.2506, 0.7494]])