What does model.to(torch.Tensor) do?

I read in PyTorch docs that .to(*args, **kwargs) can also take Pytorch tensors as inputs.
https://pytorch.org/docs/stable/nn.html#torch.nn.Module.to

tensor = torch.tensor([[1, 2, 3], [4, 5, 6]], device='cuda:0', dtype=torch.float)
class MyModel(nn.Module):
   ...
model = MyModel()

model.to(tensor)

I just would like to know what does this do?
Does this just moves the model to the device the tensor is on and set dtype to that of tensor

It does what the docs says:

Tensor whose dtype and device are the desired dtype and device for all parameters and buffers in this module

It allocates model in the given tensor’s device

so, it is the same as:

model.to(torch.device('cuda:0'))
model.float()

Thanks @JuanFMontesinos

In that context it’s equivalent to
model.to(tensor.device())