jax-ml / ml_dtypes

A stand-alone implementation of several NumPy dtype extensions used in machine learning.
Apache License 2.0
191 stars 25 forks source link

Add implicit F8 conversions #176

Closed copybara-service[bot] closed 2 weeks ago

copybara-service[bot] commented 2 weeks ago

Add implicit F8 conversions

Adds implicit conversions between F8 types and float, half, and bfloat16. This allows using the std math functions for the F8 types as easy as if they were float or bfloat16. Note that bfloat16 already has an implicit conversion to float, so it already has good ergonomics.