# dmlc/dlpack

common in-memory tensor structure

Repository: https://github.com/dmlc/dlpack
Canonical: https://ross.abutalabs.com/products/dlpack
Homepage: https://dmlc.github.io/dlpack/latest
Language: C++
License: Apache-2.0
License Family: permissive
Topics: tensor, operator, deep-learning
Last push: 2026-08-11T23:59:21+00:00

## Health v2 (maintenance only)
Score: 66/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 8, longevity 100
- inputs: {"age_days": 3477, "days_push": 22, "days_rel": 723, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1242, forks 168 (observed 2026-08-28T04:04:06.524860+00:00)

## What it is
DLPack is a minimal, stable open in-memory tensor structure defined as a single C ABI header, enabling zero-copy tensor exchange between deep learning frameworks and array libraries. It is a widely adopted standard supported by NumPy, PyTorch, TensorFlow, JAX, CuPy, TVM, and others across CPU, CUDA, ROCm, Vulkan, Metal, and WebGPU devices.

## Use cases
- share tensors between pytorch and tensorflow without copying
- wrap vendor gpu operator libraries in a framework-agnostic way
- exchange ndarrays between numpy and cupy across devices
- build a compiler backend that consumes tensors from any framework
- swap blas or tensor backend implementations at runtime
- expose a c-compatible tensor interface from another language

## When to choose
- you need zero-copy tensor interchange between frameworks or languages
- you target multiple hardware backends (cuda, rocm, vulkan, metal, webgpu)
- you want a minimal, stable, allocator-free C ABI standard with wide adoption

## When to avoid
- you need a full tensor library with ops and allocators - dlpack deliberately provides neither
- you need rich layout features beyond row-major with strides, or reference-counted ownership semantics beyond its scope

## Facets
- artifact type: library
- maturity: stable
- function: serialization, sdk
- domain: deep-learning, machine-learning, gpu-computing, developer-tools
- platform: cpp, cross-platform, python
- tags: tensor-interoperability, c-abi, header-only, zero-copy, array-exchange, gpu

## Member repositories
- dmlc/dlpack (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:06.524860+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:08:24.372141+00:00, confidence not recorded.
  - readme: https://github.com/dmlc/dlpack (fetched 2026-08-28T04:04:06.524860+00:00, sha a205367779a4)
  - homepage: https://dmlc.github.io/dlpack/latest (fetched 2026-08-29T12:20:07.387025+00:00, sha 4b24765a13c4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
