Great. It is hard for the to think, since I am biased with CPU processing a lot…
This means when we torch.zeros(100, device="gpu") tensor will be created directly in GPU, maybe the CPU will only have the instruction to create that (CUDA instruction).
And in the second case we will create the tensor on CPU first and copy that tensor to GPU (“to” api). Right?