A formalism for coscheduling data and pipeline parallelism