Uniform random numbers on GPU

Considering that random is not implemented yet for GPU :open_mouth:, my question is: how to create uniformly distributed tensor on GPU?

For many purposes, the cuda.FloatTensor’s uniform_ method will do:

torch.cuda.FloatTensor(10).uniform_()

works.

Best regards

Thomas

1 Like