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: :ref:`simple header ` * Designed for cross hardware: CPU, CUDA, OpenCL, Vulkan, Metal, VPI, ROCm, WebGPU, Hexagon * Already a standard with wide community adoption and support: * `NumPy `_ * `CuPy `_ * `PyTorch `_ * `Tensorflow `_ * `MXNet `_ * `TVM `_ * `mpi4py `_ * 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 ~~~~~~~ * C API that could be exposed as a new Python attribute ``__dlpack_info__`` for returning API and ABI versions. (see `#34 `_, `#72 `_) * Clarify alignment requirements. (see `data-apis/array-api#293 `_, `numpy/numpy#20338 `_, `data-apis/array-api#293 (comment) `_) * Adding support for boolean data type (see `#75 `_) * Adding a read-only flag (ABI break) or making it a hard requirement in the spec that imported arrays should be treated as read-only. (see `data-apis/consortium-feedback#1 (comment) `_, `data-apis/array-api#191 `_) * Standardize C interface for stream exchange. (see `#74 `_, `#65 `_) DLPack Documentation ~~~~~~~~~~~~~~~~~~~~ .. toctree:: :maxdepth: 2 c_api python_spec Indices and tables ================== * :ref:`genindex` * :ref:`search`