ROCR-Runtime icon indicating copy to clipboard operation
ROCR-Runtime copied to clipboard

Endianness unset on ppc64el systems

Open madscientist159 opened this issue 7 years ago • 1 comments

LITTLEENDIAN_CPU is not set on ppc64le systems. The following patch fixes the issue:

diff --git a/src/inc/hsa.h b/src/inc/hsa.h
index 0ed2b68..0342eea 100644
--- a/src/inc/hsa.h
+++ b/src/inc/hsa.h
@@ -80,7 +80,7 @@
 // Try to detect CPU endianness
 #if !defined(LITTLEENDIAN_CPU) && !defined(BIGENDIAN_CPU)
 #if defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \
-    defined(_M_X64)
+    defined(_M_X64) || (defined(__PPC64__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
 #define LITTLEENDIAN_CPU
 #endif
 #endif

madscientist159 avatar Nov 12 '18 18:11 madscientist159

@madscientist159 Apologies for the lack of response. Is this ticket still relevant? If not, please close the ticket. Thanks!

ppanchad-amd avatar Aug 16 '24 19:08 ppanchad-amd