I ran your code, and I’m unable to replicate your results (nothing was resampled).
Could you please try some of the following: (it would help debugging)

building from source and testing again
running on CPU and seeing if the problem still persists
running the script below and seeing what happens

import torch
dist = torch.zeros(1000).cuda()
dist[0] = 1
x = torch.multinomial.sample(dist, 1000, True)
sum(x)  # should equal 0