Metadata-Version: 2.4
Name: dx-com
Version: 2.3.0
Summary: DXCOM Package
Author-email: Jangmin Son <jangmin@deepx.co.kr>
Project-URL: Homepage, https://gh.deepx.ai/deepx/dx_com.git
Project-URL: Bug Tracker, https://gh.deepx.ai/deepx/dx_com/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Requires-Python: <3.13,>=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mypy
Requires-Dist: pybind11~=2.13.1
Requires-Dist: numpy>=1.24.4
Requires-Dist: onnx>=1.16.1
Requires-Dist: onnxruntime>=1.18.0
Requires-Dist: opencv-python>=4.10.0.84
Requires-Dist: protobuf>=5.26.0
Requires-Dist: Pillow>=10.4.0
Requires-Dist: tqdm
Requires-Dist: scipy>=1.10.1
Requires-Dist: torch>=2.3.0
Requires-Dist: pycryptodome~=3.20.0
Requires-Dist: ordered_set~=4.1.0
Requires-Dist: sortedcontainers~=2.4.0
Requires-Dist: cloudpickle~=3.1.1
Requires-Dist: Rtree~=1.3.0
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Requires-Dist: pytest-datadir>=1.5.0; extra == "test"
Requires-Dist: onnxscript; extra == "test"


# DXCOM

DXCOM is a compiler SDK by [DeepX](https://www.deepx.ai) that compiles ONNX models into optimized `.dxnn` binaries for DeepX NPU (Neural Processing Unit).

It performs hardware-aware quantization, graph optimization, and code generation — all in a single pipeline. The compiled `.dxnn` file can be deployed and executed on DeepX NPU via [DX-RT](https://github.com/DEEPX-AI/dx_rt) (DeepX Runtime).

## Installation

```bash
pip install dx-com
```

> **Requirements:** Python 3.8 – 3.12, Linux (x86_64)

## Quick Start

### CLI

```bash
dxcom -m model.onnx -c config.json -o output/
```

| Argument | Description |
|----------|-------------|
| `-m` | Path to the ONNX model file |
| `-c` | Path to the JSON configuration file |
| `-o` | Output directory for compiled artifacts |
| `--opt_level` | Optimization level: `0` (fast) or `1` (higher accuracy, default) |
| `--gen_log` | Generate a compilation log |
| `-v` | Show version |

### Python API

```python
import dx_com

dx_com.compile(
    model="model.onnx",
    config="config.json",
    output_dir="output/",
    opt_level=1,
)
```

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `str` | Path to the ONNX model file |
| `config` | `str` | Path to the JSON configuration file |
| `output_dir` | `str` | Output directory for compiled artifacts |
| `opt_level` | `int` | Optimization level: `0` (fast) or `1` (higher accuracy). Default: `1` |
| `calibration_method` | `str` | Calibration method. Options: `minmax`, `percentile`, `mse`, `entropy` |
| `aggressive_partitioning` | `bool` | Enable aggressive CPU/NPU partitioning. Default: `False` |

## Documentation

For detailed technical documentation and user manual, visit [DeepX Developer Portal](https://developer.deepx.ai/).

## License

This software is the proprietary property of DEEPX Ltd. and is provided exclusively to authorized customers with DeepX NPU hardware. See [LICENSE](LICENSE) for details.

