Skip to content

Add ndarray f16/bf16 support #4077

@swfsql

Description

@swfsql

Feature description

Add support for f16/bf16 for the ndarray backend, mostly through the half::f16/bf16 types.

Feature motivation

  • Some other backends support it, such as Cuda. This could also be interesting for wasm targets, given that they can be edge devices.
  • For debugging purposes, in case an architecture has stability issues in f16, it's desirable to able to debug it in ndarray than in an gpu-backed device.

Suggest a Solution

The natural way forward is for ndarray to support f16 types. I've opened an issue for it rust-ndarray/ndarray#1550, and I plan on having a draft/concept PR for this as a upstart (for now, relying on patches of ndarray). I believe this requires minor changes to both ndarray and burn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions