IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo struct

Struct_mla_prefill_graph_decode_paged_fp8_sparse

struct Struct_mla_prefill_graph_decode_paged_fp8_sparse

Registers the mo.mla.graph.prefill.decode.paged.fp8.sparse graph op with the graph compiler.

Implemented traitsโ€‹

AnyType, ImplicitlyDeletable

Methodsโ€‹

executeโ€‹

static def execute[dtype: DType, freq_dtype: DType, gamma_dtype: DType, fp8_dtype: DType, fp8_scale_dtype: DType, cache_dtype: DType, //, m_scale_granularity: Int, n_scale_granularity: Int, k_scale_granularity: Int, mask_str: StringSlice[ImmStaticOrigin], target: StringSlice[ImmStaticOrigin], indices_stride: Int, index_share: Bool = False](output: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=output.static_spec], q: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=q.static_spec], kv: ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=kv.static_spec], input_row_offsets: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input_row_offsets.static_spec], freqs_cis: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=freqs_cis.static_spec], kv_norm_gamma: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=kv_norm_gamma.static_spec], buffer_row_offsets_1d: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=buffer_row_offsets_1d.static_spec], cache_offsets_1d: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cache_offsets_1d.static_spec], buffer_length: Int32, w_k: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=w_k.static_spec], w_uk: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=w_uk.static_spec], w_uv: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=w_uv.static_spec], kv_blocks: ManagedTensorSlice[IOSpec[_, _].MutableInput, static_spec=kv_blocks.static_spec], cache_lengths: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cache_lengths.static_spec], kv_lookup_table: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=kv_lookup_table.static_spec], max_prompt_length: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=max_prompt_length.static_spec], max_cache_length: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=max_cache_length.static_spec], layer_idx: UInt32, scale: Float32, epsilon: Float32, w_k_scale: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=w_k_scale.static_spec], w_uk_scale: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=w_uk_scale.static_spec], w_uv_scale: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=w_uv_scale.static_spec], scalar_args: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=scalar_args.static_spec], sparse_indices: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=sparse_indices.static_spec], topk_lengths: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=topk_lengths.static_spec], attn_sink: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=attn_sink.static_spec], num_partitions_scalar: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=num_partitions_scalar.static_spec], context: DeviceContext)

Was this page helpful?