For the record, this is what I found:
  std::vector<float> xv;
  size_t x_size = x.numel();
  auto p = static_cast<float*>(x.storage().data());
  for(size_t i=0; i<x_size; i++)
  {
    xv.push_back(p[i]);
  }

I am not happy with it. There is maybe a more succinct way?