jorisvandenbossche commented on issue #38325:
URL: https://github.com/apache/arrow/issues/38325#issuecomment-2047168786
> As for `requested_device`, if we think it is needed, then let's just add
it immediately?
The specifics for `requested_device` could then be:
- For the default of `requested_device=None`, the producer should provide
the data with the device that the data is currently on.
- When specified, it accepts integer values corresponding to
`ArrowDeviceType` from the ABI
- The producer should attempt to copy the data to the provided device, and
if it cannot do that (eg doesn't support that device), raise an exception
(ValueError?)
(thus, not "best effort" like `requested_schema`, but actually raise an
error if not possible to fulfill the request)
Does that sound OK?
If we add this keyword, do we keep the notion that a non-CPU library is
allowed to also implement the non-device-aware methods like `__arrow_c_array__`
doing an implicit device-to-CPU copy? Because that can then be covered with the
more explicit `__arrow_c_device_array__(requested_device=kCPU)`, although on
the other hand it can still be useful for consumers that don't yet support the
Device variants of the structs
--
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]