A zero-dependency wrapper for easy NPU usage in Python on Windows.
Project description
Installation
pip install .
npu-easy has zero hard dependencies. It will install quickly without downloading large packages.
Usage Acceleration
To actually use NPU acceleration, you should install the appropriate ONNX Runtime version for your hardware:
- Intel:
pip install onnxruntime-openvino - AMD/Generic Windows:
pip install onnxruntime-directml - Qualcomm: Install
onnxruntimeand the QNN SDK.
Quick Start
Basic NPU Usage
from npu_easy import NPUModel
import numpy as np
# Automatically selects NPU if found
model = NPUModel("path/to/model.onnx")
results = model.run(np.random.randn(1, 10).astype(np.float32))
Bonus: Multi-Hardware Bonus Feature
Run on NPU, GPU, and CPU all at once!
from npu_easy import MultiRunner
multi = MultiRunner("path/to/model.onnx")
# Runs on all backends in parallel threads
all_results = multi.run_all(input_data)
Multi-Threading
Set the number of internal threads for the engine:
model = NPUModel("path/to/model.onnx", intra_op_num_threads=4)
Hardware Support
- Intel: via OpenVINO Execution Provider.
- AMD/NVIDIA/Integrated: via DirectML Execution Provider.
- Qualcomm: via QNN Execution Provider.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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 npu_easy-0.1.0.tar.gz.
File metadata
- Download URL: npu_easy-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9b4b50d34c119e38f7cb90cf5f1f5c66b3fb8b841975b96333f074e286b9eca
|
|
| MD5 |
71b1acafab33486248cc97cccacc8513
|
|
| BLAKE2b-256 |
b5def6e5fcb5740c0d5d9c805d1a6836e8ac659c46b7bc39dd1ec21108e4e4d4
|
Provenance
The following attestation bundles were made for npu_easy-0.1.0.tar.gz:
Publisher:
python-publish.yml on kai9987kai/npu_easy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
npu_easy-0.1.0.tar.gz -
Subject digest:
c9b4b50d34c119e38f7cb90cf5f1f5c66b3fb8b841975b96333f074e286b9eca - Sigstore transparency entry: 886021473
- Sigstore integration time:
-
Permalink:
kai9987kai/npu_easy@4d7e1f6764c5db88f3067cb54810afaa201ee601 -
Branch / Tag:
refs/tags/py-module - Owner: https://github.com/kai9987kai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4d7e1f6764c5db88f3067cb54810afaa201ee601 -
Trigger Event:
release
-
Statement type:
File details
Details for the file npu_easy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: npu_easy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c17f008b07ecb3b50aa69026cdba588bc5a08c9990491c5a1ac4ec62d97b75b9
|
|
| MD5 |
f4484036667b681e395cf758eae2c482
|
|
| BLAKE2b-256 |
6578691b2e91a28ae38d85f44f47bea1d10c301314c06ae4a38cf6e64b4a75d0
|
Provenance
The following attestation bundles were made for npu_easy-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on kai9987kai/npu_easy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
npu_easy-0.1.0-py3-none-any.whl -
Subject digest:
c17f008b07ecb3b50aa69026cdba588bc5a08c9990491c5a1ac4ec62d97b75b9 - Sigstore transparency entry: 886021507
- Sigstore integration time:
-
Permalink:
kai9987kai/npu_easy@4d7e1f6764c5db88f3067cb54810afaa201ee601 -
Branch / Tag:
refs/tags/py-module - Owner: https://github.com/kai9987kai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4d7e1f6764c5db88f3067cb54810afaa201ee601 -
Trigger Event:
release
-
Statement type: