[PATCH] D130964: [X86][BF16] Enable __bf16 for x86 targets.
Phoebe Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 2 18:15:19 PDT 2022
pengfei added a comment.
In D130964#3694473 <https://reviews.llvm.org/D130964#3694473>, @rjmccall wrote:
> How are you actually implementing `__bf16` on these targets? There isn't even hardware support for conversions.
We support `float` -> `bf16` in `AVX512BF16`. https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#avx512techs=AVX512_BF16
And we found some problems in how to represent `bf16` types in intrinsics. For example, we currently defined `__bfloat16` as `unsigned short`. We cannot stop user e.g., adding 2 `__bfloat16` in C code and getting the wrong result. So we want to introduce the type on X86. For more information, please see the discussions in D120395 <https://reviews.llvm.org/D120395>,
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits