You could call .cuda() or to(), but should specify the right device to push the tensor to.
E.g. if you would like to create some tensors inside the forward method, you could use the device of some buffers/parameters or the incoming tensor to create the new one.
However, if self.grid is treated as an attribute of the model, registering it as a buffer is the cleaner and better approach.