Chen Tianqi:Python API of memory tensor structure DLPack is here
Xinzhiyuan 2021-02-28 14:25:22
[New Zhiyuan Guide] DLPack is an open memory tensor structure , used to share tensors between frameworks , Recently, developer Chen Tianqi updated social media to introduce in detail the addition of Contents of the Python API, semantics, and implementation details.
Do you know DLPack :
Deep learning practitioners will more or less understand ,Deep learning frameworks such as Tensorflow and PyTorch, Provides a powerful toolbox for rapid prototyping and model deployment for deep learning.
But ,unfortunately,their ease of use often comes at the cost of fragmentation:
they are limited to Use each framework individually ,if the frameworks are vertically integrated,then the development flow can work for common use cases,but in reality,breaking the box can be very tricky.
One workaround is to , directly pass tensors from one frame to another in memory, without any data duplication or copying.
And DLPack,is an intermediate memory representation standard for tensor data structures,It is an open memory tensor structure,for sharing between frameworks tensor.
It provides a simple, portable memory data structure :
DLPack enables :
in deep learning framework Operators can be shared more easily between operators.
Easier to wrap vendor-level operator implementation , Allows for collaboration when new devices/operations are introduced.
Fast exchange backend implementation , such as different versions of BLAS
For end users , this can bring more operator , and can be mixed between frameworks.
Download address:
https://gitee.com/mirrors/DLPack
In addition,DLPack developer It is not intended to implement Tensor and Ops, but to use it as a common bridge to reuse tensors and operations across frameworks.
In addition,Recently,DLPack developer Chen Tianqi updated a Git ,titled:”Add Python API, semantics and implementation details for DLPack” , where the details of the addition are discussed, and what to reference from DLPack itself.
At the same time,Chen Tianqi also plans to import some documents into DLPack,Currently,DLPack does not have any documentation about Python-level API.
Interested friends can go to the following address to take a look
https://github.com/data-apis/consortium-feedback/issues/1