You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "FredJia-intellif (via GitHub)" <gi...@apache.org> on 2025/07/24 03:17:19 UTC

Re: [PR] [Dtype] Low-precision Blackwell Datatype Support [tvm]

FredJia-intellif commented on code in PR #18027:
URL: https://github.com/apache/tvm/pull/18027#discussion_r2227231750


##########
src/tir/transforms/dtype_conversion.h:
##########
@@ -121,12 +122,43 @@ class FloatConfig {
       // NVIDIA/Arm/Intel's FP8 formats for Deep Learning
       // Reference: https://arxiv.org/abs/2209.05433
       switch (dtype.code()) {
+        case DataType::kFloat8_e3m4:
+          // E3M4 format, not consistent with IEEE-754
+          return FloatConfig(3, 4, 3, InftyStyle::kNone, NaNStyle::kAllOnes);
+        case DataType::kFloat8_e4m3:
+          // E4M3 format, not consistent with IEEE-754
+          return FloatConfig(4, 3, 7, InftyStyle::kNone, NaNStyle::kAllOnes);
+        case DataType::kFloat8_e4m3b11fnuz:
+          // E4M3 variant with b11 encoding, not consistent with IEEE-754
+          return FloatConfig(4, 3, 7, InftyStyle::kNone, NaNStyle::kAllOnes);
         case DataType::kFloat8_e4m3fn:
           // E4M3 format, not consistent with IEEE-754
           return FloatConfig(4, 3, 7, InftyStyle::kNone, NaNStyle::kAllOnes);
-        default:
-          // E5M2 format, consistent with IEEE-754
+        case DataType::kFloat8_e4m3fnuz:
+          // UE4M3 format, not consistent with IEEE-754
+          return FloatConfig(4, 3, 7, InftyStyle::kNone, NaNStyle::kAllOnes);

Review Comment:
   @Kathryn-cat , hi, why are the FloatConfig of e4m3, e4m3b11fnuz, e4m3fn and e4m3fnuz exactly the same?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org