BMPipe: Bubble-memory co-optimization strategy planner for very-large DNN training