Skip to main content

Mojo function

compute_static_fp8_scale_recip

compute_static_fp8_scale_recip[accum_type: DType, out_dtype: DType](static_scale: Float32) -> Scalar[accum_type]

Compute reciprocal scale for static FP8 quantization.

Parameters:

  • โ€‹accum_type (DType): The accumulation dtype.
  • โ€‹out_dtype (DType): The FP8 output dtype.

Args:

  • โ€‹static_scale (Float32): The static scale value.

Returns:

Scalar: The reciprocal scale: fp8_max / static_scale.

Was this page helpful?