[all-commits] [llvm/llvm-project] ffa5ce: Add arith expansion of f8E8M0 type for extf/trunc ...
Umang Yadav via All-commits
all-commits at lists.llvm.org
Thu May 22 13:36:22 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ffa5ce04d0a5440f939881e0e329a173d486dd68
https://github.com/llvm/llvm-project/commit/ffa5ce04d0a5440f939881e0e329a173d486dd68
Author: Umang Yadav <29876643+umangyadav at users.noreply.github.com>
Date: 2025-05-22 (Thu, 22 May 2025)
Changed paths:
M mlir/include/mlir/Dialect/Arith/Transforms/Passes.h
M mlir/include/mlir/Dialect/Arith/Transforms/Passes.td
M mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
M mlir/test/Dialect/Arith/expand-ops.mlir
Log Message:
-----------
Add arith expansion of f8E8M0 type for extf/trunc ops (#140332)
F8E8M0 floating type is supposed to represent biased exponent bits of
F32 type in OCP Micro scaling floating point formats.
https://www.opencompute.org/documents/ocp-microscaling-formats-mx-v1-0-spec-final-pdf
This PR expands `arith.truncf` and `arith.extf` to support this
behavior.
For the `arith.truncf` thing to note here is that F8E8M0FNU type has one
NaN representation which is encoded as `0xFF`. Therefore alll kinds of
NaNs and +/-Inf in Float32Type would map to NaN in F8E8M0FNU. F8E8M0FNU
doesn't have a sign bit therefore it is a lossy and irreversible
downcast.
cc: @krzysz00 @MaheshRavishankar @Muzammiluddin-Syed-ECE
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list