An empirical record of compiling and validating AI models for the DEEPX DX-M1 NPU (M.2 module form factor), produced by Squarelight. The goal of this repository is to document a reproducible, software-only workflow for taking standard ONNX models through the official DEEPX toolchain to a DX-M1-targeted binary, and to establish a CPU reference baseline for the same models.
Scope & honesty note. No physical DX-M1 NPU was attached during this run. Everything here is software: the DEEPX DX-COM compiler (which runs on a host CPU) produces the DX-M1
.dxnnbinaries, and ONNX Runtime on CPU provides the functional/latency reference that a real DX-M1 deployment would be validated against. The.dxnnartifacts are genuine DX-M1 target binaries; the latency numbers in this repo are CPU reference numbers, not NPU numbers.
- Installed the official DX-COM 2.3.0 compiler wheel from DEEPX
(
sdk.deepx.ai) in a cleanlinux/amd64Ubuntu 22.04 container. The compiler self-reportsTarget Hardware: M1. - Downloaded three sample ONNX models + a 100-image INT8 calibration set from the DEEPX DX ModelZoo.
- Compiled all three models to DX-M1
.dxnnbinaries with post-training INT8 quantization and calibration — full compiler logs captured. - Ran each original ONNX graph through ONNX Runtime (CPU) to capture a latency/throughput and output-signature reference baseline.
| Model | Task | ONNX → DXNN | NPU / CPU groups | Compile time | CPU ref latency (mean) | CPU ref throughput |
|---|---|---|---|---|---|---|
| MobileNetV2-1 | Classification | 13 MB → 7 MB | 1 / 0 (full NPU) | 19 s | 4.41 ms | 226.8 fps |
| YOLOV5S-1 | Object detection | 27 MB → 15 MB | 1 / 1 | 218 s | 77.0 ms | 13.0 fps |
| YOLOV5S_Face-1 | Face detection | 30 MB → 16 MB | 1 / 1 | 229 s | 85.3 ms | 11.7 fps |
Key observations from the compiler:
- INT8 quantization roughly halves model size (e.g. MobileNetV2 13 MB → 7 MB).
- MobileNetV2 maps entirely to the NPU (0 CPU groups); DX-COM even fuses
preprocessing (
Div(255)+Normalize) into the NPU graph. - YOLOv5s models partition into an NPU group (backbone/neck) plus a single CPU group (detection head) — the expected split for these architectures.
- Compile times are inflated here because the
linux/amd64compiler runs under QEMU emulation on an Apple Silicon host; on native x86_64 they are much lower.
Machine-readable results: results/summary.json.
.
├── README.md
├── scripts/
│ ├── run_pipeline.sh # end-to-end reproduction (compile + reference)
│ ├── reference_inference.py # ONNX Runtime CPU benchmark harness
│ └── clean_log.py # collapses tqdm/progress noise in captured logs
├── logs/
│ ├── 01_install_dxcom.log # DX-COM 2.3.0 install (Target Hardware: M1)
│ ├── 02_download_models.log # sample ONNX model download
│ ├── 03_download_calibration.log
│ ├── 04_dxm1_compile.clean.log # DX-M1 compilation (readable)
│ ├── 05_cpu_reference_inference.clean.log
│ └── 06_environment.log # toolchain/version fingerprint
└── results/
├── summary.json
├── cpu_reference_inference.json
└── dxnn/ # compiled DX-M1 binaries + per-model compiler.log
├── MobileNetV2-1/MobileNetV2-1.dxnn
├── YOLOV5S-1/YOLOV5S-1.dxnn
└── YOLOV5S_Face-1/YOLOV5S_Face-1.dxnn
Requires an x86_64 Linux host (or emulated container) with ≥16 GB RAM available to the process — DX-COM enforces a 15 GB memory floor.
# from a clean Ubuntu 22.04 amd64 container
apt-get update && apt-get install -y python3-venv git curl \
libgl1-mesa-glx libglib2.0-0
./scripts/run_pipeline.shThe script installs DX-COM, pulls the sample models + calibration set, compiles
each to .dxnn, and runs the CPU reference benchmark.
The DEEPX DX-M1 is an edge/on-device AI accelerator delivered in an M.2 module
that plugs into a host over PCIe. It has no cloud "inference-as-a-service"
API — inference runs on the physical module via the DX-RT runtime. This repo
therefore uses the two paths that do work without hardware: the DX-COM
compiler (host-side) and a CPU reference for functional comparison. Validating
the compiled .dxnn binaries on real silicon is the natural next step once a
DX-M1 module is available.
- DX-COM compiler 2.3.0 — https://github.com/DEEPX-AI/dx-compiler
- DX-RT runtime — https://github.com/DEEPX-AI/dx_rt
- DX ModelZoo sample models & calibration data — https://sdk.deepx.ai/
- ONNX Runtime 1.23.2 (CPU execution provider)
All logs in this repository are captures of actual runs. Latency figures are ONNX Runtime CPU references, not DX-M1 NPU measurements.