jorisvandenbossche opened a new issue, #40801: URL: https://github.com/apache/arrow/issues/40801
In https://github.com/apache/arrow/pull/40717#pullrequestreview-1958505514, @paleolimbot noted that the current implementation of the C Device interface in Arrow C++ is using a `device_id` of -1 when exporting CPU data (while nanoarrow is using 0). The spec itself doesn't say anything about this (https://arrow.apache.org/docs/format/CDeviceDataInterface.html#c.ArrowDeviceArray.device_id): > _Mandatory_. The device id to identify a specific device if multiple devices of this type are on the system. The semantics of the id will be hardware dependent, but we use an `int64_t` to future-proof the id as devices change over time. Should we recommend or require a specific value for this case? I noticed that the DLPack specification, from which the device type/id structure was taken, does specify to use 0 (https://dmlc.github.io/dlpack/latest/c_api.html#c.DLDevice.device_id): > The device index. For vanilla CPU memory, pinned memory, or managed memory, this is set to 0. Should we adopt the same guideline for our spec? cc @pitrou @zeroshade @kkraus14 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
