Search code examples
cudagpunvidiagpgpuendianness

Are NVIDIA's GPUs big-endian or little-endian?


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.


Solution

  • 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".