ML Project MLEK Keyword Spotting - Build and Run on Arm Virtual Hardware FVP #196
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This YAML file is used to build and run an ML project on Arm Virtual Hardware FVP | |
# It contains a job that runs tests on a Ubuntu machine using a custom Docker image | |
name: ML Project MLEK Keyword Spotting - Build and Run on Arm Virtual Hardware FVP | |
on: | |
# Trigger the workflow when a workflow run is completed | |
workflow_run: | |
workflows: ["Licensed Docker Image - Build and Push"] | |
types: | |
- completed | |
# Trigger the workflow manually | |
workflow_dispatch: | |
jobs: | |
run_test: | |
runs-on: ubuntu-latest | |
container: | |
# Use the custom Docker image with the necessary tools and dependencies | |
image: ghcr.io/arm-software/avh-mlops/arm-mlops-docker-licensed:latest | |
credentials: | |
# Set the Docker image credentials using the actor and a GitHub token | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout repository | |
# Check out the repository containing the ML project | |
uses: actions/checkout@v2 | |
- name: Set permissions for working directory __w | |
# Set permissions for the working directory to avoid permission errors | |
run: chmod 777 -R /__w | |
- name: Install custom CMSIS packs | |
# Install custom CMSIS packs required for the ML project | |
run: | | |
wget -P /home/arm_mlops_docker https://github.com/ARM-software/CMSIS_6/releases/download/dev%2Fv6.0.0-dev35/ARM.CMSIS.6.0.0-dev35+geb1d42a.pack -nv | |
su -l arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cpackget add ARM.CMSIS.6.0.0-dev35+geb1d42a.pack --agree-embedded-license" | |
wget -P /home/arm_mlops_docker https://github.com/ARM-software/Cortex_DFP/releases/download/dev%2Fv1.0.0-dev15/ARM.Cortex_DFP.1.0.0-dev15+gf6802e4.pack -nv | |
su -l arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cpackget add ARM.Cortex_DFP.1.0.0-dev15+gf6802e4.pack --agree-embedded-license" | |
- name: Build Model and Test for Cortex-M4 with AC6 (size) / Corstone-300 for Community Edition | |
run: | | |
if [ -z "${{ secrets.ARM_UBL_LICENSE_IDENTIFIER }}" ]; then | |
su - arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cbuild /__w/AVH-MLOps/AVH-MLOps/mlek-kws/MLOps.csolution.yml --packs --context +CM55_Ethos --toolchain AC6" | |
else | |
su - arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/cbuild /__w/AVH-MLOps/AVH-MLOps/mlek-kws/MLOps.csolution.yml --packs --context +CM4 --toolchain AC6" | |
fi | |
- name: Execute Test Project on Arm Virtual Hardware FVP | |
run: | | |
if [ -z "${{ secrets.ARM_UBL_LICENSE_IDENTIFIER }}" ]; then | |
su - arm_mlops_docker -c "/home/arm_mlops_docker/avh-fvp-11.22.39/avh-linux-x86/bin/FVP_Corstone_SSE-300_Ethos-U55 -f /__w/AVH-MLOps/AVH-MLOps/mlek-kws/Target/CM55_Ethos/fvp_config.txt /__w/AVH-MLOps/AVH-MLOps/mlek-kws/out/ML_Test/CM55_Ethos/size/ML_Test.axf -C ethosu.num_macs=256 -Q 1 --simlimit 12" | |
else | |
su - arm_mlops_docker -c "/home/arm_mlops_docker/avh-fvp-11.22.39/avh-linux-x86/bin/FVP_MPS2_Cortex-M4 -f /__w/AVH-MLOps/AVH-MLOps/TFLmicrospeech/Target/CM4/fvp_config.txt /__w/AVH-MLOps/AVH-MLOps/mlek-kws/out/ML_Test/CM4/size/ML_Test.axf -Q 1 --simlimit 12" | |
fi | |
- name: Get timings from Event Recorder Log | |
run: | | |
su - arm_mlops_docker -c "/home/arm_mlops_docker/cmsis-toolbox-linux-amd64/bin/eventlist -s ./EventRecorder.log" |