adding a forward_gpu method