propagated some changes to gpu version