vllm.models.kimi_k3.nvidia.specialized_decode.cutedsl.common.host
¶
Host-side helpers for the prepared CuTe providers.
Functions:
-
check_residency–Persistent grids whose CTAs wait on one another (not only within a cluster) must
-
fake–Row-major unless
strideis given. -
prepare_shared_carveout–Restore
value(CuTe's launcher drops preferred_smem_carveout) as a driver -
tensor_maps–TMA descriptors (128 B each) in one device tensor.
_checked(result, operation='CUDA driver call')
¶
The values of a cuda-python driver result, raising on a failed status.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/common/host.py
check_residency(compiled, device_index, grid, threads, what)
¶
Persistent grids whose CTAs wait on one another (not only within a cluster) must
all be resident at once: raise when the device cannot hold grid CTAs of
compiled (threads per CTA, its dynamic shared memory) at the same time.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/common/host.py
fake(shape, stride=None, dtype=torch.bfloat16, align=16)
¶
Row-major unless stride is given.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/common/host.py
prepare_shared_carveout(compiled, device_index, value)
¶
Restore value (CuTe's launcher drops preferred_smem_carveout) as a driver
function attribute; call once before capture.
Source code in vllm/models/kimi_k3/nvidia/specialized_decode/cutedsl/common/host.py
tensor_maps(specs, device)
¶
TMA descriptors (128 B each) in one device tensor. Each spec: (pointer, dtype, dims, strides, box, swizzle, l2 promotion).
The bytes are uploaded with a copy on the current stream: the new tensor may reuse a block freed by a kernel still pending on that stream (e.g. a warmup launch's output), which a copy outside the stream would race with.