Skip to content

Commit 9d25f2a

Browse files
jakeh-gccopybara-github
authored andcommitted
PR #3200: Add support for float8_e4m3fnuz and float8_e5m2fnuz.
Imported from GitHub PR openxla/xla#3200 This adds support for the two FP8 types `float8_e4m3fnuz` and `float8_e5m2fnuz` to XLA similar to `float8_e4m3fn`, `float8_e4m3b11`, and `float8_e5m2`. Copybara import of the project: -- 3b96f8fe219c1ac1bec5c4b99ff9c51148706981 by Jake Hall <[email protected]>: Add support for float8_e4m3fnuz and float8_e5m2fnuz. Merging this change closes #3200 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#3200 from jakeh-gc:fp8_fnuz 3b96f8fe219c1ac1bec5c4b99ff9c51148706981 PiperOrigin-RevId: 543802274
1 parent 5006c9e commit 9d25f2a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tsl/platform/float8.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using float8_e4m3b11fnuz = ml_dtypes::float8_e4m3b11fnuz;
2525
// Deprecated: old name for backward-compatibility only.
2626
using float8_e4m3b11 = float8_e4m3b11fnuz;
2727
using float8_e5m2 = ml_dtypes::float8_e5m2;
28-
using float8_e5m2funz = ml_dtypes::float8_e5m2fnuz;
28+
using float8_e5m2fnuz = ml_dtypes::float8_e5m2fnuz;
2929
} // namespace tsl
3030

3131
#endif // TENSORFLOW_TSL_PLATFORM_FLOAT8_H_

tsl/protobuf/dnn.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ enum DataType {
1919
kBF16 = 7;
2020
kF8E5M2 = 8;
2121
kF8E4M3FN = 9;
22+
kF8E5M2FNUZ = 10;
23+
kF8E4M3FNUZ = 11;
2224
}
2325

2426
// Describes how a convolution input or output layer's data is formatted.

0 commit comments

Comments
 (0)