Skip to content

Support for machine learning dtypes #372

Open

Description

@justinchuby

I am building a reference runtime for ONNX using this library, which needs to support data types commonly used in machine learning, e.g. bfloat16, float8*, float4, and lower bit ints like (u)int4 and (u)int2. These types exist in frameworks like jax, pytorch and numpy (via the ml_dtypes package). Is there a plan to support these datatypes?

Activity

  1. ev-br commented on Jan 1, 2026

    @ev-br
    Member

    No such plan yet, no.

    What kind of support you're after? This -compat library scope is to smooth over small incompatibilities between array libraries and the Array API spec. The ML dtypes are not in the spec, this array-api-compat does not know about them; this is similar to other array lib features that are beyond the spec: the -compat version does not block them, and leaves them to an array library itself.

    In the ONNX based land specifically, ndonnx has the Array API support in the main namespace, so maybe start with how ndonnx handles these ML dtypes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions