INNER CODE UNIT · Python
_synchronize
invergent-ai/surogate · surogate/serve/tools/reference/qwen3_5/cli.py:182
def _synchronize(device: torch.device) -> None:
if device.type == "cuda":
torch.cuda.synchronize(device)
def _print_result(
*,
prompt: PromptInput,
generated: Sequence[int],
generated_text: str,
stop_reason: str,
timings: Timings,
sampler: Sampler | None,
model: RefModel | None,
vision_stats: VisionStats | None,
) -> None:
if model is not None and model.weights is not None:
print("MEMORY_PLAN:", model.weights.plan.summary())