XMOS AI Tools
Project description
XMOS AI Tools
Usage
xformer
from xmos_ai_tools import xformer as xf
xf.convert("source model path", "converted model path", params=None)
where params
is a dictionary of compiler flags and paramters and their values.
For example:
from xmos_ai_tools import xformer as xf
xf.convert("example_int8_model.tflite", "xcore_optimised_example_int8_model.tflite", {
"mlir-disable-threading": None,
"xcore-reduce-memory": None,
})
To see all available parameters, call
from xmos_ai_tools import xformer as xf
xf.print_help()
This will print all options available to pass to xformer. To see hidden options, run print_help(show_hidden=True)
xinterpreters
from xmos_ai_tools.xinterpreters import xcore_tflm_host_interpreter
from xmos_ai_tools.xinterpreters import xcore_tflm_usb_interpreter
from xmos_ai_tools.xinterpreters import xcore_tflm_spi_interpreter
ie = xcore_tflm_host_interpreter()
ie.set_model(model_path = xcore_model, model_index = 0, secondary_memory = False, flash = False)
#secondary_memory and flash arguments ignored on xcore_tflm_host_interpreter
ie.set_input_tensor(data = input, input_index = 0, model_index = 0)
ie.invoke()
xformer_outputs = []
for i in range(num_of_outputs):
xformer_outputs.append(ie.get_output_tensor(output_index = i, model_index = 0))
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for xmos_ai_tools-0.1.8-py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 740e019e1ead0b2f8be794211532c6c6782ac419c2b0f387ace09f943d68832a |
|
MD5 | b8473362f0cc47e82ff0e3490ac2380d |
|
BLAKE2b-256 | 9e32777ca542eb2debd5bf64014f25e2bb0dd4742bc9dc059094dd511415d707 |
Close
Hashes for xmos_ai_tools-0.1.8-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 572962b20726baed4aed27e7c13cddc434266d8bedddc0563c7672dfc5d6916c |
|
MD5 | 533160b1aff1cbe7cb762d0227f86886 |
|
BLAKE2b-256 | 1c9728c9537a3eda3f98aab697e6a3db1f70c11e9271afb1532e741ade2f458d |
Close
Hashes for xmos_ai_tools-0.1.8-py3-none-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 684734c1e3a5213d17379c769b94f476e0df76765b851d1399936ca161b1226e |
|
MD5 | e6c807429bfdc0e78204123543283266 |
|
BLAKE2b-256 | b848d6736f6b42ed50316aff206dd9f170294a6574d100b31c57c8ee5986d46f |
Close
Hashes for xmos_ai_tools-0.1.8-py3-none-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5991bd5e239883fe7b468bce88aa8941f5e01b4c2c7cd084ed3019a8d887fd |
|
MD5 | 9ad8eaf8f828e4b7739c36daf7efb1b3 |
|
BLAKE2b-256 | 00bb9e66420de5c41647e22ccc3e5f201dc0a9214cd956b513384d521a7b39ca |