I believe that method is both allocating space on the GPU for the tensor in question as well as copying it over to the device. It’s going to take longer than most other operations because it takes longer to copy from system memory to the GPU than to do operations entirely within memory.