[PATCH] D140088: Add LLVM type support for fp8

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 06:04:38 PST 2022


dmgreen added inline comments.


================
Comment at: llvm/docs/BitCodeFormat.rst:1150
+
+The ``FP8E4M3`` record (code 26) adds an ``FP8E4M3`` (8-bit floating point) type to
+the type table.
----------------
code 26 -> code 27


================
Comment at: llvm/include/llvm/Support/MachineValueType.h:202
       FIRST_FP_FIXEDLEN_VECTOR_VALUETYPE = v1f16,
       LAST_FP_FIXEDLEN_VECTOR_VALUETYPE = v256f64,
 
----------------
These look like they will be incorrect for the newly added vector sizes. Same for the SCALABLE ones below.


================
Comment at: llvm/include/llvm/Support/MachineValueType.h:341
       // This value must be a multiple of 32.
       MAX_ALLOWED_VALUETYPE = 224,
 
----------------
This looks like it might be overflowing now too.


================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:2308
       break;
+    case bitc::TYPE_CODE_FP8E4M3: // HALF
+      ResultTy = Type::getFP8E4M3Ty(Context);
----------------
HALF -> FP8


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