Add CudaFromGpu and use it for the grad and R_op of GpuFromCuda