Skip to main content

Runtime library for Mobilint NPUs

Project description

Mobilint SDK qb Runtime Library : qbruntime

qbruntime is runtime library for Mobilint NPU products. Runtime Library is required to run inference on Mobilint NPUs using precompiled or custom models.

IMPORTANT: Please refer to official documentation for installing driver before using runtime library.

Prerequisites

Currently, pip installation is limited to below Ubuntu environments. For other environment, please refer to official documentation.

  • Ubuntu: 20.04 / 22.04 / 24.04
  • Python: 3.8 / 3.9 / 3.10 / 3.11 / 3.12
  • numpy

Installation

You may install python runtime library with following command

pip install mobilint-qb-runtime

For C++ library installation or downloading library from mobilint distribution site, please refer to official documentation.

Inference process

Running inference on Mobilint's NPU using the qbruntime runtime library involves four essential steps:

  1. Initialize the NPU device.
  2. Load the compiled model (MXQ file).
  3. Upload model to the NPU device.
  4. Run inference with user input.

Step 1: Accelerator

The Accelerator object represents the NPU device to be used. It abstracts a single device identified by the number appended to the device name (e.g., /dev/aries0 -> acc1, /dev/aries2 -> acc2). If no specific number is provided, NPU device 0 is used by default.

acc = qbruntime.Accelerator(0)

Step 2: Model

The Model object represents a model contained in an MXQ file. Upon creation, it immediately reads the MXQ file and stores the relevant information.

model = qbruntime.Model(MXQ_FILE_PATH)

Step 3: Pass Model information to the Accelerator

Pass the information with the {doxylink}mobilint::Model::launch(Accelerator & acc) method of Model object. It then uses the Accelerator object to run inference using this model.

Step 4: Run inference using passed Model information and input data

Get the input data and run inference using the mobilint::Model::infer() method of Model object.

model = qbruntime.Model(MXQ_FILE_PATH)
result = model.infer([INPUT])

Inference Scenario

## Python example
import qbruntime

MXQ_PATH = "path/to/mxq.mxq"

acc = qbruntime.Accelerator()               ## Step 1
model = qbruntime.Model(MXQ_PATH)           ## Step 2
model.launch(acc)                           ## Step 3

## Some preprocessing for input data

result = model.infer(preprocessed_input)    ## Step 4

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mobilint_qb_runtime-1.0.0-cp312-cp312-win_amd64.whl (887.9 kB view details)

Uploaded CPython 3.12Windows x86-64

mobilint_qb_runtime-1.0.0-cp312-cp312-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.31+ x86-64

mobilint_qb_runtime-1.0.0-cp311-cp311-win_amd64.whl (887.0 kB view details)

Uploaded CPython 3.11Windows x86-64

mobilint_qb_runtime-1.0.0-cp311-cp311-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.31+ x86-64

mobilint_qb_runtime-1.0.0-cp310-cp310-win_amd64.whl (885.7 kB view details)

Uploaded CPython 3.10Windows x86-64

mobilint_qb_runtime-1.0.0-cp310-cp310-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.31+ x86-64

mobilint_qb_runtime-1.0.0-cp39-cp39-win_amd64.whl (901.6 kB view details)

Uploaded CPython 3.9Windows x86-64

mobilint_qb_runtime-1.0.0-cp39-cp39-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ x86-64

mobilint_qb_runtime-1.0.0-cp38-cp38-win_amd64.whl (885.3 kB view details)

Uploaded CPython 3.8Windows x86-64

mobilint_qb_runtime-1.0.0-cp38-cp38-manylinux_2_31_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.31+ x86-64

File details

Details for the file mobilint_qb_runtime-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6d6b716f510f77e4fab02763867c9185e905aa1211146050432d5db3e6f9cc32
MD5 c21e8cb08c81d644c5983f104293fda2
BLAKE2b-256 bde20aa0da2dfd16a3aa4063ba7390eefe3b1a216375a115ae1654c7c531f929

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp312-cp312-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp312-cp312-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 ca1ab1568b3f30dbbe600f6a3d60453bd99a4264e46d5b88676df0df86a3cc2e
MD5 329c5e493169a128238d1acf4210b745
BLAKE2b-256 99e800a1e2615c2f2a69a8c5485bd763a81ac8ab5cc9c197613c6b7f17a5d875

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6bd96c7b64d10ee5f1cd4211287229f7cf8bc911fd6838781b9b31c5776211b0
MD5 2050e215cfe6dec032e2872c00695d60
BLAKE2b-256 a7d7db5902fd58cb478141ddd52bc10264d65822a620218648b6154cdfff2afb

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp311-cp311-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp311-cp311-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 20c0c74bb8858743024557e44ce980029edc536e08dae143af2c203e1c43fead
MD5 cd1da41ce2bc5fd0a7abdbbbb8f00df5
BLAKE2b-256 5fdd9b878a5c529fbd8c2d3602f2f4360ee7e4f9d4ccd832cdbf708843cc7130

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 55ea01257f79d4bb679734ac1eb876449a5e47d3f13b59e85aec0b41bcf6fd7a
MD5 5935083964e40de391e5ef26b8114e6a
BLAKE2b-256 18122b6a42f6a121968bfaa6710b5441abbfa0bd2c3a1aac3ab23f59660cb88e

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp310-cp310-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp310-cp310-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 821cf0fa1b9ecbdb76b1a5e3496f1bfca3ae00d8778ddacba45fcfa51ef3b02e
MD5 65ca7b394a27c135f48264b36f207ffd
BLAKE2b-256 80af8f830cfa941e9ff0b2b71500f84ec8afc27adc364e5a96496aa90fa9b897

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cd9c5c0f7f358b4fe49e3620a2a3ca4618165de2b6c2f2dc08127fd61fe533f8
MD5 d4cd9996abb2fead239b238b7765c069
BLAKE2b-256 c652ca27f65aeb0ff6ea8d68c84ffb58872036ba4dc6ca1e44d337741b96b992

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp39-cp39-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp39-cp39-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 4a9a4260278a6bde6ac736b3dc0838da45a8e71f5930f87bd2ffd1218c2fdad1
MD5 7e432d6b95626b90834a654849dcfad5
BLAKE2b-256 4cd222b628c0641ecfeee6ed1a9a4a0878ad10ba587593811337a85785fd7293

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 bff0d3c12fe14be1fd94214c62bf21df3941f66c423662001f07a3e01c4d64ab
MD5 190e07365fcecaf6fb4c18f405e4a9fa
BLAKE2b-256 2afd2ead999a23dc4ab9a72796fe6e6b27a227ef6b5cdb8c4010f22a54b9a2d2

See more details on using hashes here.

File details

Details for the file mobilint_qb_runtime-1.0.0-cp38-cp38-manylinux_2_31_x86_64.whl.

File metadata

File hashes

Hashes for mobilint_qb_runtime-1.0.0-cp38-cp38-manylinux_2_31_x86_64.whl
Algorithm Hash digest
SHA256 85507ff3604d826cd0c3a8d5f59dcdbe2e62e638daea71b7575c3e87ebda0519
MD5 53e2fb722256f20e47777cc94540b4a6
BLAKE2b-256 f4c298752caaca27556ea01e9c490e54d36a647e01812256944e252c0757a395

See more details on using hashes here.

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