First pass at backward GPU implementation