jax-ml / jax-ml/ml_dtypes

Numpy Serialization is not Unique for FP8 dtypes

Open
#324 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
361
Forks
60
Avg merge
18h 41m
Merged PRs (30d)
3

Description

```python
import jax.numpy as jnp
import numpy as np

>>> np.arange(10).astype(ml_dtypes.float8_e4m3b11fnuz).dtype.str
'>> np.arange(10).astype(ml_dtypes.float8_e4m3fn).dtype.str
'>> np.arange(10).astype(ml_dtypes.float8_e4m3).dtype.str
'>> np.asarray(jnp.arange(10).astype(jnp.float8_e3m4)).dtype.str
'

Contributor guide

Open the contributing guide

Research direction

Reproduce the Python examples with the FP8 dtypes, then inspect ml_dtypes/_src/dtypes.cc around line 87 and the handling of kNpyDescrKind. Determine how dtype serialization currently identifies these types and review the backward-compatibility constraint. Done requires an agreed resolution for unique serialization, with its compatibility implications established.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, numpy, python
Domain
data, machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.