The C struct that keeps deep learning frameworks talking
DLPack defines a common in-memory tensor structure so deep learning frameworks can share operators and swap backends without duplicating work.

What it does DLPack is a stabilized C/C++ header that defines a common in-memory tensor structure. It acts as a bridge so deep learning frameworks can reuse each other’s tensors and operators instead of siloing data in their own formats. If you have ever wanted to pass a tensor from one framework to another without a tedious export-and-import ritual, this is the protocol doing that work under the hood.
The interesting bit The project deliberately avoids implementing any operators or tensor logic itself. Its entire value is in being boring, consensus-driven infrastructure—a shared Rosetta Stone for shape, dtype, and device metadata that lets frameworks collaborate on new hardware and swap BLAS backends.
Key highlights
- Deliberately minimal: no Tensor or Op implementations, only a common bridge
- Stabilized headers live in
include/; experiments stay incontrib/ - Major releases are ratified by community vote issues
- Enables mixing framework usage and wrapping vendor-level operators
- Allows quick swapping of backend implementations such as different BLAS versions
Caveats
- Not a user-facing tool; end users benefit only when frameworks adopt it
- The
contrib/directory is explicitly unstable and in progress
Verdict Framework maintainers and hardware vendors integrating new devices should care. If you build models inside a single framework and never peek over the fence, this is not your concern.
Frequently asked
- What is dmlc/dlpack?
- DLPack defines a common in-memory tensor structure so deep learning frameworks can share operators and swap backends without duplicating work.
- Is dlpack open source?
- Yes — dmlc/dlpack is open source, released under the Apache-2.0 license.
- What language is dlpack written in?
- dmlc/dlpack is primarily written in C++.
- How popular is dlpack?
- dmlc/dlpack has 1.2k stars on GitHub.
- Where can I find dlpack?
- dmlc/dlpack is on GitHub at https://github.com/dmlc/dlpack.