Skip to main content

Mojo function

grouped_matmul_dynamic_scaled_fp8

grouped_matmul_dynamic_scaled_fp8[c_type: DType, a_type: DType, b_type: DType, a_scales_type: DType, b_scales_type: DType, a_offsets_type: DType, expert_ids_type: DType, //, input_scale_granularity: StringSlice[StaticConstantOrigin], weight_scale_granularity: StringSlice[StaticConstantOrigin], m_scale_granularity: Int, n_scale_granularity: Int, k_scale_granularity: Int, transpose_b: Bool = False, tokens_padded_per_expert: Bool = False, target: StringSlice[StaticConstantOrigin] = StringSlice("cpu")](c: TileTensor[c_type, c.LayoutType, c.origin, linear_idx_type=c.linear_idx_type, element_size=c.element_size], a: TileTensor[a_type, a.LayoutType, a.origin, linear_idx_type=a.linear_idx_type, element_size=a.element_size], b: TileTensor[b_type, b.LayoutType, b.origin, linear_idx_type=b.linear_idx_type, element_size=b.element_size], a_scales: TileTensor[a_scales_type, a_scales.LayoutType, a_scales.origin, linear_idx_type=a_scales.linear_idx_type, element_size=a_scales.element_size], b_scales: TileTensor[b_scales_type, b_scales.LayoutType, b_scales.origin, linear_idx_type=b_scales.linear_idx_type, element_size=b_scales.element_size], a_offsets: TileTensor[a_offsets_type, a_offsets.LayoutType, a_offsets.origin, linear_idx_type=a_offsets.linear_idx_type, element_size=a_offsets.element_size], expert_ids: TileTensor[expert_ids_type, expert_ids.LayoutType, expert_ids.origin, linear_idx_type=expert_ids.linear_idx_type, element_size=expert_ids.element_size], max_num_tokens_per_expert: Int, num_active_experts: Int, ctx: DeviceContext)

TileTensor primary implementation of grouped_matmul_dynamic_scaled_fp8.

Was this page helpful?