vllm.models.muse_spark.nvidia.specialized_decode.cutedsl.common.host
¶
Host-side helpers for the CuTe providers of the specialized decode.
Functions:
-
assert_not_capturing–Kernels compile at build: raise if one would compile during capture.
-
check_operand–Raise ValueError unless
tensoris a contiguousalign-byte -
check_residency–Grids whose CTAs wait on one another (a Lamport publish-then-poll, not
-
fake–Row-major unless
strideis given. -
fp32–xrounded to FP32 (to nearest even), as a Float32 argument takes -
on_device–launch(*args)with CUDA deviceindexcurrent, as a C++ op's -
pdl_supported–Whether kernels launch with programmatic dependent launch here.
-
rows_view–The dynamic CuTe view of contiguous rows of
width(any row count) -
unread_operand–A contiguous 32 KiB [n]
dtypetensor for an operand that a kernel
_checked(result, operation='CUDA driver call')
¶
The values of a cuda-python driver result, raising on a failed status.
Source code in vllm/models/muse_spark/nvidia/specialized_decode/cutedsl/common/host.py
assert_not_capturing(what)
¶
Kernels compile at build: raise if one would compile during capture.
Source code in vllm/models/muse_spark/nvidia/specialized_decode/cutedsl/common/host.py
check_operand(tensor, shape, dtype, align, name)
¶
Raise ValueError unless tensor is a contiguous align-byte
aligned shape dtype tensor (what a kernel's vector accesses
assume).
Source code in vllm/models/muse_spark/nvidia/specialized_decode/cutedsl/common/host.py
check_residency(compiled, device_index, grid, threads, what)
¶
Grids whose CTAs wait on one another (a Lamport publish-then-poll, 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/muse_spark/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/muse_spark/nvidia/specialized_decode/cutedsl/common/host.py
fp32(x)
¶
x rounded to FP32 (to nearest even), as a Float32 argument takes
it.
on_device(index, launch, *args)
¶
launch(*args) with CUDA device index current, as a C++ op's
device guard runs it: inputs on another GPU than the current one launch
there. For a compiled TVM FFI call that takes no GPU tensor (addresses
only); one that does switches to its first GPU tensor's device itself.
Source code in vllm/models/muse_spark/nvidia/specialized_decode/cutedsl/common/host.py
pdl_supported()
¶
Whether kernels launch with programmatic dependent launch here.
rows_view(tensor, width, alignment=16)
¶
The dynamic CuTe view of contiguous rows of width (any row count)
that the row kernels take, alignment-byte aligned.
Source code in vllm/models/muse_spark/nvidia/specialized_decode/cutedsl/common/host.py
unread_operand(device, dtype)
¶
A contiguous 32 KiB [n] dtype tensor for an operand that a kernel
variant neither reads nor writes (a norm weight it does not apply, a row it
does not store). Every caller on a device gets a view of the same buffer,
allocated once and kept for the process, so the operand costs no memory
per op. The buffer is all ones bits (NaN in FP32 and BF16), so a kernel
that read it would show in its output.