import torch

tensor = torch.rand(100, 100).cuda()

Create tensor

on CPU

Transfer

to GPU