Skip to content

Commit 2472846

Browse files
authored
Add a requirement for the producer of a DLPack capsule(#186)
1 parent 0429693 commit 2472846

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/design_topics/data_interchange.md

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ The `__dlpack__` method will produce a `PyCapsule` containing a
111111
`from_dlpack` - therefore it is consumed exactly once, and it will not be
112112
visible to users of the Python API.
113113

114+
The producer must set the PyCapsule name to ``"dltensor"`` so that it can
115+
be inspected by name.
114116
The consumer must set the PyCapsule name to `"used_dltensor"`, and call the
115117
`deleter` of the `DLPackManagedTensor` when it no longer needs the data.
116118

0 commit comments

Comments
 (0)