-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize C interface for stream exchange #65
Comments
During the 20220930 ABI change meeting we (@tqchen @kkraus14 @seberg and I) briefly discussed this issue. We don't have a concrete proposal yet, but something along this line could be a starter: /*
* Each producer library implements this function, which is similar to __dlpack__ in Python.
* Assuming we have a way for the consumer to query DLDevice (similar to __dlpack_device__ in Python),
* by calling this function the consumer offers a "stream" object to the producer to properly return a PyCapsule.
*/
PyObject* to_dlpack(const void* stream); |
I guess you mean to_dlpack(SelfType self, DLVManagedTensor *in_tensor, const void *stream) where the caller/consumer passes in |
I was assuming we need to return a PyCapsule too, with the C interface. But yeah if we wanna facilitate pure C-to-C exchange we don't need to involve any Python objects. |
I've run into an issue with steam semantics and object deletion.
There are several ways to solve the issue.
This needs to be addressed somehow (perhaps we should be more restrictive about semantics in newer DLPack versions?). |
Following up on #57 where we figured out the correct stream exchange and synchronization semantics and a Python interface for doing so, we need to do the same for a C interface.
TLDR from #57:
cc @tqchen @harrism @jrhemstad @rgommers @leofang @oleksandr-pavlyk @szha @veritas9872
The text was updated successfully, but these errors were encountered: