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 module
kernels
Registers core tensor graph ops (range, copy, reshape, and related utilities).
comptime valuesβ
loggerβ
comptime logger = Logger(stdout, prefix=String(""), source_location=False)
Structsβ
- β
BundledAllReduceAddRMSNormQuantFP8: Registers themo.composite.bundled.allreduce_add_rms_norm_quant_fp8graph op with the graph compiler. - β
BundledAllReduceSum: Registers themo.bundled.allreduce.sumgraph op with the graph compiler. - β
CausalConv1DVarlenFwd: Varlen causal 1D convolution forward pass. - β
Copy: Registers thecopygraph op with the graph compiler. - β
EaglePrefillShiftTokens: Registers themo.eagle_prefill_shift_tokensgraph op with the graph compiler. - β
Fold: Registers thefoldgraph op with the graph compiler. - β
GatedDeltaConv1dFwd: Gated DeltaNet causal conv1d forward pass (Pass 1 of two-pass prefill). - β
GatedDeltaRecurrenceFwd: Gated DeltaNet recurrence forward pass (Pass 2 of two-pass prefill). - β
GatedGroupRMSNorm: Fused silu-gate + group RMSNorm + weight-scale for the Mamba-2 mixer. - β
InplaceMemcpy: Copies the contents ofsrcintodstin place. - β
IRFFT: Registers theirfftgraph op with the graph compiler. - β
LaunchHostFunc: Enqueues a pre-packed host callback on the device's default stream. - β
Learnable2DInterpPosEmb: Registers thelearnable_2d_interp_pos_embgraph op with the graph compiler. - β
Mamba2SSDChunkScanVarlenFwd: Varlen Mamba-2 SSD chunked-scan prefill forward. - β
Mamba2SSDChunkScanVarlenFwdInplace: Varlen Mamba-2 SSD chunked-scan: in-place SSM-pool write-back. - β
MaxPool: Registers themo.max_poolgraph op with the graph compiler. - β
MaxPoolCeilModeTrue: Registers themo.max_pool_ceil_mode_truegraph op with the graph compiler. - β
NanCheckCountOp: Counts NaN/Inf values in a floating-point tensor. - β
NanCheckRaiseOp: Raises an error if NaN or Inf counts are non-zero. - β
NonMaximumSuppression: Registers themo.non_maximum_suppressiongraph op with the graph compiler. - β
PackConvTransposeFilterShape: Registers thepack_conv_transpose_filter_shapegraph op with the graph compiler. - β
RandomNormal: Registers themo.random.normalgraph op with the graph compiler. - β
RandomUniform: Registers themo.random.uniformgraph op with the graph compiler. - β
Range: Registers themo.rangegraph op with the graph compiler. - β
RepeatInterleave: Registers therepeat_interleavegraph op with the graph compiler. - β
ROIAlign: Registers themo.roi_aligngraph op with the graph compiler. - β
Sleep: Registers themo.sleepgraph op with the graph compiler. - β
SpatialMerge: Registers themo.spatial_mergegraph op with the graph compiler. - β
Struct_fused_token_sampling: Registers thesampler.fused_token_samplinggraph op with the graph compiler. - β
Struct_min_p_sampling: Registers themin_p_samplinggraph op with the graph compiler. - β
Struct_moe_create_indices: Registers themo.moe.create.indicesgraph op with the graph compiler. - β
Struct_moe_create_indices_with_scales_offset: Registers themo.moe.create.indices.with.scales.offsetgraph op with the graph compiler. - β
Struct_moe_eplb_remap: Registers themo.moe.eplb.remapgraph op with the graph compiler. - β
Struct_moe_router_group_limited: Registers themo.moe.router.group.limitedgraph op with the graph compiler. - β
Struct_moe_single_group_router: Registers themo.moe.single.group.routergraph op with the graph compiler. - β
Struct_moe_single_group_router_eplb: Registers themo.moe.single.group.router.eplbgraph op with the graph compiler. - β
Struct_rope_ragged_paged: Registers themo.rope.raggedgraph op with the graph compiler. - β
Struct_rope_ragged_paged_with_position_id: Registers themo.rope.ragged.with_position_idgraph op with the graph compiler. - β
Struct_rope_split_store_ragged_paged: Registers themo.rope_split_store.ragged.pagedgraph op with the graph compiler. - β
Struct_rope_split_store_ragged_paged_with_position_id: Registers themo.rope_split_store.ragged.paged.with_position_idgraph op with the graph compiler. - β
Struct_sampler_apply_penalties: Registers thesampler.apply_penaltiesgraph op with the graph compiler. - β
Struct_sampler_update_frequency_data: Registers thesampler.update_frequency_datagraph op with the graph compiler. - β
TPoolPatchMerger: Registers thetpool_patch_mergergraph op with the graph compiler. - β
WaitHostValue: Stalls the stream until a host-visible flag reaches a given value. - β
WaitHostValueWithDep: Variant ofmo.wait_host_valuethat takes a fake mutable dependency operand.
Functionsβ
- β
causal_conv1d_varlen_fwd_shape: Computes the output shape for thecausal_conv1d_varlen_fwdgraph op. - β
concat_from_list_shape_impl: Computes the concatenated output shape for a variadic list of input tensors. - β
concat_shape_impl: Computes the concatenated output shape from the input tensor shapes. - β
export: Keeps the managed-tensor-slice load/store entry points alive for export when this package is linked. - β
fold_kernel_shape: Computes the output shape for thefoldgraph op. - β
gated_delta_conv1d_fwd_shape: Computes the output shape for thegated_delta_conv1d_fwdgraph op. - β
gated_delta_recurrence_fwd_shape: Computes the output shape for thegated_delta_recurrence_fwdgraph op. - β
gated_group_rmsnorm_shape: - β
generic_fused_qk_rope_bshd_paged_ragged_kernel_api: Applies fused rotary position embedding to Q and K, updating keys in the paged KV cache. - β
generic_fused_qkv_matmul_kv_cache_bshd_paged_kernel_api: Implements the fused QKV matmul for BSHD inputs, writing the K and V projections directly into a paged KV cache. - β
generic_fused_qkv_matmul_kv_cache_paged_ragged_kernel_api: Implements the fused QKV matmul for ragged inputs, writing the K and V projections directly into a paged KV cache. - β
generic_fused_qkv_matmul_kv_cache_paged_ragged_kernel_api_bias: Implements the fused QKV matmul with bias for ragged inputs, writing the K and V projections directly into a paged KV cache. - β
layout_transform_conv_filter_common: Packs a convolution filter into the layout expected by the conv kernels. - β
layout_transform_conv_transpose_filter_common: Packs a transposed-convolution filter into the layout expected by the conv_transpose kernels. - β
mamba2_ssd_chunk_scan_varlen_fwd_inplace_shape: Computes the output shape for themamba2_ssd_chunk_scan_varlen_fwd_inplacegraph op. - β
mamba2_ssd_chunk_scan_varlen_fwd_shape: Computes the output shape for themamba2_ssd_chunk_scan_varlen_fwdgraph op. - β
max_pool_ceil_mode_true_shape: Computes the output shape for themo.max_pool_ceil_mode_truegraph op. - β
max_pool_shape: Computes the output shape for themo.max_poolgraph op. - β
non_maximum_suppression_shape: Computes the output shape for themo.non_maximum_suppressiongraph op. - β
pack_conv_transpose_filter_shape_shape: Computes the output shape for thepack_conv_transpose_filter_shapegraph op. - β
print_kv_cache_paged_generic_kernel_api: Prints the contents of a paged KV cache for debugging. - β
random_normal_shape: Computes the output shape for themo.random.normalgraph op. - β
random_uniform_shape: Computes the output shape for themo.random.uniformgraph op. - β
range_shape: Computes the output shape for themo.rangegraph op. - β
reduce_shape: Compute the output shape of areduceoperation, and assert the inputs are compatible. - β
repeat_interleave_kernel_shape: Computes the output shape for therepeat_interleavegraph op. - β
roi_align_shape: Computes the output shape for themo.roi_aligngraph op. - β
tpool_patch_merger_shape: Computes the output shape for thetpool_patch_mergergraph op.