MPK Tool
The MPK tool is a set of commands used by the Palette CLI engine to allow users to build, deploy, and manage applications on the SiMa.ai devices of all form factors. The applications are packaged and deployed in a bundle called an MPK.
The MPK commands allow the developer to communicate and manage the MLSoC device (for example, the Developer Board in the SiMa Development Kit). The commands are the same whether the device is connected over Ethernet or PCIe.
However, in PCIe mode, you must include the slot number as shown below, -s
being your slot number.
sima-user@docker-image-id:/home# mpk device connect -s 0
Device Connectivity using mpk
The MPK tool allows for persistent device connection which provides the ability to auto- reconnect to the MLSoC device upon reboot.
Note
The Palette SDK polls the device for 125 seconds post disconnect. If the device does not reconnect in 125 seconds, the device will be permanently disconnected.
Check the device connectivity status using the mpk device list
command.
If the connection status is cli-agent-down
or offline
, even after 125 seconds, you must manually disconnect and re-connect to the device.
sima-user@docker-image-id:/home$ mpk device list Active Connections over Ethernet ┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓ ┃ Status ┃ Status Details ┃ Target ┃ Username ┃ Device ┃ Jump Server ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩ │ 🔴 │ Cli-agent-down │ 10.42.0.231 │ sima │ diet_danger │ - │ └────────┴────────────────┴─────────────────┴──────────┴─────────────┴─────────────┘ sima-user@docker-image-id:/home$ mpk device list Active Connections over Ethernet ┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓ ┃ Status ┃ Status Details ┃ Target ┃ Username ┃ Device ┃ Jump Server ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩ │ 🔴 │ Offline │ 10.42.0.231 │ sima │ diet_danger │ - │ └────────┴────────────────┴─────────────────┴──────────┴─────────────┴─────────────┘ sima-user@docker-image-id:/home$ mpk device disconnect -t sima@10.42.0.231 ℹ Disconnecting 10.42.0.231... ‼ 10.42.0.231 is not connected for sima. sima-user@docker-image-id:/home$ mpk device connect -t sima@10.42.0.231 ℹ Please enter the password for 10.42.0.231 🔐 : ℹ Connecting to sima@10.42.0.231... ✔ Connection established to 10.42.0.231 . sima-user@docker-image-id:/home$ mpk device list Active Connections over Ethernet ┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓ ┃ Status ┃ Status Details ┃ Target ┃ Username ┃ Device ┃ Jump Server ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩ │ 🟢 │ Online │ 10.42.0.231 │ sima │ base_topple │ - │ └────────┴────────────────┴─────────────────┴──────────┴─────────────┴─────────────┘ ❕ There are no PCIe devices available.
mpk device
The mpk device
command is used for device provisioning. This command lets you connect and
disconnect the MLSoC Developer Board from your host machine. To connect and disconnect,
you will need the MLSoC Developer Board username and IP/hostname.
mpk device -h
lists the supported commands as shown below:sima-user@docker-image-id:/home# mpk device -h usage: mpk device [-h] {connect,disconnect,list,reboot} ... Device Connectivity options: -h, --help show this help message and exit sub-commands: {connect,disconnect,list,reboot} connect Connect to the device disconnect Disconnect from the device list List the connected devices reboot Reboot the device
mpk device connect
is used to connect to the MLSoC Developer Board:sima-user@docker-image-id:/home# mpk device connect -h usage: mpk device connect [-h] [-t TARGET] [-u USER] [-p PASSWORD] [-d DEVICE] [-slot PCIE_SLOT] options: -h, --help show this help message and exit -t TARGET, --target TARGET target device ip or fqdn -u USER, --user USER username -p PASSWORD, --password PASSWORD password -d DEVICE, --device DEVICE device id -slot PCIE_SLOT, --slot-number PCIE_SLOT Slot number of the PCIe Soc to connect to sima-user@docker-image-id:/home# mpk device connect -t sima@10.42.0.231 🔗 Connection established to 10.42.0.231 .
mpk device connect
uses SSH. For the SSH connection you must have the username/password and the IP address of the device.For the PCIe board, you must connect using the following command:
sima-user@docker-image-id:/home# mpk device connect -s 0
-s being your slot number.
mpk device list
lists the devices (MLSoC Developer Board) already connected, if you do not have available connections:sima-user@docker-image-id:/home# mpk device list ❕ There are no active Ethernet connections. ❕ There are no active PCIe connections.
If there are connections available:
sima-user@docker-image-id:/home# mpk device list Active Connections over Ethernet ┏━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━┓ ┃ Status ┃ Target ┃ Username ┃ Device ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━┩ │ 🟢 │ 10.42.0.231 │ sima │ fault_satisfy │ └────────┴─────────────┴──────────┴───────────────┘ ❕ There are no active PCIe connections.
Note
mpk device list
correctly displays the current device status with red/green indicators (green: active, red: offline).
mpk device disconnect
is used to disconnect from the device:sima-user@docker-image-id:/home# mpk device disconnect -h usage: mpk device disconnect [-h] [-t TARGET] [-u USER] [-d DEVICE] [-slot PCIE_SLOT] options: -h, --help show this help message and exit -t TARGET, --target TARGET target device ip or fqdn -u USER, --user USER username -d DEVICE, --device DEVICE device id -slot PCIE_SLOT, --slot-number PCIE_SLOT Slot number of the PCIe Soc to connect to sima-user@docker-image-id:/home# mpk device disconnect -t sima@10.42.0.231 ✔ 10.42.0.231 successfully disconnected for user sima !
mpk device reboot
is used to reboot the device:sima-user@docker-image-id:/home# mpk device reboot -h usage: mpk device reboot [-h] [-t TARGET] [-d DEVICE] options: -h, --help show this help message and exit -t TARGET, --target TARGET target device ip or fqdn -d DEVICE, --device DEVICE device id
sima-user@docker-image-id:/home# mpk device reboot -t 10.42.0.231 ℹ Rebooting 10.42.0.231, please wait ℹ 10.42.0.231 is rebooted.
More Options
You have the ability to specify the username using the -u
option and assign a name to the device as shown below. Once assigned, use the device name in the commands.
sima-user@docker-image-id:/home# mpk device connect -t 10.42.0.231 -u sima -d my_device ℹ Please enter the password for 10.42.0.231 🔐 : 🔗 Connection established to 10.42.0.231 . sima-user@docker-image-id:/home# mpk device list Active Connections over Ethernet ┏━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┓ ┃ Status ┃ Target ┃ Username ┃ Device ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━┩ │ 🟢 │ 10.42.0.231 │ sima │ my_device │ └────────┴─────────────┴──────────┴───────────┘ ❕ There are no active PCIe connections. sima-user@docker-image-id:/home# mpk device disconnect -d my_device ℹ Disconnecting User: sima from Target: 10.42.0.231 ✔ 10.42.0.231 successfully disconnected for user sima !
mpk create
The mpk create
command is used for creating an mpk package from the source directory of your
application which can then be deployed on the MLSoC Developer Board.
Note
For the mpk create
command, do not use the slot number when connected over PCIe.
sima-user@docker-image-id:/home# mpk create -h
usage: mpk create [-h] [-d OUTPUT_DIR] [-s INPUT_DIR]
options:
-h, --help show this help message and exit
-d OUTPUT_DIR, --dir OUTPUT_DIR
folder to be used for mpk creation
-s INPUT_DIR, --src INPUT_DIR
folder where project sources are located
sima-user@docker-image-id:/home# cd /usr/local/simaai/app_zoo/Gstreamer/PeopleTracker/
sima-user@docker-image-id:/usr/local/simaai/app_zoo/Gstreamer/PeopleTracker# ls
application.json build core plugins README.md resources
sima-user@docker-image-id:/usr/local/simaai/app_zoo/Gstreamer/PeopleTracker# mpk create -d . -s .
ℹ Step COMPILE completed successfully.
ℹ Step COPY RESOURCE completed successfully
ℹ Step RPM BUILD completed successfully.
ℹ Successfully created MPK at '/usr/local/simaai/app_zoo/Gstreamer/PeopleTracker/project.mpk'
sima-user@docker-image-id:/usr/local/simaai/app_zoo/Gstreamer/PeopleTracker# ls
application.json build core plugins project.mpk README.md resources
mpk deploy
The mpk deploy
command is used for deploying the application to the MLSoC Developer Board.
This command will install and launch the pipeline application on the MLSoC Developer Board.
The target device can be mentioned either using option -t (ip address) or -d (device name) as shown
below. If you do not specify the target device, then it will be deployed to the last connected device.
sima-user@docker-image-id:/home# mpk deploy -h usage: mpk deploy [-h] [-f FILE] [-t TARGET] [-d DEVICE] [-slot PCIE_SLOT] [--set-default] options: -h, --help show this help message and exit -f FILE, --file FILE mpk file to be deployed to device -t TARGET, --target TARGET fqdn or ip of devkit onto which to deploy mpk -d DEVICE, --device DEVICE device id/tag of devkit onto which to deploy mpk -slot PCIE_SLOT, --slot-number PCIE_SLOT slot number of PCIe devkit onto which to deploy mpk --set-default set the current application as default one so that it runs at board boot sima-user@docker-image-id:/home# mpk deploy -f /usr/local/simaai/app_zoo/Gstreamer/PeopleTracker/project.mpk -t 10.42.0.231 -d my_device 🚀 Sending MPK to 10.42.0.231... Transfer Progress for project.mpk: 100.00% 🏁 MPK sent successfully! ✔ MPK Deployment is successful for project.mpk
The MPK CLI Engine lets you deploy an application as the default application which runs automatically when the device boots up.
For example, use the --set-default
argument to make PeopleTracker the default pipeline which starts when you boot up the device.
mpk launch
When deploying an application, the SDK installs the application on the device and automatically
launches it. If an application is then killed, or the device is rebooted and the --set-default
flag
was not used, you can relaunch an application by using the mpk launch
command, without having to redeploy it (reinstall and launch).
Assuming that an application was previously deployed (using mpk deploy
) you can relaunch an
application by:
sima-user@docker-image-id:/home# mpk launch -h usage: mpk launch [-h] [-a APP] [-t TARGET] [-d DEVICE] [-slot PCIE_SLOT] options: -h, --help show this help message and exit -a APP, --application APP name of the previously deployed mpk -t TARGET, --target TARGET fqdn or ip of devkit onto which to deploy mpk -d DEVICE, --device DEVICE device id/tag of devkit onto which to deploy mpk -slot PCIE_SLOT, --slot-number PCIE_SLOT Slot number of the PCIe Soc to upgrade sima-user@docker-image-id:/home# mpk launch -t 10.42.0.231 -d my_device -a com.sima.awesome_app ℹ Launching mpk deployment on 10.42.0.231 with application_name: com.sima.awesome_app. ✔ MPK with id: peopletracker_Pipeline is successfully launched on 10.42.0.231 🚀
You can check if the pipeline has launched successfully using the mpk list
command.
This command launches the application on the device. Use this command if the application has
already been deployed on the device and has not been removed from the device.
mpk list
The mpk list
command lists the deployed MPKs.
sima-user@docker-image-id:/home# mpk list Active MPK deployments ┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓ ┃ mpk_id ┃ file ┃ application_name ┃ Target ┃ Time ┃ Status ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩ │ peopletracker_Pipeline │ project.mpk │ com.sima.awesome_app │ 10.42.0.231 │ 01/02/2024 06:08 PM │ active │ └────────────────────────┴─────────────┴──────────────────────┴─────────────┴─────────────────────┴────────┘ ‼ No MPKs deployed for PCIe
mpk kill
The mpk kill
command is used to kill the MPK application on the MLSoC Developer Board, that is,
it stops the application from running on the device. For PCIe mode, use -slot 0
.
sima-user@docker-image-id:/home# mpk kill -h usage: mpk kill [-h] [-i MPK_ID] options: -h, --help show this help message and exit -i MPK_ID, --id MPK_ID id of mpk deployment to be killed. In case an id isn't provided, it will kill the latest active deployment sima-user@docker-image-id:/home# mpk kill -i peopletracker_Pipeline ℹ killing mpk with peopletracker_Pipeline on 10.42.0.231 ✔ MPK with id: peopletracker_Pipeline is successfully killed on 10.42.0.231 💀
mpk remove
The mpk remove
command allows you to remove a previously deployed MPK application.
For PCIe mode, add slot -0
.
sima-user@docker-image-id:/home# mpk remove -h usage: mpk remove [-h] [-a APP] [-t TARGET] [-d DEVICE] [-slot PCIE_SLOT] options: -h, --help show this help message and exit -a APP, --application APP name of the previously deployed mpk -t TARGET, --target TARGET fqdn or ip of devkit onto which to deploy mpk -d DEVICE, --device DEVICE device id/tag of devkit onto which to deploy mpk -slot PCIE_SLOT, --slot-number PCIE_SLOT Slot number of the PCIe Soc to upgrade sima-user@docker-image-id:/home# mpk remove -t 10.42.0.231 -d my_device -a com.sima.awesome_app ℹ Removing mpk deployment on 10.42.0.231 with application_name: com.sima.awesome_app. ✔ Successfully removed mpk deployment with application_name: com.sima.awesome_app and id: peopletracker_Pipeline on target: 10.42.0.231
The mpk remove
command kills the deployed pipeline and removes all application-installed data. To verify that the application was successfully removed, run the command below:
Check for the deployed application using the
mpk list
command.Check that the directory
/usr/local/simaai/*
does not contain any package data for the application that was removed.
mpk firmware-upgrade
The mpk firmware-upgrade
command lets users wirelessly (Over-the-Air) upgrade
the firmware on the MLSoC devices using the Palette CLI. The upgrade tool updates
the media on which device is booted. Supported boot media are EMMC or SDCard images.
The firmware update process is independent of how the host machine is connected
to the MLSoC board.
sima-user@docker-image-id:/home# mpk firmware-upgrade -h usage: mpk firmware-upgrade [-h] [-f FILE] [-t TARGET] [-slot PCIE_SLOT] [-d DEVICE] [--reboot-on-upgrade] options: -h, --help show this help message and exit -f FILE, --file FILE Software Update file -t TARGET, --target TARGET fqdn or ip of devkit to upgrade -slot PCIE_SLOT, --slot-number PCIE_SLOT Slot number of the PCIe Soc to upgrade -d DEVICE, --device DEVICE device id/tag of devkit to upgrade --reboot-on-upgrade reboot the device on upgrade
Prerequisites
Latest SDK installed on the host machine.
Device flashed and booted with the last release or the working build.
Device connected to host over (Ethernet or PCIe). Ensure you are connected to the device by pinging it or SSH into it.
.swu
package for firmware to upgrade on the device.
Steps
Copy the
.swu
package to Docker or place it in yourworkspace
directory.sima-user@sima-user-machine:~$ sima-user@sima-user-machine:~$ cd Downloads/MLSoC1.1_Firmware sima-user@sima-user-machine:~/Downloads/MLSoC1.1_Firmware$ cp simaai-image-palette-upgrade-davinci.swu ~/workspace
On the Docker container run
mpk device connect
.sima-user@docker-image-id:/home# mpk device connect -t <BOARD_IP_ADDRESS> -u <USER> -d my_device ℹ Please enter the password for 10.42.0.231 🔐 : ℹ Connecting to sima@10.42.0.231... ✔ Connection established to 10.42.0.231 . sima-user@docker-image-id:/home# mpk device list Active Connections over Ethernet ┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━┓ ┃ Status ┃ Status Details ┃ Target ┃ Username ┃ Device ┃ Jump Server ┃ ┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━┩ │ 🟢 │ Online │ 10.42.0.231 │ sima │ my_device │ - │ └────────┴────────────────┴─────────────┴──────────┴───────────┴─────────────┘ ❕ There are no PCIe devices available.
Run the firmware-upgrade command from the CLI:
sima-user@docker-image-id:/home# mpk firmware-upgrade -h usage: mpk firmware-upgrade [-h] [-f FILE] [-t TARGET] [-slot PCIE_SLOT] [-d DEVICE] [--reboot-on-upgrade] options: -h, --help show this help message and exit -f FILE, --file FILE Software Update file -t TARGET, --target TARGET fqdn or ip of devkit to upgrade -slot PCIE_SLOT, --slot-number PCIE_SLOT Slot number of the PCIe Soc to upgrade -d DEVICE, --device DEVICE device id/tag of devkit to upgrade --reboot-on-upgrade reboot the device on upgrade sima-user@docker-image-id:/home# mpk firmware-upgrade -f /home/docker/sima-cli/simaai-image-palette-upgrade-davinci.swu -d my_device Sending software upgrade file to 10.42.0.231... Transfer Progress for simaai-image-palette-upgrade-davinci.swu: 100.00% ❕ Extracting details from the upgrade file, please wait... ❕ Extracted details from the upgrade file. 🚀 Upgrading 10.42.0.231 from 1.2.0_develop_B885 to 1.4.0_master_B1230, please wait... ✔ Device Upgraded! ━━━━━━━━━━━━━━━━ Installing update.sh... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing simaai-image-palette-davinci.ext4.gz... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing u-boot.bin... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing Image... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing davinci-combo-board.dtb... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing davinci-dual-m2.dtb... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing davinci-hhhl.dtb... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing boot.scr.uimg... ━━━━━━━━━━━━━━━━ 100% 0:00:00 Installing update.sh... ━━━━━━━━━━━━━━━━ 100% 0:00:00 ✔ Successfully upgraded 10.42.0.231 to 1.4.0_master_B1230 ❔ Reboot the device? [y/n]: y ℹ Rebooting 10.42.0.231, please wait ℹ 10.42.0.231 is rebooted. Waiting for device to come back online... ━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 ℹ Device is back online ✔ Sevices started. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 ℹ Verifying build details on the board, thank you for your patience... ✔ Device 10.42.0.231 was successfully upgraded to 1.4.0_master_B1230! ℹ You can continue to use the device now.
Verify that the device was successfully upgraded to the latest build version by running:
cat /etc/build
.sima-user@docker-image-id:/home# ssh sima@<BOARD_IP_ADDRESS> The authenticity of host '10.42.0.231 (10.42.0.231)' can't be established. ED25519 key fingerprint is SHA256:mTD8tqYTR/NrmVcE0pyMaVGYXpbkgJ4iJppskpDL3yM. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.42.0.231' (ED25519) to the list of known hosts. sima@10.42.0.231's password: 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
mpk pe for Performance Estimation
The Performance Estimator (PE) is a utility in the Palette software that lets you start and stop the performance analysis of your GStreamer pipelines by using the command, mpk pe
.
The Performance Estimator will generate .json files in /tmp/PerformanceEstimator_*
. It also starts the local server with the current Performance Estimator content and the
user can visualize data in their browser.
Note
The Performance Estimator tool only reports Tracer data from plugins.
In the Performance Estimator tool, the user must create an mpk using the
--gst-app
option. For example,mpk create -s . -d . --gst-app
Follow the commands described below when using the Performance Estimator.
mpk pe -h
lists the supported commands as shown below.sima-user@docker-image-id:/home$ mpk pe -h usage: mpk pe [-h] {start,stop} ... Performance Estimator Note: Performance Estimator and Dynamic KPI collection are only functional when the MPK is created using the mpk create --gst-app option and then deployed. Please ensure you create the MPK with this option, deploy it, and then run mpk pe start. options: -h, --help show this help message and exit sub-commands: {start,stop} start Start Performance Estimator in dynamic or static mode. stop Stop Performance Estimator. usage: mpk pe --help
mpk pe start
is used to start performance analysis of the pipeline running on the MLSoC Developer Board. Before executingmpk pe start
, make sure the pipeline is running on the MLSoC board.sima-user@docker-image-id:/home# mpk pe start -h usage: mpk pe start [-h] [-f FILE] [-i ID] [--period PERIOD] [-t TARGET] [-d DEVICE] [--count COUNT] options: -h, --help show this help message and exit -f FILE, --file FILE mpk file to be deployed to device. -i ID, --id ID id of the deployed pipeline. --period PERIOD period of time to collect the kpis. -t TARGET, --target TARGET IP address/FQDN of the device. -d DEVICE, --device DEVICE Name of the device. --count COUNT Number of Collated Json files to be collected for the period. sima-user@docker-image-id:/home# mpk list Active MPK deployments ┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓ ┃ mpk_id ┃ file ┃ application_name ┃ Target ┃ Time ┃ Status ┃ ┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩ │ yolov7_Pipeline │ project.mpk │ com.sima.awesome_app │ 192.168.135.242 │ 05/08/2024 02:35 AM │ active │ └─────────────────┴─────────────┴──────────────────────┴─────────────────┴─────────────────────┴────────┘ ‼ No MPKs deployed for PCIe sima-user@docker-image-id:/home# mpk pe start -i yolov7_Pipeline -t 192.168.135.242 --count 35 ℹ Starting Dynamic Performance Estimator for pipeline: yolov7_Pipeline on device: 192.168.135.242. 🚀 Dynamic Performance estimator can be accessed at: http://localhost/getDynamicKPI?directoryPath=/tmp/PerformanceEstimator_b61cfced72d943cebce4f1dae917801c sima-user@docker-image-id:/home#
mpk pe stop
is used to stop performance analysis of a pipeline running on the MLSoC Developer Board.sima-user@docker-image-id:/home# mpk pe stop -h usage: mpk pe stop [-h] [-f FILE] [-i ID] [-t TARGET] [-d DEVICE] options: -h, --help show this help message and exit -f FILE, --file FILE mpk file to be deployed to device. -i ID, --id ID id of the deployed pipeline. -t TARGET, --target TARGET IP address/FQDN of the device. -d DEVICE, --device DEVICE Name of the device. sima-user@docker-image-id:/home# mpk pe stop -i yolov7_Pipeline -t 192.168.135.242 ✔ Stopped Performance estimator for yolov7_Pipeline on 192.168.135.242. sima-user@docker-image-id:/home#
To interpret data open a .json file from
/tmp/PerformanceEstimator_*
in your editor. You can view data for each frame for all three processing units (CVU, APU and MLA) and the plugins that are executed to compute on that processing unit.sima-user@docker-image-id:/tmp/PerformanceEstimator_b61cfced72d943cebce4f1dae917801c$ ls -ltr total 13364 -rw-r--r-- 1 sima-user sima-user 312967 Aug 5 02:36 yolov7_Pipeline_1722843378.json -rw-r--r-- 1 sima-user sima-user 391186 Aug 5 02:36 yolov7_Pipeline_1722843383.json sima-user@docker-image-id:/tmp/PerformanceEstimator_b61cfced72d943cebce4f1dae917801c$ cat yolov7_Pipeline_1722843378.json | head -n200 { "pipeline_id":"yolov7_Pipeline", "timestamp":"2024-08-05T07:36:17Z", "num_frames":80, "period":5, "data":[ { "frame_id":1207, "pipeline_id":"yolov7_Pipeline", "plugins":[ { "frame_id":1207, "kpis":{ "dma_BW":{ ... ... "frame_id":1208, "pipeline_id":"yolov7_Pipeline", "plugins":[ {
To visualize performance data in a browser, click the link which was generated when the
mpk pe start
command executed successfully. See the output in the browser as shown below. To further analyze data, zoom in or put your cursor on the specific processing unit data as shown in screenshots below.

