For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
Struct_ep_dispatch_async_block_scaled_nv
struct Struct_ep_dispatch_async_block_scaled_nv
Registers the ep.dispatch_async.block.scaled.nv graph op with the graph compiler.
Implemented traits
Methods
execute
static def execute[dispatch_dtype: DType, dispatch_scale_dtype: DType, hidden_size: Int, top_k: Int, n_experts: Int, max_token_per_rank: Int, n_gpus_per_node: Int, n_nodes: Int, //](atomic_counters: T, input_tokens: T, topk_ids: T, send_ptrs: T, recv_ptrs: T, recv_count_ptrs: T, input_scales: T, context: DeviceContext)
Execute the Expert Parallelism async dispatch kernel. Tokens are transferred in NVFP4 format.
Parameters:
- dispatch_dtype (
DType):DTypeused for the quantized token payload during dispatch (inferred). - dispatch_scale_dtype (
DType):DTypeof the block scales accompanying the dispatched tokens (inferred). - hidden_size (
Int): Size of the model's hidden dimension (inferred). - top_k (
Int): Number of experts each token is routed to (inferred). - n_experts (
Int): Total number of experts across all GPUs (inferred). - max_token_per_rank (
Int): Maximum number of tokens per GPU (inferred). - n_gpus_per_node (
Int): Number of GPUs per node (inferred). - n_nodes (
Int): Number of physical nodes (inferred).
Args:
- atomic_counters (
T): Atomic counters coordinating work across thread blocks during the dispatch phase. - input_tokens (
T): Input tokens to dispatch to experts. Shape[num_tokens, hidden_size]. - topk_ids (
T): Top-k expert IDs per token. Shape[num_tokens, top_k]. - send_ptrs (
T): Send buffer pointers for the dispatch phase. - recv_ptrs (
T): Receive buffer pointers for the dispatch phase. - recv_count_ptrs (
T): Receive count buffer pointers tracking tokens received per expert. - input_scales (
T): Global input scales for NVFP4 quantization. - context (
DeviceContext): GPU device context for the current device.