skillfed

torch-c-dlpack-ext

torch c dlpack ext

torch-c-dlpack-ext v0.1.5 4.8M downloads/30d#2,233 on PyPI
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) AGING released

What it is and what it does

torch-c-dlpack-ext is a compiled extension that accelerates DLPack tensor conversion for torch by providing an ahead-of-time compiled implementation of DLPack v1.2 support. By default, torch-dependent tools will JIT-compile this functionality on first load, which adds startup overhead and requires a compiler toolchain in the user environment. Installing this wheel lets you skip that JIT step entirely and use a pre-compiled version instead.

The package is narrowly scoped: it exists solely to optimize one specific operation (DLPack conversion) and avoid the friction of runtime compilation. It has no public API of its own—it works by providing a faster implementation that downstream libraries can detect and use automatically. If your workflow involves torch and libraries that use DLPack, this can reduce initialization time and eliminate compiler dependencies.

Use it for:

  • Speed up initialization of torch-based applications that use DLPack-compatible libraries.
  • Deploy torch models in environments where a C++ compiler toolchain is unavailable or undesirable.
  • Reduce startup latency in serverless or containerized torch inference pipelines.
  • Avoid JIT compilation failures in restricted or minimal Python environments.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides an ahead-of-time compiled module for faster DLPack v1.2 conversion with torch, avoiding JIT compilation overhead and compiler toolchain requirements.

Yes, if you use torch with DLPack-dependent libraries and want to eliminate JIT compilation overhead and compiler requirements. The package is permissively licensed and has no known vulnerabilities. However, maintenance is aging (last release 214 days ago), so verify compatibility with your specific torch and library versions before relying on it in production. If you don't use DLPack or have no performance concerns around initialization, it offers no benefit.

Install

torch-c-dlpack-ext on PyPI

pip

pip install torch-c-dlpack-ext

uv

uv add torch-c-dlpack-ext

poetry

poetry add torch-c-dlpack-ext

Installing torch-c-dlpack-ext

Before you install

Medium install friction due to platform-specific wheels across multiple architectures and Python versions. Maintenance status is aging—last release was 214 days ago—so expect limited active development.

License in practice

Apache License 2.0 is permissive; you can use this in commercial and private projects with minimal restrictions, provided you include license and copyright notices.

Quickstart

pip install torch-c-dlpack-ext

import torch_c_dlpack_ext
# Enables faster DLPack conversion when torch uses DLPack v1.2

Requires torch as a runtime dependency; Python >= 3.9; platform-specific wheel must be available for your architecture.

Verify before relying

  • Exact performance improvement over JIT-compiled fallback is not quantified in the fact sheet.
  • Whether this module is automatically used by torch or requires explicit configuration is unclear.
  • Compatibility with specific torch versions is not documented in the excerpt.
  • Which Python versions are actually supported beyond the wheel evidence (cp310, cp311, cp312, cp313, cp314).

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — torch
Maintenance aging — 214 days since the last release
First released
Downloads 4,777,053/month — #2,233 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: torch_c_dlpack_ext-0.1.5-cp310-cp310-macosx_14_0_arm64.whl; torch_c_dlpack_ext-0.1.5-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; torch_c_dlpack_ext-0.1.5-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; torch_c_dlpack_ext-0.1.5-cp310-cp310-win_amd64.whl; torch_c_dlpack_ext-0.1.5-cp311-cp311-macosx_14_0_arm64.whl; torch_c_dlpack_ext-0.1.5-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; torch_c_dlpack_ext-0.1.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; torch_c_dlpack_ext-0.1.5-cp311-cp311-win_amd64.whl; torch_c_dlpack_ext-0.1.5-cp312-cp312-macosx_14_0_arm64.whl; torch_c_dlpack_ext-0.1.5-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; torch_c_dlpack_ext-0.1.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; torch_c_dlpack_ext-0.1.5-cp312-cp312-win_amd64.whl; torch_c_dlpack_ext-0.1.5-cp313-cp313-macosx_14_0_arm64.whl; torch_c_dlpack_ext-0.1.5-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; torch_c_dlpack_ext-0.1.5-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; torch_c_dlpack_ext-0.1.5-cp313-cp313-win_amd64.whl; torch_c_dlpack_ext-0.1.5-cp314-cp314-macosx_14_0_arm64.whl; torch_c_dlpack_ext-0.1.5-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; torch_c_dlpack_ext-0.1.5-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; torch_c_dlpack_ext-0.1.5-cp314-cp314-win_amd64.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software License

Tags

dlpack conversion torchaot compiled dlpacktorch dlpack extensiondlpack v1.2 supportavoid jit compilation overhead
dlpack-interoptorch-extensionperformance-optimization

More Artificial Intelligence packages