SiMa.ai (hereinafter referred to as SiMa) is a device with strengths in edge AI, rivaling the performance of Alpha Inc., a company that provides GPUs (graphics processing units). There are also voices expressing interest in actually using SiMa's MLSoC (Machine Learning System-on-Chip). In this article, we will introduce how to port a model that was running on Alpha Inc.'s GPU to SiMa and actually run it.
The transplant procedure is as follows:
Step-2: Preparation
Step 3: Environment setup
Step 4: Implementation
The results of this demo video are as follows:
Alpha company video
SiMa Video
Building the board and host machine environment for development and evaluation
We will introduce it in three pages.
1-2. Setting up the SiMa development kit
Next, update your SiMa board firmware and software to the latest versions.
First, check the current firmware version of your board:
* If SIMA_BUILD_VERSION is already 1.4.0_master_B1230, this step is not necessary and can be skipped.
Please connect via SSH in advance and execute the following command.
davinci:~$ cat /etc/build ----------------------- Build Configuration: | ----------------------- DISTRO = poky DISTRO_VERSION = 4.0.10 MACHINE = davinci DATE = 20240515 TIME = 073358 SIMA_BUILD_VERSION = 1.3.0_master_B1036 ----------------------- Layer Revisions: | ----------------------- meta = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-poky = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-yocto-bsp = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-simaai = master:c983aa4923bb4ae98a70b8f9ea7407fd574b68b1 -- modified meta-oe = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-python = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-networking = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-swupdate = kirkstone:d1d4abfaf82d37c31e3cec3602d6d8d56d105185
You can download the SiMa MLSoC image file from the Developer Portal, under "Firmware and Board Software Update", click "Downloading the SiMa MLSoC Images".
*You can view and download by registering on the Developer Portal on the SiMa website.
If you cannot view the site even after registering, please contact Shinko Shoji.
Click "Download Now" and a .tar file will be downloaded.
To unpack the .tar file you downloaded, run the following command in a separate terminal window:
sima-user@sima-user-machine:~$ cd Downloads/ sima-user@sima-user-machine:~/Downloads$ tar -xvf MLSoC1.4_Firmware.tar sima-user@sima-user-machine:~/Downloads$ cd MLSoC1.4_Firmware
To update the firmware, copy the tRoot file to the board. Run the following command:
sima-user@sima-user-machine:~/Downloads/MLSoC1.4_Firmware$ scp troot-upgrade-simaai-ev.swu sima@{Board IP Address}:/tmp sima@{Board IP Address}:'s password: troot-upgrade-simaai-ev.swu 100% 0 0.0KB/s 00:00
The password for the default SiMa user on the board is edgeai, so enter edgeai in the password field.
In the minicom window above, run the following command to update.
davinci:~$ cd /tmp davinci:/tmp$ sudo swupdate -v -H simaai-image-troot:1.0 -i /tmp/troot-upgrade-simaai-ev.swu SWUpdate v2023.05-dirty Licensed under GPLv2. See source distribution for detailed copyright notices. [TRACE] : SWUPDATE running : [print_registered_bootloaders] : Registered bootloaders: [TRACE] : SWUPDATE running : [print_registered_bootloaders] : uboot loaded. [INFO ] : SWUPDATE running : [main] : Using default bootloader interface: uboot [INFO ] : SWUPDATE running : [main] : Running on simaai-image-troot Revision 1.0 ... [INFO ] : SWUPDATE successful ! SWUPDATE successful ! [TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again ! [INFO ] : No SWUPDATE running : Waiting for requests... [INFO ] : SWUPDATE running : [endupdate] : SWUpdate was successful! [DEBUG] : SWUPDATE running : [postupdate] : Running Post-update command
Once you see the success message, reboot (power cycle) your board.
* It may take more than 10 minutes for the update to complete.
To update the Yocto Linux image as well as the firmware, copy the files to the board.
Please execute the following command.
sima-user@sima-user-machine:~/Downloads/MLSoC1.4_Firmware$ scp simaai-image-palette-upgrade-davinci.swu sima@{Board IP Address}:/tmp sima@{Board IP Address}:'s password:****** simaai-image-palette-upgrade-davinci.swu 100% 0 0.0KB/s 00:00
The password for the default SiMa user on the board is edgeai, so enter edgeai in the password field.
In the minicom window above, run the following command to update.
davinci:~$ cd /tmp davinci:/tmp$ sudo swupdate -v -H simaai-image-palette:1.0 -i /tmp/simaai-image-palette-upgrade-davinci.swu
It will automatically reboot after the update.
To check for updates, run the following command as above.
davinci:~$ cat /etc/build ----------------------- Build Configuration: | ----------------------- DISTRO = poky DISTRO_VERSION = 4.0.10 MACHINE = davinci DATE = 20240917 TIME = 210846 SIMA_BUILD_VERSION = 1.4.0_master_B1230 ----------------------- Layer Revisions: | ----------------------- meta = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-poky = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-yocto-bsp = kirkstone:1e6f147c686a91b9a5996f529e32ee1852f946b7 meta-simaai = master:6ebb42c489f4fc53d3fc6386689baa6dc3ae5c0f -- modified meta-oe = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-python = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-networking = kirkstone:f95484417e3d3e65ca15b460ba71dfd35773f0e4 meta-swupdate = kirkstone:d1d4abfaf82d37c31e3cec3602d6d8d56d105185
If the version is 1.4.0_master_B1230, it's OK.
In the next chapter, we will introduce how to set up the host machine environment.
Solution Technology Department 3
03-6361-8095Reception hours: Weekdays from 9:00am to 5:00pm