Reintroduce gpu optimization