Skip to content

[RFC] DLPack C Exchange API Attribute to PyCapsule #179

@tqchen

Description

@tqchen

Background in #175 we introduced the C exchange API. In the original discussion we have considered proposals of PyCapsule as field and in dunder. We discussed the choice array-api meeting session where and I think everyone agreed both path can work, but then eventually went with int.

After recent discussion with PyTorch pytorch/pytorch#162845 (comment) there is a good feedback that having PyCapsule with name "dlpack_exchange_api" would provide better checking guarantees.

Given the original discussion everyone seems to agree both can work, I think it is good to take the additional feedback and update to bring PyCapsule support here. This RFC proposes to update the convention to allow the __c_dlpack_exchange_api__ field to take PyCapsule (with name "dlpack_exchange_api").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions