Open OhadRubin opened 4 years ago
FYI, CuPy already supports it for a while: https://docs-cupy.chainer.org/en/latest/reference/interoperability.html#dlpack
I'm generally supportive, and I'd be happy to consider a patch/PR. Writing one shouldn't be super hard.
I would like to help implement dlpack for pycuda. Can you help point me to what function I should write and it's reference from other lib @inducer ?
Is there a canonical Python wrapper for dlpack? If so, you'd just need to import that and fill it with data from a GPUArray
(or fill a GPUArray
with data from one).
DLPack is a community effort to define a common tensor data structure that could be shared by different frameworks. Currently, Pytorch and MXNet have adopted this interface, and Tensorflow is the progress of adopting it. Using DLPack can benefit many projects in the ecosystem. So it will be really great if PyCUDA can also adopt this interface to help new ideas derived from the mainstream tensor-based frameworks. Related: https://github.com/tensorflow/tensorflow/issues/24453