paleolimbot commented on issue #38325: URL: https://github.com/apache/arrow/issues/38325#issuecomment-2021704968
It seems like perhaps `__arrow_c_device__` should not perform a cross-device copy, but perhaps the producer could be free to decide if implementing `__arrow_c_array__` and allowing an implicit copy is going to be problematic. I imagine most producers would prefer not to allow this implicit copy but in the grand scheme of transformations that might occur if `__arrow_c_array__` is called (e.g., bitpacking uint8 vectors to boolean, converting decimal32s to decimal128s), it might be that the device copy is just not a problem. In any case, the producer has all the right information to decide about this. That would mean that a consumer of `__arrow_c_device__` has to have a plan to handle data that isn't on the correct device yet, and I think that is reasonable. If they are a GPU library, they almost certainly have a way to get the data to the device they want. If they are a CPU-only library, they should have called `__arrow_c_array__`. I wonder if adding a `requested_device` parameter is a feature that should be added when its utility becomes clear (which is a good reason for perhaps documenting the plan for evolution of the protocol). -- 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]
