Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add float8_e8m0_fnu (E8M0) OCP MX scale format #166

Merged
merged 1 commit into from
Sep 12, 2024

Commits on Sep 12, 2024

  1. Add float8_e8m0_fnu (E8M0) OCP MX scale format

    Adding the OCP MX scale format `E8M0`, which has the following properties:
    * Unsigned format;
    * 8 exponent bits;
    * Exponent range from -127 to 127;
    * No zero and infinity;
    * Single NaN value (0xFF);
    
    `ml_dtypes` `float8_base` C++ class is extended to support floating point formats
    which are unsigned and with no zero (i.e. additional `kIsSigned` and `kHasZero` Traits properties).
    
    Base on these traits, `float8_e8m0_fnu` has been implemented using the existing functionalities (convert, unary/binary ops, ...).
    Float8 Python unit tests have been extended to be able to cover unsigned floating point formats.
    balancap committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    b6d3659 View commit details
    Browse the repository at this point in the history