text: Title: Failed to export onnx model when I use kornia.geometry.transform.imgwarp.warp_perspective in the model forward function
  Body: ### Discussed in https://github.com/kornia/kornia/discussions/2992
  
  <div type='discussions-op-text'>
  
  <sup>Originally posted by **knavezl** August 23, 2024</sup>
  my export model code is:
  input_img = torch.randn(1 ,4, 3, 864, 1536).cuda() 
  num_cameras = 4
  num_classes = 3
  resolution = [360 ,4 ,360]
  Y, Z, X = resolution
  encoder_name = 'res50'
  model_params = torch.load(pt_path) 
  state_dict = {}
  for key in model_params["state_dict"].keys():
      state_dict_key = key.replace('model.' , '') 
      state_dict[state_dict_key] = model_params["state_dict"][key] 
  model = MVDet(Y, Z, X, encoder_type = encoder_name, num_cameras = num_cameras, num_classes = num_classes)
  model.load_state_dict(state_dict,strict=True)
  model.cuda()  
  torch.onnx.export(model, input_img  , onnx_path, verbose=False,opset_version=13)
  
  The error is：
  File "/home/user/BEV/TrackTacular/WorldTrack/models/mvdet.py", line 172, in forward
  feat_mems_ = warp_perspective(feat_cams_, proj_mats, (self.Y, self.X), align_corners=False)
  File "/home/user/anaconda3/envs/pytorch2.1/lib/python3.9/site-packages/kornia/geometry/transform/imgwarp.py", line 126, in warp_perspective
  grid = transform_points(src_norm_trans_dst_norm[:, None, None], grid)
  File "/home/user/anaconda3/envs/pytorch2.1/lib/python3.9/site-packages/kornia/geometry/linalg.py", line 191, in transform_points
  trans_01 = torch.repeat_interleave(trans_01, repeats=points_1.shape[0] // trans_01.shape[0], dim=0)
  RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument index in method wrapper_CUDA__index_select)
  
  Have you tried to transform the model and encountered the same problem? Do you have any solutions?
  </div>