Yes, you will need to setup your cloud machine with cuda support if you have gpus there.
The change to the code to support GPU is minimal as it’s just a few .cuda() calls, also you can use torch.cuda.is_available() to check if it is available on the current machine.