dmlc / dlpack

common in-memory tensor structure
https://dmlc.github.io/dlpack/latest
Apache License 2.0
911 stars 133 forks source link

Circumnavigation in the Python DLPack docs #139

Closed pitrou closed 8 months ago

pitrou commented 8 months ago

The page https://dmlc.github.io/dlpack/latest/python_spec.html currently lacks a detailed description of the DLPack Python protocol (for example the __dlpack__ signature). It claims that "More details about the spec can be found under the Data interchange mechanisms page", so one is tempted to follow through that link. However, the linked page does not provide a detailed description of the Python protocol either, and does not link to the actual API docs.

leofang commented 8 months ago

Apart from full API signatures which I can fix on both sides (make it fully spelled out on the DLPack Python Spec page, and add hyperlinks to the Array API "Data interchange mechanisms" page), what kind of detailed descriptions you think are missing, once you read the four pages (the first two + __dlpack__/__dlpack_device__ docs)?

pitrou commented 8 months ago

The __dlpack__ API doc(s) should be linked directly from the spec pages IMHO. Otherwise it's too easy to get lost. But, yeah, nothing else is really required.