[Request] Update PyPI package with interfaces defined in dlpack.py · Issue #125 · dmlc/dlpack · GitHub
Skip to content

[Request] Update PyPI package with interfaces defined in dlpack.py #125

Open

Description

@egparedes

Currently a dlpack distribution package exists in PyPI (https://pypi.org/project/dlpack/) pointing to this repo, but it is just an empty package. At the same time, this repo contains a sample implementation of the dlpack interface in pure Python using ctypes (https://github.com/dmlc/dlpack/blob/main/apps/numpy_dlpack/dlpack/dlpack.py) which seems quite useful on its own. For example, it could be used for adding preliminary dlpack support to other Python frameworks, and for simple prototyping and experimentation purposes (it seems there are already copies of this code in several GitHub repositories).

I would like to suggest to update the PyPI package with the contents of dlpack.py. The other Python files in the repo (from_numpy.py, to_numpy.py) don't need to be included since they only implement a particular example of how to use the defined interfaces with NumPy. Additionally, the ctypes definition of the deleter function could be added as an alias Deleter_CFUNTYPE = ctypes.CFUNCTYPE(None, ctypes.c_void_p) for easy of use, although it is not strictly required.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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