Skip to content

Commit 0abe3c8

Browse files
Ensure backward compatibility for fp8 datatypes (ROCm#126)
* Ensure backward compatibility for fp8 datatypes Signed-off-by: ravaidya <ravaidya@amd.com> * Update code comments Signed-off-by: ravaidya <ravaidya@amd.com> --------- Signed-off-by: ravaidya <ravaidya@amd.com>
1 parent 4b2b635 commit 0abe3c8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

‎src/common.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include <fstream>
2323
#include <iostream>
2424

25-
// Ensures backward compatibility for FP8 types in RCCL 2.24.3 and later
26-
#if NCCL_VERSION_CODE >= NCCL_VERSION(2,24,3)
27-
#define ncclFp8E4M3 ncclFloat8e4m3
28-
#define ncclFp8E5M2 ncclFloat8e5m2
25+
// Ensures backward compatibility for FP8 datatypes
26+
#if NCCL_VERSION_CODE < NCCL_VERSION(2,24,3)
27+
#define ncclFloat8e4m3 ncclFp8E4M3
28+
#define ncclFloat8e5m2 ncclFp8E5M2
2929
#endif
3030

3131
// For nccl.h < 2.13 since we define a weak fallback

‎verifiable/verifiable.cu‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
#else
2828
#define HAVE_ncclfp8_HOST 1
2929
#endif
30-
// Ensures backward compatibility for FP8 types in RCCL 2.24.3 and later
31-
#if NCCL_VERSION_CODE >= NCCL_VERSION(2,24,3)
32-
#define ncclFp8E4M3 ncclFloat8e4m3
33-
#define ncclFp8E5M2 ncclFloat8e5m2
30+
// Ensures backward compatibility for FP8 datatypes
31+
#if NCCL_VERSION_CODE < NCCL_VERSION(2,24,3)
32+
#define ncclFloat8e4m3 ncclFp8E4M3
33+
#define ncclFloat8e5m2 ncclFp8E5M2
3434
#endif
3535
#else
3636
#define HAVE_ncclfp8 0

0 commit comments

Comments
 (0)