dx-engine
Python bindings for the DEEPX Runtime (dx_rt). dx-engine exposes the
libdxrt inference stack to Python via a pybind11 extension so you can
load DEEPX-compiled models (.dxnn), run inference on DEEPX NPUs, inspect
device status, and collect profiling data from Python.
- Package name (PyPI / pip):
dx-engine - Import name:
dx_engine - Supported Python: 3.8 – 3.14
- Requires:
libdxrtruntime installed on the system (typically via thelibdxrt-binDebian package).
Installation
From PyPI
python -m pip install dx-engine
From a prebuilt wheel (recommended)
Wheels are shipped inside the libdxrt-bin Debian package under
/usr/share/libdxrt-bin/python/. Install the wheel whose cpXY tag
matches your Python version:
# 1. Install the system runtime
sudo dpkg -i libdxrt-bin_<version>_<arch>.deb
# 2. Install the matching wheel into your venv/interpreter
PYTAG=cp$(python -c 'import sys;print(f"{sys.version_info[0]}{sys.version_info[1]}")')
pip install /usr/share/libdxrt-bin/python/dx_engine-*-${PYTAG}-${PYTAG}-*.whl
sudo dpkg -i automatically installs the wheel that matches the system
python3 interpreter. Any user-owned venv must repeat the pip install
step because dpkg runs as root and cannot safely write into a venv.
From source
Build wheels for one or more Python versions using isolated uv-managed
venvs. See BUILD_WHEELS.md for the full procedure.
cd dx_rt/python_package
./build_all_wheels.sh # 3.8 – 3.14
./build_all_wheels.sh 3.12 # single version
Produced wheels are written to ./wheelhouse/.
Quick Start
import numpy as np
from dx_engine import InferenceEngine, InferenceOption
# 1. Load a compiled model
option = InferenceOption()
engine = InferenceEngine("model.dxnn", option)
# 2. Prepare inputs matching the model's expected shape/dtype
input_tensor = np.zeros(engine.get_input_shape(), dtype=np.float32)
# 3. Run inference
outputs = engine.run([input_tensor])
# 4. Inspect results
for i, out in enumerate(outputs):
print(f"output[{i}]: shape={out.shape}, dtype={out.dtype}")
Public API
Re-exported from dx_engine (src/dx_engine/__init__.py):
| Symbol | Purpose |
|---|---|
InferenceEngine |
Load a .dxnn model and run synchronous/asynchronous inference |
InferenceOption |
Runtime knobs applied when constructing an InferenceEngine |
Configuration |
Global runtime configuration (device selection, logging, ...) |
DeviceStatus |
Query NPU health, temperature, and utilization |
RuntimeEventDispatcher |
Subscribe to runtime events emitted by dx_rt |
Profiler, JobMetrics, TaskMetrics, NpuDeviceMetrics |
Collect and inspect per-job / per-task profiling data |
__version__ |
Package version (kept in sync with dx_rt/release.ver) |
Runtime Requirements
dx_engine links against libdxrt.so at import time. If you see
ImportError: libdxrt.so.<major>: cannot open shared object file, verify:
dpkg -l libdxrt-bin | grep ^ii
ldconfig -p | grep libdxrt.so
If the library is installed but not in the loader cache, run
sudo ldconfig once.
The libdxrt build linked at wheel build time and the one present at
runtime must share the same major version. Reinstall the matching wheel
whenever you upgrade libdxrt-bin.
Verify the Installation
python -c "import dx_engine; print(dx_engine.__version__)"
License
Proprietary — Copyright (C) 2018- DEEPX Ltd. All rights reserved.
This software is provided exclusively to customers supplied with a DEEPX
NPU. Unauthorized sharing or use is prohibited. See LICENSE
for the full terms; each wheel embeds the same file under
dx_engine-<ver>.dist-info/licenses/LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dx_engine-3.4.0-cp314-cp314-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp314-cp314-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a3ba5bf334a895c7e3cddbb15faf06981ddb92f399b1dfd9c5d1edf9e946aa1
|
|
| MD5 |
9b393115ff99283ddcdf239326fe525c
|
|
| BLAKE2b-256 |
00237b55ed878dd0413884acc5ea1d300c7e7f0dcdcb8295ce0faf584b79eaae
|
File details
Details for the file dx_engine-3.4.0-cp314-cp314-manylinux_2_27_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp314-cp314-manylinux_2_27_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a1338e117fbbd083b730d55ed9b252a9d283d4b31852e6445f2aefff04e1afc
|
|
| MD5 |
06b654a4f6d0fa47f3beaa237a17b8e4
|
|
| BLAKE2b-256 |
c71fa9bb5e038d23907872747bbd6734334c2f7f3897d400158782e9e156ce2e
|
File details
Details for the file dx_engine-3.4.0-cp313-cp313-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp313-cp313-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d36534a7c13f4d5f998812fff93507947a1223d519dbd2ccc1a502e60560a44b
|
|
| MD5 |
f7a84ae0ed4207acd171f3d3a6bbbf28
|
|
| BLAKE2b-256 |
435e437466e21a89157b79f893c026a5f58ee6398b00ec03b6da9c7d9939db8b
|
File details
Details for the file dx_engine-3.4.0-cp313-cp313-manylinux_2_27_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp313-cp313-manylinux_2_27_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fba746ed76fae0a2569af70c8e814d6c411c26b2adea9f13740bcaed420bc982
|
|
| MD5 |
b3601bd6966f07d0af59ee9fe64ce3da
|
|
| BLAKE2b-256 |
67ca58fa6a3b886f49b05a504f01aeed3dd81ddfda7766e0e94ea8c9fe9453e1
|
File details
Details for the file dx_engine-3.4.0-cp312-cp312-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp312-cp312-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6682dd22c7cd6ce41557b84404b515a6b115656458cd9ba13b91698077c032fa
|
|
| MD5 |
4af867eb36c56fc5961a1575281871b7
|
|
| BLAKE2b-256 |
53395997355aa3f0d75cb31642bfe65254b0469582e8f1044ac2689076e9214e
|
File details
Details for the file dx_engine-3.4.0-cp312-cp312-manylinux_2_27_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp312-cp312-manylinux_2_27_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a97e5e2df0f0ec9bd52dd6599e5460f76aafba9c2ea36872a3cd5a9624b09e5
|
|
| MD5 |
0088341911b31cd829cc2892394c2773
|
|
| BLAKE2b-256 |
6909ae93c0fa1a4b30a64767160c0d7689e0eebe1fc6beca9ee841388becc10b
|
File details
Details for the file dx_engine-3.4.0-cp311-cp311-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp311-cp311-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
161fde8428fc8aea95c560d878bc68e8d1c657c18a0eb04840de4bd212f3477f
|
|
| MD5 |
ebad7087efec0dc6c9fced256685a180
|
|
| BLAKE2b-256 |
b032d52b33d5b85f7d8565e3e2d153f19db6d506cd5504339f31c6553eae06c6
|
File details
Details for the file dx_engine-3.4.0-cp311-cp311-manylinux_2_27_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp311-cp311-manylinux_2_27_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec4188e0a598a164bc04312482f70159be1a3d888284dcf52746054138101ec7
|
|
| MD5 |
bd143f9b736fc2d5780400ca6f250adf
|
|
| BLAKE2b-256 |
de451ca593e1c4ed868618658e07adeffc1fb44b92655d1ba48a6c76942616ee
|
File details
Details for the file dx_engine-3.4.0-cp310-cp310-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp310-cp310-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
420324d60379c760fce47e205e46cfad0ef8d6b3bc8f53414099832beda7b906
|
|
| MD5 |
1bbd675f2d197a2842f91258a1d9f762
|
|
| BLAKE2b-256 |
991126117bf6e1b7429f2e05c5ccacffbb33eb3eac44eefb9a5cb31032d78877
|
File details
Details for the file dx_engine-3.4.0-cp310-cp310-manylinux_2_27_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp310-cp310-manylinux_2_27_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2863399dc9108b67d5b849fe8a3b417c34e19f61eccb01777f75106bd7a2dc1
|
|
| MD5 |
f040182d2ae601275c465a4a747b00a9
|
|
| BLAKE2b-256 |
43c9f94553e9875cf974b74f046dd83fca17e0938e09f9024f8ac05b2957af3f
|
File details
Details for the file dx_engine-3.4.0-cp39-cp39-manylinux_2_27_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp39-cp39-manylinux_2_27_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318bba5f9e159dfbcf4c6a71c21cba5c6b9f34a1db2417cdf775b4eaee2d31c0
|
|
| MD5 |
ff1a16322cb94e34a8ee10d1f4b76f84
|
|
| BLAKE2b-256 |
a91abe300b73faaea1cd9bbd7b1836b8e16098e1745f093cbda409e69a116ff8
|
File details
Details for the file dx_engine-3.4.0-cp39-cp39-manylinux_2_27_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp39-cp39-manylinux_2_27_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d6297d10fe46fac62ed5bef0e7425c1959e456069f93b30919635da15a2a482
|
|
| MD5 |
2422f937780ea9723dc822e3118328bf
|
|
| BLAKE2b-256 |
47dd73edf436a2d248d77f0174b17d3e10b111a9b10830cec5903195ddd36ed3
|
File details
Details for the file dx_engine-3.4.0-cp38-cp38-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp38-cp38-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 9.0 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b4529121c9b5e8c54e06f9f2831e549e15df8caf22259bb231afdc534faa2bb
|
|
| MD5 |
7745a516db5fe6ad83c50a932cc6696a
|
|
| BLAKE2b-256 |
fa2e4f0bbde9c5b8a0978a0644ee0690b241ed694d8c70adb7f1616e4f8c6055
|
File details
Details for the file dx_engine-3.4.0-cp38-cp38-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: dx_engine-3.4.0-cp38-cp38-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.8, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
034d9c4a35eca5dc4bd8a3ff1941caa585304faae56a1c31dce6955c5b7aa8e3
|
|
| MD5 |
b60c139543fe274220a3da82129a49a9
|
|
| BLAKE2b-256 |
94fc70cf0fcd230859fd038969c01e3fa37b8329466b4fc611aa22b8537d34a0
|