Skip to content

Support BFloat16 dtype in Android Tensor API #9881

Closed
@GregoryComer

Description

@GregoryComer

🚀 The feature, motivation and pitch

Currently, the ExecuTorch Android Java tensor class does not support BFloat16 dtype tensors. This prevents Java users from passing BFloat16 tensors in or out of the model. BFloat16 is increasingly common for GenAI, so this will be a useful feature to have.

To implement support, we will need to logic to Tensor.java. This task will require the following:

  • Create a Tensor_bfloat16 implementation, similar to the existing Tensor_int8 and Tensor_float32.
  • Update the dtype switches in Tensor.java to support bfloat16.
  • Add corresponding tests to TestTensor.java.

CC #6571

Alternatives

No response

Additional context

No response

RFC (Optional)

No response

cc @kirklandsign @cbilgin

Metadata

Metadata

Assignees

Labels

module: androidIssues related to Android code, build, and executiontriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions