-
Notifications
You must be signed in to change notification settings - Fork 160
Description
There is a discussion in the array api about adding a nocopy request to the Python API. While it might be nice to solve such requests at a lower level in C, it isn't vital where the request happens.
However, there is a point that often the user doesn't care, but still would like to know if they got a copy (own the data effectively) or not (a view).
So if we go through the trouble of having a request flag, I think we must also add this informational flag in the struct (probably 1 being set meaning that a copy is returned for whatever reason: the consumer is the sole user of the data).
Yes, this isn't what DLPack had in mind when designed, but it seems like it is a natural extension of an exchange protocol.
(The request API still is useful with this, since it allows the consumer to say that they require a view, allowing to fail early.)