Open abdulasiraj opened 1 year ago
Thank you for your suggestion. May I know if paddle.utils.dlpack.from_dlpack(dlpack)
and paddle.utils.dlpack.from_dlpack(dlpack)
can meet this requirement?
Hi @zhangting2020,
Thanks for your response. from_dlpack
and to_dlpack
are legacy functions now. All frameworks are now implementing __dlpack__
and __dlpack_device__
dunders for their Tensors. It can be seen here:
https://dmlc.github.io/dlpack/latest/python_spec.html
https://data-apis.org/array-api/latest/API_specification/generated/array_api.array.__dlpack__.html
Also numpy doesn't support PyCapsules https://github.com/numpy/numpy/issues/24575
需求描述 Feature Description
Right now, paddle only produce and consume PyCapsules. However, dealing with raw capsules is outdated. Also, numpy doesn't supports PyCapsules. It's better if paddle tensors also support
__dlpack__
and__dlpack_devce__
dunders.替代实现 Alternatives
No response