[PATCH] D140088: Add LLVM type support for fp8

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 05:43:57 PST 2022


arsenm requested changes to this revision.
arsenm added a comment.
This revision now requires changes to proceed.
Herald added a subscriber: wdng.

Missing bitcode and assembler tests



================
Comment at: llvm/include/llvm-c/Core.h:150
   LLVMVoidTypeKind,      /**< type with no size */
+  LLVMFloatE4M3TypeKind, /**< 8 but floating point with 3 bit Mantissa */
+  LLVMFloatE5M2TypeKind, /**< 8 but floating point with 2 bit Mantissa */
----------------
Typo but


================
Comment at: llvm/include/llvm/IR/Type.h:161
+  /// Return true if this is an 8-bit float type.
+  bool is8bitFPTy() const {
+    return getTypeID() == FP8E5M2TyID || getTypeID() == FP8E4M3TyID;
----------------
Capitalize Bit


================
Comment at: llvm/include/llvm/IR/Type.h:190-192
+    case FP8E5M2TyID:
+    case FP8E4M3TyID:
       return true;
----------------
Should add some transform tests that hit this


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140088



More information about the llvm-commits mailing list