  
          // TODO: don't make copies!
          memcpy(yuv_ion.addr, buf->addr, buf_info.buf_len);
  
          ModelDataRaw model_buf =
              model_eval_frame(&model, q, yuv_ion.buf_cl, buf_info.width, buf_info.height,
                               model_transform, NULL, vec_desire);
          mt2 = millis_since_boot();
          float model_execution_time = (mt2 - mt1) / 1000.0;
 
</s> remove   cl_device_id device_id = cl_get_device_id(device_type);
 </s> add   cl_device_id device_id = cl_get_device_id(CL_DEVICE_TYPE_DEFAULT); </s> remove #if defined(QCOM) || defined(QCOM2)
  cl_device_type device_type = CL_DEVICE_TYPE_DEFAULT;
#else
  cl_device_type device_type = CL_DEVICE_TYPE_CPU;
#endif

 </s> add  </s> remove   pm = messaging.PubMaster(['frame', 'liveCalibration'])
 </s> add   pm = messaging.PubMaster(['frame', 'liveCalibration', 'pathPlan']) </s> remove     ref_commit = open("model_replay_ref_commit").read().strip()
 </s> add     ref_commit = open(ref_commit_fn).read().strip()
        visionbuf_sync(&yuv_ion, VISIONBUF_SYNC_TO_DEVICE);
  
          // TODO: don't make copies!
          memcpy(yuv_ion.addr, buf->addr, buf_info.buf_len);
        visionbuf_sync(&yuv_ion, VISIONBUF_SYNC_TO_DEVICE);
  
          ModelDataRaw model_buf =
              model_eval_frame(&model, q, yuv_ion.buf_cl, buf_info.width, buf_info.height,
                               model_transform, NULL, vec_desire);
          mt2 = millis_since_boot();
          float model_execution_time = (mt2 - mt1) / 1000.0;
keep keep add keep keep keep keep keep keep
 Added model_replay and fixed some bugs in camera_replay (#2679)

* Added model_replay and fixed some bugs in camera_replay

* Unpack capnp logs on device

* add sync to device

* GPU now also works on PC

* update model ref

* update refs

* dont change this one

* Use pipeline calib instead of rlog calib

* remove that

* update refs

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/modeld/modeld.cc