Skip to content

Commit 6714219

Browse files
2 parents 08f943b + 4f3d804 commit 6714219

File tree

4 files changed

+121
-53
lines changed

4 files changed

+121
-53
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
workflow_dispatch:
77
inputs:
88
revision:
9-
description: 'mlplatform revision'
9+
description: 'mlplatform revision'
1010
required: true
1111
default: '22.02'
1212
candidate_rev:
1313
description: 'Release candidate revision'
1414
required: false
15-
default: ''
15+
default: ''
1616

1717
run-name: mlplatform.org revision ${{ inputs.revision }} to pack ${{ inputs.revision }}${{ inputs.candidate_rev }} by @${{ github.actor }}
1818

@@ -49,6 +49,7 @@ jobs:
4949
- name: Get history of releases from github
5050
run:
5151
python3 ./tensorflow-pack/tensorflow-build/get_releases.py ${{ secrets.GITHUB_TOKEN }} > ./tensorflow-pack/tensorflow-build/history.txt
52+
cat ./tensorflow-pack/tensorflow-build/history.txt
5253

5354
- name: Run the pack build with the revision specified
5455
run :
@@ -58,23 +59,41 @@ jobs:
5859
# run :
5960
# cp ${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/build/*.pack ${{ github.workspace }}/out/
6061

62+
- name: Show content of ${{ github.workspace }}/tensorflow-pack/out/* folder after bulding the tensorflow-pack
63+
run: |
64+
tree ${{ github.workspace }}/tensorflow-pack/out/
65+
6166
- name: Run the 3rdparty pack build with the revision specified
6267
run : |
6368
export PATH=$PATH:${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/utilities
6469
./tensorflow-pack/3rdparty-build/build_r.sh ${{ github.event.inputs.revision }} ${{ github.event.inputs.candidate_rev }}
6570
71+
- name: Show content of ${{ github.workspace }}/tensorflow-pack/out/* folder after bulding the 3rd party pack
72+
run: |
73+
tree ${{ github.workspace }}/tensorflow-pack/out/
74+
6675
- name: Copy packs to out path
6776
run :
6877
cp ${{ github.workspace }}/tensorflow-pack/out/*.pack ${{ github.workspace }}/out/
69-
78+
79+
- name: Show all available pdsc files
80+
working-directory: ${{ github.workspace }}/tensorflow-pack/
81+
run :
82+
tree --prune -P '*.pdsc'
83+
7084
- name: Get all generated PDSC files for artifact upload
71-
run :
72-
find ${{ github.workspace }}/tensorflow-pack/ -name '*.pdsc' -exec cp -prv '{}' '${{ github.workspace }}/out/' ';'
85+
run : |
86+
find ${{ github.workspace }}/tensorflow-pack/3rdparty-build/ -name '*.pdsc' -exec cp -prv '{}' '${{ github.workspace }}/out/' ';'
87+
find ${{ github.workspace }}/tensorflow-pack/tensorflow-build/gen/ -name '*.pdsc' -exec cp -prv '{}' '${{ github.workspace }}/out/' ';'
7388
7489
- name: Upload Pack
7590
uses: actions/upload-artifact@v3
7691
with:
7792
name: tensorflow-pack-release
7893
path: ${{ github.workspace }}/out
7994

80-
95+
- name: Cache artifact
96+
uses: actions/cache@v3
97+
with:
98+
path: ${{ github.workspace }}/out
99+
key: latest-tensorflow-pack-build

.github/workflows/tests_avh.yml

Lines changed: 94 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,101 @@
1-
name: Test CI using Arm Virtual Hardware
2-
3-
# Controls when the action will run.
1+
name: AVH build and execution test
42
on:
5-
workflow_run:
6-
workflows: ["Release CI"]
7-
types:
8-
- completed
3+
workflow_dispatch:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
schedule:
9+
- cron: '00 20 * * 6'
910

10-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1111
jobs:
12-
# This workflow contains a single job called "build"
13-
test-tensorflow:
14-
# The type of runner that the job will run on
12+
AVH:
13+
strategy:
14+
15+
matrix:
16+
target: [
17+
{proj: kws, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
18+
{proj: kws, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, uart: mps3_board.uart0},
19+
{proj: kws, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, uart: mps3_board.uart0},
20+
{proj: kws, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
21+
{proj: kws, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
22+
{proj: kws, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, uart: mps3_board.uart0},
23+
{proj: object-detection, board: AVH-SSE-300, model: FVP_Corstone_SSE-300, uart: mps3_board.uart0},
24+
{proj: object-detection, board: AVH-SSE-300-U55, model: FVP_Corstone_SSE-300_Ethos-U55, uart: mps3_board.uart0},
25+
{proj: object-detection, board: AVH-SSE-300-U65, model: FVP_Corstone_SSE-300_Ethos-U65, uart: mps3_board.uart0},
26+
{proj: object-detection, board: AVH-SSE-310, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
27+
{proj: object-detection, board: AVH-SSE-310-U55, model: FVP_Corstone_SSE-310, uart: mps3_board.uart0},
28+
{proj: object-detection, board: AVH-SSE-310-U65, model: FVP_Corstone_SSE-310_Ethos-U65, uart: mps3_board.uart0}
29+
]
30+
31+
fail-fast: false
32+
1533
runs-on: ubuntu-latest
1634

17-
# Steps represent a sequence of tasks that will be executed as part of the job
1835
steps:
36+
- name: Checkout repo
37+
uses: actions/checkout@v4
38+
with:
39+
repository: Arm-Examples/mlek-cmsis-pack-examples
40+
41+
- name: Restore Latest Pack Build from Cache
42+
uses: actions/cache@v3
43+
with:
44+
path: ${{ github.workspace }}/out
45+
key: latest-tensorflow-pack-build
46+
47+
- name: Install tools
48+
uses: ARM-software/cmsis-actions/vcpkg@v1
49+
with:
50+
config: ".ci/vcpkg-configuration.json"
51+
52+
- name: Activate Arm tool license
53+
uses: ARM-software/cmsis-actions/armlm@v1
54+
55+
- name: Unpack and Install Packs
56+
run:
57+
cd ${{ github.workspace }}/out && cpackget add -a *.pack
58+
59+
- name: Diagnosis show directory structure
60+
run:
61+
tree -d
62+
63+
- name: Diagnosis where *.yml files are locacted
64+
run:
65+
tree --prune -P '*.yml'
66+
67+
- name: Show content of mlek.csolution.yml before patch
68+
run: |
69+
cat mlek.csolution.yml
70+
71+
- name: Patch the csolution to use the latest CMSIS and tensorflow packs
72+
run: |
73+
sed -i 's/\(tensorflow::[^@]*\)@[^ ]*/\1/g' mlek.csolution.yml
74+
75+
- name: Show content of mlek.csolution.yml after patch
76+
run: |
77+
cat mlek.csolution.yml
78+
79+
- name: Build project ${{ matrix.target.proj }} for target ${{ matrix.target.board }} with AC6
80+
run: |
81+
cbuild mlek.csolution.yml --update-rte --packs --context ${{ matrix.target.proj }}+${{ matrix.target.board }}
82+
83+
- name: Execute project ${{ matrix.target.proj }}, target ${{ matrix.target.board }}, build Release on AVH ${{ matrix.target.model }}
84+
if: always()
85+
run: |
86+
${{ matrix.target.model }} \
87+
-a ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/${{ matrix.target.proj }}.axf \
88+
-f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
89+
-C ${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log \
90+
--simlimit 60 --stat
91+
cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Release/fvp_stdout.log
1992
20-
- name: Checkout tensorflow-build
21-
uses: actions/checkout@v2
22-
with:
23-
repository: MDK-Packs/tensorflow-pack
24-
path: tensorflow-pack
25-
26-
- name: Download artifacts from Release CI
27-
uses: actions/download-artifact@v3
28-
with:
29-
name: tensorflow-pack-release
30-
path: tensorflow-pack/tensorflow-test-ng/packs
31-
32-
- name: Run unit tests on AVH@AWS
33-
env:
34-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
35-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
36-
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
37-
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET }}
38-
AWS_IAM_PROFILE: ${{ secrets.AWS_IAM_PROFILE }}
39-
AWS_SECURITY_GROUP_ID: ${{ secrets.AWS_EC2_SECURITY_GROUP_ID }}
40-
AWS_SUBNET_ID: ${{ secrets.AWS_SUBNET_ID }}
41-
42-
run: |
43-
./tensorflow-pack/tensorflow-test-ng/test_r.sh
44-
pip install git+https://github.com/ARM-software/avhclient.git@v0.1
45-
mkdir ${{ github.workspace }}/tensorflow-pack/tensorflow-test-ng/out/
46-
cp ${{ github.workspace }}/out/*.pack ${{ github.workspace }}/tensorflow-pack/tensorflow-test-ng/out/
47-
avhclient -b aws execute --specfile tensorflow-pack/tensorflow-test-ng/avh.yml
48-
ls tensorflow-pack/tensorflow-test-ng/test_results.db
49-
50-
- name: Upload Test Reports
51-
uses: actions/upload-artifact@v3
52-
with:
53-
path: ${{ github.workspace }}/tensorflow-pack/**/test_results.*
93+
- name: Execute project ${{ matrix.target.proj }}, target ${{ matrix.target.board }}, build Debug on AVH ${{ matrix.target.model }}
94+
if: always()
95+
run: |
96+
${{ matrix.target.model }} \
97+
-a ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/${{ matrix.target.proj }}.axf \
98+
-f ./FVP/${{ matrix.target.model }}/fvp_config.txt \
99+
-C ${{ matrix.target.uart }}.out_file=./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log \
100+
--simlimit 60 --stat
101+
cat ./out/${{ matrix.target.proj }}/${{ matrix.target.board }}/Debug/fvp_stdout.log
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 5403fc9100a8764fe9b587fdbd310287eb2abd01

tensorflow-build/patches/24.08/patch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ grep -v 'static_vector_test.cc' ./tensorflow-pack/tensorflow-build/srcs.ethos_u.
3030
grep -v 'span_test.cc' ./tensorflow-pack/tensorflow-build/srcs.ethos_u.lst > temp && mv temp ./tensorflow-pack/tensorflow-build/srcs.ethos_u.lst
3131
grep -v 'static_vector.h' ./tensorflow-pack/tensorflow-build/srcs.lst > temp && mv temp ./tensorflow-pack/tensorflow-build/srcs.lst
3232
grep -v 'static_vector_test.cc' ./tensorflow-pack/tensorflow-build/srcs.lst > temp && mv temp ./tensorflow-pack/tensorflow-build/srcs.lst
33-
grep -v 'span_test.cc' ./tensorflow-pack/tensorflow-build/srcs.lst > temp && mv temp ./tensorflow-pack/tensorflow-build/srcs.lst
33+
grep -v 'span_test.cc' ./tensorflow-pack/tensorflow-build/srcs.lst > temp && mv temp ./tensorflow-pack/tensorflow-build/srcs.lst

0 commit comments

Comments
 (0)