Skip to main content

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 onnxruntime and 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npu_easy-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npu_easy-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for npu_easy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c9b4b50d34c119e38f7cb90cf5f1f5c66b3fb8b841975b96333f074e286b9eca
MD5 71b1acafab33486248cc97cccacc8513
BLAKE2b-256 b5def6e5fcb5740c0d5d9c805d1a6836e8ac659c46b7bc39dd1ec21108e4e4d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for npu_easy-0.1.0.tar.gz:

Publisher: python-publish.yml on kai9987kai/npu_easy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for npu_easy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c17f008b07ecb3b50aa69026cdba588bc5a08c9990491c5a1ac4ec62d97b75b9
MD5 f4484036667b681e395cf758eae2c482
BLAKE2b-256 6578691b2e91a28ae38d85f44f47bea1d10c301314c06ae4a38cf6e64b4a75d0

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page