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 function

grouped_quantize_dynamic_scaled_fp4_async_kernel

def grouped_quantize_dynamic_scaled_fp4_async_kernel[output_dtype: DType, scales_dtype: DType, input_dtype: DType, scales_tile_rank: Int, scales_tile_shape: IndexList[scales_tile_rank], scales_desc_shape: IndexList[scales_tile_rank], scales_swizzle_mode: TensorMapSwizzle, output_layout: TensorLayout, input_layout: TensorLayout, row_offsets_layout: TensorLayout, scales_offsets_layout: TensorLayout, expert_ids_layout: TensorLayout, sf_layout: TensorLayout, num_threads: Int = 128](output_tensor: TileTensor[output_dtype, output_layout, MutAnyOrigin], scales_tma_op: TMATensorTile[scales_dtype, scales_tile_rank, scales_tile_shape, scales_desc_shape], input_tensor: TileTensor[input_dtype, input_layout, ImmutAnyOrigin], row_offsets: TileTensor[DType.uint32, row_offsets_layout, ImmutAnyOrigin], scales_offsets: TileTensor[DType.uint32, scales_offsets_layout, ImmutAnyOrigin], expert_ids: TileTensor[DType.int32, expert_ids_layout, ImmutAnyOrigin], sf_tensor: TileTensor[DType.float32, sf_layout, ImmutAnyOrigin])