mlx.core.from_fp8

Contents

mlx.core.from_fp8#

from_fp8(x: array, dtype: Dtype = bfloat16, *, stream: None | Stream | Device = None) array#

Convert the array from fp8 (e4m3) to another floating-point type.

Parameters:
  • x (array) – The input fp8 array with type uint8.

  • dtype (Dtype) – The data type to convert to. Default: bfloat16.

Returns:

The array converted from fp8.

Return type:

array