Are NVIDIA's GPUs big-endian or little-endian?
Asked Answered
J

2

13

I need to do a lot of bit-wise operations on GPUs, but cannot find any information regarding whether NVIDIA GPU hardware is big or little-endian.

Jaan answered 12/3, 2013 at 8:40 Comment(2)
What impact would endianness have on bitwise operations in C? Should be none.Misfire
@modifiable lvalue: Your statement is correct as long as there isnt any pointer aliasing there.Jaan
P
15

See: https://devtalk.nvidia.com/default/topic/366773/cuda-programming-and-performance/endian-mode-of-the-device/post/2630674/#2630674

All of the supported CUDA platforms use little-endian CPUs, and cudaMemcpy() can copy data structures to the device without knowing the data format, so I would assume the GPU is also little-endian. The GPU might support both big and little endian execution (as some CPUs also do this) as a hedge against future CUDA platforms being big endian.

My guess is the answer has to be either "little-endian" or "both".

Pebble answered 12/3, 2013 at 9:23 Comment(1)
So, is this presumption known to be valid?Sheryl
U
20

NVIDIA GPUs are little-endian, per the Hardware Implementation section of the CUDA guide.

Understanding answered 14/7, 2020 at 14:35 Comment(1)
Why the downvote? This has a reference to an authoritative source. The other answer is a guess from an unknown person on a bulletin board.Understanding
P
15

See: https://devtalk.nvidia.com/default/topic/366773/cuda-programming-and-performance/endian-mode-of-the-device/post/2630674/#2630674

All of the supported CUDA platforms use little-endian CPUs, and cudaMemcpy() can copy data structures to the device without knowing the data format, so I would assume the GPU is also little-endian. The GPU might support both big and little endian execution (as some CPUs also do this) as a hedge against future CUDA platforms being big endian.

My guess is the answer has to be either "little-endian" or "both".

Pebble answered 12/3, 2013 at 9:23 Comment(1)
So, is this presumption known to be valid?Sheryl

© 2022 - 2024 — McMap. All rights reserved.