Skip to content

Endianness is determined by host system, not backend #2694

@agoose77

Description

@agoose77

Version of Awkward Array

main

Description and code to reproduce

We recently made endianness explicit in Awkward Array, with to_buffers producing little-endian buffers, and from_buffers converting to the system byteorder.

This poses a problem on big-endian host systems that use e.g. CuPy, as CUDA devices are little-endian.

Really, endianness is a device property. If we impose the constraints that

  • all buffers must belong to the same backend X
  • all buffers operated upon by X must have the same device endianness

then we can fix this by taking the desired endianness from the backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe problem described is something that must be fixed

    Type

    No type

    Projects

    Status

    P6 (lowest)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions