Write Model To Flash

Note: KneronDFUT supports 3 platforms - Windows 10 (x86_64 64-bit), Ubuntu 18.04 (x86_64 64-bit), and Raspberry Pi OS - Buster (armv7l 32-bit)

Note: If you are not using the 3 platforms, you may use the DFUT_console provided in Kneron PLUS. Please refer Build with DFUT_console

Note: Please use the latest version of KneronDFUT to avoid problems caused by incompatibility.

1. Introduction

The inference model must be loaded into Kneron AI device before the inference process.

There are two ways to load models:

Note: Only one model file (.nef) can be loaded, no matter it was uploaded via USB or loaded from flash. If you want to change the model, please reboot the Kneron AI device.

Note: Upload model via USB can be directly used without writing model into flash.


2. Download Kneron DFUT

Download the KneronDFUT_ubuntu.zip into Ubuntu from https://www.kneron.com/tw/support/developers/. It is located at Kneron PLUS section.

$ unzip KneronDFUT_ubuntu.zip
$ cd Kneron_DFUT/
$ chmod +x bin/KneronDFUT # optional

Show help message

$ sudo sh KneronDFUT.sh --help


3. Write Model Into KL520

3.1 Use GUI to Write Model into AI Device

$ sudo sh KneronDFUT.sh
  1. Select KL520 Tab.

  2. Select the KL520 devices to write model into.

  3. Select Update Model to Flash

  4. Manually choose Model file.

  5. Push Run button.

3.2 Use Command Line to Write Model into AI Device

  1. List all devices

    $ sudo sh KneronDFUT.sh --list
    ===========================================
    Index:          1
    Port Id:        133
    Kn Number:      0x270A265C
    Device Type:    KL520
    FW Type:        KDP
    Usb Speed:      High-Speed
    Connectable:    true
    ===========================================
  2. Write model into the selected KL520 devices using the port id

    $ sudo sh KneronDFUT.sh --model-to-flash ${MODEL_FILE_PATH} --port 133 -- type KL520
    Start Update Model to Device with Port Id 133
    
    ==== Update Model to Device with Port Id: 133 Succeeded ====

4. Write Model Into KL720

4.1 Use GUI to Write Model into AI Device

$ sudo sh KneronDFUT.sh
  1. Select KL720 Tab.

  2. Select the KL720 devices to write model into.

  3. Select Update Model to Flash

  4. Manually choose Model file.

  5. Push Run button.

4.2 Use Command Line to Write Model into AI Device

  1. List all devices

    $ sudo sh KneronDFUT.sh --list
    ===========================================
    Index:          1
    Port Id:        262
    Kn Number:      0x2004142C
    Device Type:    KL720
    FW Type:        KDP
    Usb Speed:      Super-Speed
    Connectable:    true
    ===========================================
  2. Write model into the selected KL720 devices using the port id

    $ sudo sh KneronDFUT.sh --model-to-flash ${MODEL_FILE_PATH} --port 262 --type KL720
    Start Update Model to Device with Port Id 262
    
    ==== Update Model to Device with Port Id: 262 Succeeded ====