This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add __bf16 as new Bfloat16 C Type
AbandonedPublic

Authored by stuij on Apr 15 2020, 4:29 AM.

Details

Reviewers
None
Summary

This patch upstreams support for a new storage only bfloat16 C type.
This type is used to implement primitive support for bfloat16 data, in
line with the Bfloat16 extension of the Armv8.6-a architecture, as
detailed here:

https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a

The bfloat type, and its properties is specified in the Arm C language
extension specification:

https://developer.arm.com/docs/ihi0055/d/procedure-call-standard-for-the-arm-64-bit-architecture

In detail this patch:

introduces an opaque, storage-only C-type __bf16, which does not introduce a new LLVM IR type, but maps it to either i16 or half type.

This is part of a patch series, starting with command-line and Bfloat16
assembly support. The subsequent patches will upstream intrinsics
support for BFloat16, followed by Matrix Multiplication and the
remaining Virtualization features of the armv8.6-a architecture.

Based on work by:

  • Luke Cheeseman
  • Momchil Velikov
  • labrinea
  • Luke Geeson

Diff Detail

Event Timeline

stuij created this revision.Apr 15 2020, 4:29 AM
stuij updated this revision to Diff 258017.Apr 16 2020, 4:40 AM

changes: depend on bfloat IR type, and resolve some conflicts that crept in

stuij abandoned this revision.Apr 16 2020, 4:58 AM

This should not have been it's own revision. I wrongly trusted arc to update https://reviews.llvm.org/D76077.