[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 4 12:47:02 PDT 2022


rjmccall added a comment.

On the topic of supporting BF16 arithmetic, note my comment here: https://github.com/itanium-cxx-abi/cxx-abi/pull/147#issuecomment-1254078916.  To summarize, according to Steve Canon, we really shouldn't implement arithmetic directly in the BF16 format, because the precision is simply too low to be useful.  Instead, we need to guarantee excess-precision arithmetic so that we only truncate back to BF16 when the source code requires it.  We can do that in the frontend using the same excess-precision logic we added for `_Float16`.

If Steve's argument is true, that suggests that it would be a waste for NVPTX hardware to directly support BF16 arithmetic, at least not the same way it would support `float` or `double`.  (Providing operations like x86's VDPBF16PS — https://en.wikichip.org/wiki/x86/avx512_bf16 — that start from BF16 operands but perform their arithmetic in `float` is a different story.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136919/new/

https://reviews.llvm.org/D136919



More information about the cfe-commits mailing list