[PATCH] D151923: [APFloat] Add APFloat semantic support for TF32

Jeremy Furtek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 13:27:48 PDT 2023


jfurtek created this revision.
Herald added subscribers: bzcheeseman, rriddle, hiraditya.
Herald added a project: All.
jfurtek requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, stephenneuendorffer.
Herald added projects: clang, LLVM.

This diff adds APFloat support for a semantic that matches the TF32 data type
used by some accelerators (most notably GPUs from both NVIDIA and AMD).

For more information on the TF32 data type, see https://blogs.nvidia.com/blog/2020/05/14/tensorfloat-32-precision-format/.
Some intrinsics that support the TF32 data type were added in https://reviews.llvm.org/D122044.

For some discussion on supporting common semantics in `APFloat`, see similar
efforts for 8-bit formats at https://reviews.llvm.org/D146441, as well as
https://discourse.llvm.org/t/rfc-adding-the-amd-graphcore-maybe-others-float8-formats-to-apfloat/67969.

A subsequent diff will extend MLIR to use this data type. (Those changes are
not part of this diff to simplify the review process.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151923

Files:
  clang/lib/AST/MicrosoftMangle.cpp
  llvm/include/llvm/ADT/APFloat.h
  llvm/lib/Support/APFloat.cpp
  llvm/unittests/ADT/APFloatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151923.527585.patch
Type: text/x-patch
Size: 12823 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230601/759f1abf/attachment.bin>


More information about the llvm-commits mailing list