flashinfer.cake_lm_head_nondet_train.cake_lm_head_nondet_train_preload

flashinfer.cake_lm_head_nondet_train.cake_lm_head_nondet_train_preload(device: device | str | int | None = None, *, temperature: bool = False)

Do part of the one-time work of a process’s first chunked LM-head call ahead of it, then wait for the device once (SM100 / SM103 / SM107 only).

See flashinfer.cake_lm_head_det_train.cake_lm_head_det_train_preload() for the work; here it is done for this backend, whose libraries and per-device state the other entries use. The per-thread state (side streams, events, count cells) is the calling thread’s: another thread forms its own at its first call. temperature=True also loads the backend’s temperature libraries and launches its temperature path’s PyTorch operators once.