If you are using nn.Modules you’ll be able to call .to('cuda') on the module(s) directly, which will then automatically move all registered parameters and buffers recursively for all submodules to the GPU.
However, this is not strictly necessary and you could also move the parameters (trainable tensors) as well as the input data manually to the GPU.