1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Fri, 15 Mar 2024 00:45:35 -0600
Subject: expand endian detection
The endianness detection logic in hsa/hsa.h fails on arm64 and ppc64el, which
leads to build failures in rccl on those platforms.
Forwarded: no
Bug-Debian: https://bugs.debian.org/1065695
---
runtime/hsa-runtime/inc/hsa.h | 2 ++
1 file changed, 2 insertions(+)
--- a/runtime/hsa-runtime/inc/hsa.h
+++ b/runtime/hsa-runtime/inc/hsa.h
@@ -86,6 +86,8 @@
#elif defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
defined(_M_X64) || defined(__loongarch64) || defined(__riscv)
#define LITTLEENDIAN_CPU
+#elif (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#define BIGENDIAN_CPU
#endif
#endif
|