diff options
author | Alexander Pivovarov <pivovaa@amazon.com> | 2024-06-29 12:48:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-29 12:48:11 -0700 |
commit | 2628a5fd2431184924cdc7d6b926bfeb36b75596 (patch) | |
tree | 18662e6882b7261fbbec04cec536bd48526282b5 /llvm/unittests/ADT/APFloatTest.cpp | |
parent | 5a8c4b597beed38e392f221042d29f475a3d1626 (diff) | |
download | llvm-2628a5fd2431184924cdc7d6b926bfeb36b75596.zip llvm-2628a5fd2431184924cdc7d6b926bfeb36b75596.tar.gz llvm-2628a5fd2431184924cdc7d6b926bfeb36b75596.tar.bz2 |
Rename f8E4M3 to f8E4M3FN in mlir.extras.types py package (#97102)
Currently `f8E4M3` is mapped to `Float8E4M3FNType`.
This PR renames `f8E4M3` to `f8E4M3FN` to accurately reflect the actual
type.
This PR is needed to avoid names conflict in upcoming PR which will add
IEEE 754 `Float8E4M3Type`.
https://github.com/llvm/llvm-project/pull/97118 Add f8E4M3 IEEE 754 type
Maksim, can you review this PR? @makslevental ?
Diffstat (limited to 'llvm/unittests/ADT/APFloatTest.cpp')
-rw-r--r-- | llvm/unittests/ADT/APFloatTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/unittests/ADT/APFloatTest.cpp b/llvm/unittests/ADT/APFloatTest.cpp index cf6bbd31..86a25f4 100644 --- a/llvm/unittests/ADT/APFloatTest.cpp +++ b/llvm/unittests/ADT/APFloatTest.cpp @@ -5508,8 +5508,8 @@ TEST(APFloatTest, ConvertE4M3FNToE5M2) { EXPECT_TRUE(losesInfo); EXPECT_EQ(status, APFloat::opInexact); - // Convert E4M3 denormal to E5M2 normal. Should not be truncated, despite the - // destination format having one fewer significand bit + // Convert E4M3FN denormal to E5M2 normal. Should not be truncated, despite + // the destination format having one fewer significand bit test = APFloat(APFloat::Float8E4M3FN(), "0x1.Cp-7"); status = test.convert(APFloat::Float8E5M2(), APFloat::rmNearestTiesToEven, &losesInfo); @@ -5647,8 +5647,8 @@ TEST(APFloatTest, Float8E4M3FNAdd) { int category; APFloat::roundingMode roundingMode = APFloat::rmNearestTiesToEven; } AdditionTests[] = { - // Test addition operations involving NaN, overflow, and the max E4M3 - // value (448) because E4M3 differs from IEEE-754 types in these regards + // Test addition operations involving NaN, overflow, and the max E4M3FN + // value (448) because E4M3FN differs from IEEE-754 types in these regards {FromStr("448"), FromStr("16"), "448", APFloat::opInexact, APFloat::fcNormal}, {FromStr("448"), FromStr("18"), "NaN", @@ -6278,8 +6278,8 @@ TEST(APFloatTest, ConvertE4M3FNUZToE5M2FNUZ) { EXPECT_TRUE(losesInfo); EXPECT_EQ(status, APFloat::opInexact); - // Convert E4M3 denormal to E5M2 normal. Should not be truncated, despite the - // destination format having one fewer significand bit + // Convert E4M3FNUZ denormal to E5M2 normal. Should not be truncated, despite + // the destination format having one fewer significand bit losesInfo = true; test = APFloat(APFloat::Float8E4M3FNUZ(), "0x1.Cp-8"); status = test.convert(APFloat::Float8E5M2FNUZ(), APFloat::rmNearestTiesToEven, |