(work: Work)
| 139 | work.output_batch_state = output_batch_state |
| 140 | |
| 141 | def synchronize(work: Work): |
| 142 | # technically, we don't need to sync when tp_rank != 0, |
| 143 | # but omitting it causes sporadic nccl illegal memory access errors |
| 144 | torch.cuda.synchronize() |
| 145 | |
| 146 | work.output_tensors_cpu = work.output_batch_state.outputs.to("cpu") |
| 147 | |
| 148 | def postprocess(work: Work): |
| 149 | if state.tp_rank != 0: |
no test coverage detected