Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing/jenkins integration #59

Merged
merged 79 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
557cd1d
[test] adding basic Jenkinsfile
fionnodonohoe-xlnx Apr 5, 2023
aabf800
[testing] add pytest testing module for testing notebooks on boards
fionnodonohoe-xlnx Apr 28, 2023
f146d0b
[testing] add script that downloads necessary testing files for finn-…
fionnodonohoe-xlnx Apr 29, 2023
2a3d9ba
Merge branch 'testing/notebook_automation' into testing/jenkins-integ…
fionnodonohoe-xlnx Apr 29, 2023
00c3c4f
Remove get-finn script execution for decoupling
fionnodonohoe-xlnx May 3, 2023
056af4a
build-all.sh was not creating all necessary zipfiles as it was in the…
fionnodonohoe-xlnx May 4, 2023
d4105a1
Remove commented out lines
fionnodonohoe-xlnx May 4, 2023
b35e68a
[testing] make downloading board files optional
fionnodonohoe-xlnx May 4, 2023
63f1deb
[testing] update relative path to the data & bitfile directories
fionnodonohoe-xlnx May 4, 2023
e99dab0
Try using the radioml_w4a4_small_tidy bitfile that already exists for…
fionnodonohoe-xlnx May 5, 2023
52d4667
Revert "Try using the radioml_w4a4_small_tidy bitfile that already ex…
fionnodonohoe-xlnx May 18, 2023
69b83ba
Select mobilenet for testing
fionnodonohoe-xlnx May 19, 2023
9dab943
add pytest markers to prevent warnings when running tests
fionnodonohoe-xlnx May 23, 2023
c3aeddc
add pipeline for 3/4 boards - zcu104 missing
fionnodonohoe-xlnx May 23, 2023
4d397b0
mark binarycop as xfail - camera is expected but not connected to the…
fionnodonohoe-xlnx May 23, 2023
fa4a6a3
add the ZCU104 tests; triggered by a buildParameter
fionnodonohoe-xlnx May 24, 2023
c7d1cab
tidy up post actions
fionnodonohoe-xlnx May 25, 2023
7fe463f
add release build stage and build parameter; check build parameters i…
fionnodonohoe-xlnx May 25, 2023
f8f82ab
tidy up formatting & remove env vars already set in DSL job file
fionnodonohoe-xlnx May 25, 2023
7e93bc4
Set all function names to camel case for consistency
fionnodonohoe-xlnx May 25, 2023
1dc1f12
gather repeated code into a function: getBoardFiles; also add in alve…
fionnodonohoe-xlnx May 25, 2023
2109058
adjust U250 platform JSON key to allow for simpler use
fionnodonohoe-xlnx May 25, 2023
d14755e
remove unused prints and comments; adjust tabbing to improve flow con…
fionnodonohoe-xlnx May 25, 2023
b0a81b1
move download-test-files.py to ci directory as it's only used for con…
fionnodonohoe-xlnx May 25, 2023
228878c
Move conda environment and move path to an environment variable
fionnodonohoe-xlnx May 25, 2023
61b3d89
add a prepending backslash to a backslash so that groovy can read nec…
fionnodonohoe-xlnx May 25, 2023
9015ecb
the fancy folder renaming method did not work during a Jenkins run
fionnodonohoe-xlnx May 25, 2023
b8c0016
fail the build if a node is offline
fionnodonohoe-xlnx Jun 2, 2023
d287204
Revert "fail the build if a node is offline"
fionnodonohoe-xlnx Jun 6, 2023
ee2ab9f
Use envrionment variables to store board's state to fail or pass a pa…
fionnodonohoe-xlnx Jun 6, 2023
9b01439
Use environment variable to source RadioML dataset, same as is done i…
fionnodonohoe-xlnx Jun 7, 2023
8049a7f
remove build parameter for zcu104 as it is functional
fionnodonohoe-xlnx Jun 7, 2023
55939ad
add zcu104 environment variable check in result checking stage
fionnodonohoe-xlnx Jun 7, 2023
b54c74e
[models]: fix to model name vgg10-radioml to match bitfile name
mmrahorovic Jun 29, 2023
015a2a3
Merge branch 'dev' into testing/jenkins-integration
fionnodonohoe-xlnx Jun 29, 2023
5867a5f
Add XML test results collection and move building to another server
fionnodonohoe-xlnx Jun 29, 2023
669979e
Adjust U250 label and adjust release build server label
fionnodonohoe-xlnx Jul 10, 2023
441acef
Move board online checks after bitstream building, only needs to be d…
fionnodonohoe-xlnx Jul 19, 2023
2fe5612
Remove build discard count and tidy up credential variable names for …
fionnodonohoe-xlnx Jul 19, 2023
bb27563
Add catchError guards to allow stages after failed stages to continue
fionnodonohoe-xlnx Jul 19, 2023
e51df90
Tidy up some comments
fionnodonohoe-xlnx Jul 19, 2023
50c2221
Change board strings to be env variables
fionnodonohoe-xlnx Jul 19, 2023
8da7922
Add test result file collection and storage as test artifacts
fionnodonohoe-xlnx Jul 19, 2023
34e194c
Delete test results from older builds/runs
fionnodonohoe-xlnx Jul 19, 2023
bd0df0b
Adjust test run to accept the RADIOML_PATH env variable from parent s…
fionnodonohoe-xlnx Jul 19, 2023
b40b784
Add workaround for Jenkins to be able to run docker in non-interactiv…
fionnodonohoe-xlnx Jul 19, 2023
67f2e9d
Some networks to not have models to download, skip that step
fionnodonohoe-xlnx Jul 20, 2023
dee9c7a
Adjust build script to build all zips available instead of hardcoding…
fionnodonohoe-xlnx Jul 20, 2023
f836ac1
Collect all local folders as build folders instead of hardcoding
fionnodonohoe-xlnx Jul 20, 2023
3f7e4d3
Delete previous build's files for a clean working env
fionnodonohoe-xlnx Jul 20, 2023
ee99b13
[CI] Jenkins cleanup was failing when no files existed, need to ignor…
Aug 24, 2023
fc6efcf
[CI] Jenkins should always target top of finn dev
Sep 29, 2023
2a74519
[CI] Add debug messages to build-all.sh
Sep 29, 2023
8daf65f
Revert "[CI] Add debug messages to build-all.sh"
Sep 29, 2023
df0e500
[cybersecurity mlp]: added copyright headers
mmrahorovic Aug 10, 2023
da30f6b
Minimize bit width step needs to be explicitly called in examples wit…
Oct 6, 2023
b6a7b72
[CI] move Jenkins finn checkout into JenkinsFile
Oct 12, 2023
36d3aa0
[Build] add step_minimize_bit_width to mobilenet-v1 alveo steps
jmonks-amd Oct 12, 2023
30b8f0d
[CI] Use virtual env instead of Conda for Jenkins testing
Oct 23, 2023
7e8cce2
Clean up white space, tab to space
Oct 26, 2023
2c50f67
[CI] Target finn dev for Jenkins
Oct 26, 2023
c7c905c
[CI] u250 workaround needs to target new platform 4_1
Oct 26, 2023
9132511
[CI] Generate html test reports on successful runs
Oct 26, 2023
a548520
[CI] Temporarily disable alveo based tests
Oct 26, 2023
8a58fd2
Revert "[CI] Temporarily disable alveo based tests"
Nov 3, 2023
c9814dd
[Driver] Workaround for pynq on alveo bug
Nov 8, 2023
ac69a57
Update finn commit
auphelia Nov 17, 2023
9ff8df0
[Test] Update models.py to handle alveo pynq naming
Nov 20, 2023
0d276b8
[CI] Remove U250 workaround from Jenkinsfile
Nov 23, 2023
aa6f72d
Merge branch 'dev' into testing/jenkins-integration
Nov 23, 2023
a62b166
[linting] fix linting issues
Nov 23, 2023
5e441b8
Update finn commit to target floorplanning fix on dev
Nov 23, 2023
7f3d6ce
Merge pull request #69 from Xilinx/fix/resnet50
jmonks-amd Nov 23, 2023
b1205ac
[CI] Handle gathering builds using Jenkins to allow parallel builds
Nov 30, 2023
2b1fe8b
[CI] Use full deployment name for U250 board name
Nov 30, 2023
1487dac
[CI] Clone a new finn workspace for each build
Dec 4, 2023
e4df412
[CI] Each job has its own build directory
Jan 24, 2024
80b8702
[CI] Remove pdb on Jenkins run
Feb 21, 2024
9f935ea
[CI] Use configurable env variable to target finn branch
Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 34 additions & 22 deletions build/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,53 @@
SCRIPT=$(readlink -f "$0")
# absolute path this script is in, thus /home/user/bin
SCRIPTPATH=$(dirname "$SCRIPT")
# subdirs for all finn-examples build folders
BUILD_FOLDERS="bnn-pynq kws mobilenet-v1 resnet50 vgg10-radioml cybersecurity-mlp"
# all HW platforms we build for
PLATFORMS="Pynq-Z1 Ultra96 ZCU104 U250"

# fetch correct compiler version
cd $SCRIPTPATH
bash get-finn.sh
# clean old build files if present
RELEASE_TARGET=$SCRIPTPATH/release
rm -rf $RELEASE_TARGET || true

# collect all local folders, each are considered build folders
LOCAL_BUILD_FOLDERS=$(find . -maxdepth 1 -type d -printf "%P ")

# remove trailing spaces and store the directory names in an array
IFS=' ' read -r -a BUILD_FOLDERS <<< "$LOCAL_BUILD_FOLDERS"

# fetch all models, continue on error
for BUILD_FOLDER in $BUILD_FOLDERS; do
cd $SCRIPTPATH/$BUILD_FOLDER/models
rm -rf *.zip *.onnx *.npz
./download-model.sh || true
# fetch all models (if there are models to fetch), continue on error
for BUILD_FOLDER in ${BUILD_FOLDERS[@]}; do
if [ -d "$SCRIPTPATH/$BUILD_FOLDER/models" ]; then
cd $SCRIPTPATH/$BUILD_FOLDER/models
rm -rf *.zip *.onnx *.npz
./download-model.sh || true
fi
done

# run all build scripts, continue on error
cd $SCRIPTPATH/finn
for BUILD_FOLDER in $BUILD_FOLDERS; do
for BUILD_FOLDER in ${BUILD_FOLDERS[@]}; do
./run-docker.sh build_custom $SCRIPTPATH/$BUILD_FOLDER || true
done

# gather all release folders, continue on error
RELEASE_TARGET=$SCRIPTPATH/release
mkdir -p $RELEASE_TARGET
for BUILD_FOLDER in $BUILD_FOLDERS; do
for BUILD_FOLDER in ${BUILD_FOLDERS[@]}; do
cp -r $SCRIPTPATH/$BUILD_FOLDER/release/* $RELEASE_TARGET || true
done

# create zipfiles for finn-examples upload
cd $SCRIPTPATH/$BUILD_FOLDER/release
rm -rf *.zip
for PLATFORM in $PLATFORMS; do
zip -r $PLATFORM.zip $PLATFORM/ || true
MD5SUM=$(md5sum $PLATFORM.zip)
echo "$PLATFORM.zip : $MD5SUM" >> md5sum.log
# create zip files for finn-examples upload
cd $RELEASE_TARGET
for dir in */; do
# remove trailing slash to get the directory name
dir_name="${dir%/}"

# check if it is a directory we are zipping
if [ -d "$dir_name" ]; then
zip -r "${dir_name}.zip" "$dir_name" || true
fi
done

# calculate the MD5sum for each of the zip files
zip_files=(*.zip)
for zip_file in "${zip_files[@]}"; do
md5sum_value=$(md5sum "$zip_file" | awk '{print $1}')
echo "$zip_file : $md5sum_value" >> md5sum.log
done
5 changes: 3 additions & 2 deletions build/get-finn.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
# Copyright (c) 2020, Xilinx
# Copyright (C) 2020-2022, Xilinx
# Copyright (C) 2023, Advanced Micro Devices, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -30,7 +31,7 @@
# URL for git repo to be cloned
REPO_URL=https://github.com/Xilinx/finn
# commit hash for repo
REPO_COMMIT=0484acba8e28dab95380bd78466c3d4230bf9960
REPO_COMMIT=02ce6954c93963c8407cd5c20761fccf92e1c70d
# directory (under the same folder as this script) to clone to
REPO_DIR=finn

Expand Down
2 changes: 2 additions & 0 deletions build/mobilenet-v1/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def select_build_steps(platform):
step_mobilenet_convert_to_hls_layers_separate_th,
"step_create_dataflow_partition",
"step_apply_folding_config",
"step_minimize_bit_width",
"step_generate_estimate_reports",
"step_hls_codegen",
"step_hls_ipgen",
Expand All @@ -94,6 +95,7 @@ def select_build_steps(platform):
step_mobilenet_convert_to_hls_layers,
"step_create_dataflow_partition",
"step_apply_folding_config",
"step_minimize_bit_width",
"step_generate_estimate_reports",
"step_hls_codegen",
"step_hls_ipgen",
Expand Down
1 change: 1 addition & 0 deletions build/resnet50/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
step_resnet50_convert_to_hls,
"step_create_dataflow_partition",
"step_apply_folding_config",
"step_minimize_bit_width",
"step_generate_estimate_reports",
"step_hls_codegen",
"step_hls_ipgen",
Expand Down
1 change: 1 addition & 0 deletions build/vgg10-radioml/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def select_build_steps(platform):
"step_create_dataflow_partition",
"step_target_fps_parallelization",
"step_apply_folding_config",
"step_minimize_bit_width",
"step_generate_estimate_reports",
"step_hls_codegen",
"step_hls_ipgen",
Expand Down
Loading
Loading