jax-ml / jax-ml/ml_dtypes

Support for non-saturating mode for fp8

Open
#147 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
361
Forks
60
Avg merge
18h 41m
Merged PRs (30d)
3

Description

OFP8 (https://www.opencompute.org/documents/ocp-8-bit-floating-point-specification-ofp8-revision-1-0-2023-12-01-pdf-1) defines two saturation modes - saturating and non-saturating mode.
It looks like the current code runs in saturating mode by default.
```
>>> math.isnan(np.float32(449).astype(float8_e4m3fn))
False
```
Wondering if there's any plan to support both.
Thank you.

Contributor guide

Open the contributing guide

Research direction

No implementation files, tests, or entry points are identified in the issue. Start by reading the OFP8 specification and tracing the current float8_e4m3fn conversion behavior; done would require a decided API for selecting saturation modes and coverage demonstrating both modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, numpy
Domain
machine-learning
Issue type
Feature
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.