 
   cudaMemcpy(d_in1, in1.data(), in1_bytes, cudaMemcpyHostToDevice);
 
-  cudaStream_t stream;
-  assert(cudaStreamCreate(&stream) == cudaSuccess);
+  Eigen::CudaStreamDevice stream;
   Eigen::GpuDevice gpu_device(&stream);
 
   Eigen::TensorMap<Eigen::Tensor<float, 4> > gpu_in1(d_in1, 72,53,97,113);

  CALL_SUBTEST(test_cuda_erfc<float>(5.0f)); // CUDA erfc lacks precision for large inputs
  CALL_SUBTEST(test_cuda_erfc<float>(0.01f));
  CALL_SUBTEST(test_cuda_erfc<float>(0.001f));
  CALL_SUBTEST(test_cuda_tanh<double>(1.0));
  CALL_SUBTEST(test_cuda_tanh<double>(100.0));
  CALL_SUBTEST(test_cuda_tanh<double>(0.01));
  CALL_SUBTEST(test_cuda_tanh<double>(0.001));
  CALL_SUBTEST(test_cuda_lgamma<double>(1.0));
  CALL_SUBTEST(test_cuda_lgamma<double>(100.0));
  CALL_SUBTEST(test_cuda_lgamma<double>(0.01));

  cudaMemcpy(d_input, input.data(), input_bytes, cudaMemcpyHostToDevice);
  cudaMemcpy(d_kernel, kernel.data(), kernel_bytes, cudaMemcpyHostToDevice);

  Eigen::CudaStreamDevice stream;    
  Eigen::GpuDevice gpu_device(&stream);

  Eigen::TensorMap<Eigen::Tensor<float, 5, DataLayout> > gpu_input(d_input,74,37,11,137,17);
