Quick question related to this StackOverflow answer: python - How to make a PyTorch Distribution on GPU - Stack Overflow 3
The first question is: is it really needed to call torch.[rand,normal,linspace] with GPU tensor arguments as stated in the question? More directly, are these
torch.normal(0, 1, shape, device="cuda")
torch.linspace(-n, n, shape, device="cuda")

And these:
torch.normal(torch.Tensor(0, device="cuda"), torch.Tensor(0, device="cuda"), shape, device="cuda")
torch.linspace(torch.Tensor(-n, device="cuda"), torch.Tensor(n, device="cuda"), shape, device="cuda")

Any different in terms of the origin of the generated tensors (cpu vs gpu)? Is it dependent on each function?
Thanks,