Welcome to DLPack’s documentation!

Purpose

In order for an ndarray system to interact with a variety of frameworks, a stable in-memory data structure is needed.

DLPack is one such data structure that allows exchange between major frameworks. It is developed with inputs from many deep learning system core developers. Highlights include:

  • Minimum and stable: simple header

  • Designed for cross hardware: CPU, CUDA, OpenCL, Vulkan, Metal, VPI, ROCm, WebGPU, Hexagon

  • Already a standard with wide community adoption and support:

  • Clean C ABI compatible.

    • Means you can create and access it from any language.

    • It is also essential for building JIT and AOT compilers to support these data types.

Scope

The main design rationale of DLPack is the minimalism. DLPack drops the consideration of allocator, device API and focus on the minimum data structure. While still considering the need for cross hardware support (e.g. the data field is opaque for platforms that does not support normal addressing).

It also simplifies some of the design to remove legacy issues (e.g. everything assumes to be row major, strides can be used to support other case, and avoid the complexity to consider more layouts).

Roadmap

DLPack Documentation

Indices and tables