   Tensor<float, 1> full_prec(num_elem);
   gpu_device.memcpyDeviceToHost(half_prec.data(), d_res_half, num_elem*sizeof(float));
   gpu_device.memcpyDeviceToHost(full_prec.data(), d_res_float, num_elem*sizeof(float));
+  gpu_device.synchronize();
 
   for (int i = 0; i < num_elem; ++i) {
+    std::cout << "Checking elemwise " << i << std::endl;
     VERIFY_IS_APPROX(full_prec(i), half_prec(i));
   }
 

  gpu_device.deallocate(d_res_half);
  gpu_device.deallocate(d_res_float);
}
/*
void test_cuda_contractions() {
  Eigen::CudaStreamDevice stream;
  Eigen::GpuDevice gpu_device(&stream);
  int rows = 101;
  int cols = 101;
  int num_elem = rows*cols;

  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));

void test_cuda_reductions() {
  Eigen::CudaStreamDevice stream;
  Eigen::GpuDevice gpu_device(&stream);
  int size = 13;
  int num_elem = size*size;

  float* d_float1 = (float*)gpu_device.allocate(num_elem * sizeof(float));
