Canaan Platforms#
List of supported platforms#
Few platforms from Canaan are supported, including:
Platform | Processor | Description | Status | Firmware | Tools version |
---|---|---|---|---|---|
Sipeed Maix M1 | Kendryte K210 | 32-bit RISC-V CPU and KPU | Supported | MaixPy 0.6.2 | NCC 0.2.0 |
Kendryte K210#
Installation#
Prerequisites#
To install NeurIO for Kendryte K210, you need to install the following tools:
NCC (NNCase from Canaan): a compiler for neural networks, transforming TFLite models to K210 compatible models. The link to the version 0.2.0 is “here”.
MaixPy: a Python interpreter for Kendryte K210. The link to the version 0.6.2 is “here”.
Instructions to install MaixPy on the Sipeed Maix M1 board are “here”.
Installation steps#
Download and install NNCase in neurio. Extract the zip file and copy the
ncc
executable to theneurio/converters/ncc
folder.Download the firmware from Sipeed.
Flash the MaixPy firmware on the Sipeed Maix M1 board.
Connect the Sipeed Maix M1 board to the computer.
Usage#
To use NeurIO and benchmark models on Kendryte K210, you need to connect the board to the computer and run the following command:
from neurio.devices.canaan import K210
model = ...
input_data = ...
port = "/dev/tty.someport" # port to which the device is connected
device = K210(port=port, log_dir=None)
device.prepare_for_inference(model=model)
predictions = device.predict(input_x=input_data, batch_size=2)
Execution process#
The execution process for K210 is as follows: