Use stream inside CUDA reduce implementation.

Fixes issue 498