     int info;
     cuda::copy_to_host(&info, dev_info, 1);
     assert(info == 0);
+
+    cuda::copy_to_device(dev_q, identity.data(), matrix.size());
 
     const dim3 blocks(2, 2);
     const dim3 threads(2, 2);

  std::cout << "Input matrix:\n";
  print_matrix(matrix, n);

  // Create handles.
  cusolverDnHandle_t solver_handle = nullptr;
  auto solver_status = cusolverDnCreate(&solver_handle);


  if (idx >= n * n) return;

  for (auto k = 0; k < n; ++k) {
    auto inner_product = 0.0f;

