Assigning Module to Device

I was wondering if someone could walk me through what happens when
model = model.to('cuda:0') is called.

In particular how do parameters and buffers get moved onto the GPU

[Here[(https://github.com/pytorch/pytorch/blob/ebcacd5e878f3f8e84c941d6b9567c88f50a2f10/torch/nn/modules/module.py#L367) you can find the module.to() implementation, which calls convert recursively on all parameters and buffers.