From 0abe3c80bb080179b2ebc2d8a5d112181cee4cc4 Mon Sep 17 00:00:00 2001 From: Rahul Vaidya Date: Thu, 15 May 2025 13:56:40 -0500 Subject: [PATCH] Ensure backward compatibility for fp8 datatypes (#126) * Ensure backward compatibility for fp8 datatypes Signed-off-by: ravaidya * Update code comments Signed-off-by: ravaidya --------- Signed-off-by: ravaidya --- src/common.h | 8 ++++---- verifiable/verifiable.cu | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common.h b/src/common.h index 5a3623cddb..8e7cfdf027 100644 --- a/src/common.h +++ b/src/common.h @@ -22,10 +22,10 @@ #include #include -// Ensures backward compatibility for FP8 types in RCCL 2.24.3 and later -#if NCCL_VERSION_CODE >= NCCL_VERSION(2,24,3) - #define ncclFp8E4M3 ncclFloat8e4m3 - #define ncclFp8E5M2 ncclFloat8e5m2 +// Ensures backward compatibility for FP8 datatypes +#if NCCL_VERSION_CODE < NCCL_VERSION(2,24,3) + #define ncclFloat8e4m3 ncclFp8E4M3 + #define ncclFloat8e5m2 ncclFp8E5M2 #endif // For nccl.h < 2.13 since we define a weak fallback diff --git a/verifiable/verifiable.cu b/verifiable/verifiable.cu index 631e19feea..7611a6b491 100644 --- a/verifiable/verifiable.cu +++ b/verifiable/verifiable.cu @@ -27,10 +27,10 @@ #else #define HAVE_ncclfp8_HOST 1 #endif -// Ensures backward compatibility for FP8 types in RCCL 2.24.3 and later -#if NCCL_VERSION_CODE >= NCCL_VERSION(2,24,3) - #define ncclFp8E4M3 ncclFloat8e4m3 - #define ncclFp8E5M2 ncclFloat8e5m2 +// Ensures backward compatibility for FP8 datatypes +#if NCCL_VERSION_CODE < NCCL_VERSION(2,24,3) + #define ncclFloat8e4m3 ncclFp8E4M3 + #define ncclFloat8e5m2 ncclFp8E5M2 #endif #else #define HAVE_ncclfp8 0