Commits


Joris Van den Bossche authored and GitHub committed 19e874ff8c6
GH-39782: [C++] Use correct (non-CPU) address of buffer in ExportDeviceArray (#39783) ### Rationale for this change The Array exporter currently uses `buffer->data()`, which is documented as "The buffer has to be a CPU buffer (`is_cpu()` is true). Otherwise, an assertion may be thrown or a null pointer may be returned.". In practice, we indeed return null for non-CPU data. There is only a debug check that asserts the device. This means that for non-CPU data the C device interface is currently returning null pointers for the buffers. ### What changes are included in this PR? Use the buffer's `address()` instead of `data()` ### Are these changes tested? Not yet * Closes: #39782 Lead-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Co-authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <antoine@python.org>