Skip to main content

Mojo function

matmul_dynamic_scaled_fp8

matmul_dynamic_scaled_fp8[c_type: DType, a_type: DType, b_type: DType, a_scales_type: DType, b_scales_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, target: StringSlice[StaticConstantOrigin] = "cpu"](c: TileTensor[c_type, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], a: TileTensor[a_type, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], b: TileTensor[b_type, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], a_scales: TileTensor[a_scales_type, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], b_scales: TileTensor[b_scales_type, LayoutType, origin, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], ctx: DeviceContext)

matmul_dynamic_scaled_fp8[c_type: DType, a_type: DType, b_type: DType, a_scales_type: DType, b_scales_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, target: StringSlice[StaticConstantOrigin] = "cpu"](c: NDBuffer[c_type, 2, origin, shape, strides], a: NDBuffer[a_type, 2, origin, shape], b: NDBuffer[b_type, 2, origin, shape], a_scales: NDBuffer[a_scales_type, 2, origin, shape, strides], b_scales: NDBuffer[b_scales_type, 2, origin, shape, strides], ctx: DeviceContext)

Was this page helpful?