MCPcopy Create free account
hub / github.com/ScalingIntelligence/tokasaurus / synchronize

Function synchronize

tokasaurus/model/basic_worker.py:141–146  ·  view source on GitHub ↗
(work: Work)

Source from the content-addressed store, hash-verified

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:

Callers 1

run_overlapped_loopFunction · 0.70

Calls 1

toMethod · 0.45

Tested by

no test coverage detected