Skip to main content

Mojo function

quantize_and_bmm_fp8_helper

quantize_and_bmm_fp8_helper[dtype: DType, fp8_dtype: DType, fp8_scale_dtype: DType, m_scale_granularity: Int, n_scale_granularity: Int, k_scale_granularity: Int, target: StringSlice[StaticConstantOrigin] = "cpu"](c: TileTensor[dtype, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], a: TileTensor[dtype, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], b: TileTensor[fp8_dtype, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], b_scales: TileTensor[fp8_scale_dtype, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], ctx: DeviceContext)

Helper function to quantize and perform a batched matrix multiplication. This function uses the transposed view of the input tensor a.

Was this page helpful?