[all-commits] [llvm/llvm-project] e08ca4: Add Float8E4M3FN type to MLIR.

Reed via All-commits all-commits at lists.llvm.org
Wed Nov 16 01:30:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e08ca4bb1dfec860eefce636f4eff472fc7081ea
      https://github.com/llvm/llvm-project/commit/e08ca4bb1dfec860eefce636f4eff472fc7081ea
  Author: Reed <reedwm at google.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M mlir/include/mlir-c/BuiltinTypes.h
    M mlir/include/mlir/IR/Builders.h
    M mlir/include/mlir/IR/BuiltinTypes.h
    M mlir/include/mlir/IR/BuiltinTypes.td
    M mlir/include/mlir/IR/Types.h
    M mlir/lib/AsmParser/TokenKinds.def
    M mlir/lib/AsmParser/TypeParser.cpp
    M mlir/lib/CAPI/IR/BuiltinTypes.cpp
    M mlir/lib/IR/AsmPrinter.cpp
    M mlir/lib/IR/Builders.cpp
    M mlir/lib/IR/BuiltinTypes.cpp
    M mlir/lib/IR/MLIRContext.cpp
    M mlir/lib/IR/Types.cpp
    M mlir/test/IR/attribute.mlir

  Log Message:
  -----------
  Add Float8E4M3FN type to MLIR.

The paper https://arxiv.org/abs/2209.05433 introduces two new FP8 dtypes: E5M2 (called Float8E5M2 in LLVM) and E4M3 (called Float8E4M3FN in LLVM). Support for Float8E5M2 in APFloat and MLIR was added in https://reviews.llvm.org/D133823. Support for Float8E4M3FN in APFloat was added in https://reviews.llvm.org/D137760. This change adds Float8E4M3FN to MLIR as well.

There is an RFC for adding the FP8 dtypes here: https://discourse.llvm.org/t/rfc-add-apfloat-and-mlir-type-support-for-fp8-e5m2/65279.

This change is identical to the MLIR changes in the patch that added Float8E5M2, except that Float8E4M3FN is added instead.

Reviewed By: stellaraccident, bkramer, rriddle

Differential Revision: https://reviews.llvm.org/D138075




More information about the All-commits mailing list