Skip to content
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

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

Open
egparedes opened this issue Apr 17, 2023 · 0 comments
Open

Comments

@egparedes
Copy link

egparedes commented Apr 17, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant