remove cuda.to_device for scalars