Implementing GPipe2 stuff