Skip to content

Commit

Permalink
Github action to test he Neon code.
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe0606 committed Jun 24, 2024
1 parent 742e4bc commit 38857b2
Show file tree
Hide file tree
Showing 11 changed files with 1,655 additions and 1,551 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/runneontest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Neon Compile and Run
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
actions: read
security-events: write

jobs:
CI_test_run:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install system packages
run: |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install libpython3.9 libtinfo5
- name: Activate vcpkg
uses: ARM-software/cmsis-actions/vcpkg@v1

- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1

- name: Prepare framework
run: |
cd Testing
echo "Create missing folders"
mkdir FullBenchmark
mkdir Output
mkdir GeneratedInclude
mkdir GeneratedSource
mkdir GeneratedIncludeBench
mkdir GeneratedSourceBench
mkdir build
echo "Install missing python packages"
pip install -r requirements.txt
echo "Preprocess test description"
python preprocess.py -f desc.txt -o Output.pickle
python preprocess.py -f desc_f16.txt -o Output_f16.pickle
echo "Generate missing CPP headers"
python processTests.py -gen . -p Patterns -d Parameters -f Output.pickle -e
python processTests.py -gen . -p Patterns -d Parameters -f Output_f16.pickle -e
- name: Execute
run: |
cd Testing/build
echo "Running tests"
cmake ..
python ../processTests.py -p ../Patterns -d ../Parameters -gen .. -e -f ../Output.pickle
make
./test > result.txt
python ../processResult.py -e -f ../Output.pickle -r result.txt -html > result.html
python ../processTests.py -p ../Patterns -d ../Parameters -gen .. -e -f ../Output_f16.pickle
make
./test > result_f16.txt
python ../processResult.py -e -f ../Output_f16.pickle -r result_f16.txt -html > result_f16.html
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: neon-test-report
path: |
Testing/build/result.html
Testing/build/result_f16.html
- name: Check error
run: |
cd Testing/build
echo "Checking output..."
test "$(grep "FAILED" result.html | wc -l)" -eq 0
test "$(grep "FAILED" result_f16.html | wc -l)" -eq 0
4 changes: 3 additions & 1 deletion Source/FilteringFunctions/arm_biquad_cascade_df2T_f32.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ void arm_biquad_cascade_df2T_f32(
while (stage > 0U);
}
#else
#if defined(ARM_MATH_NEON)
/* The Neon version is not passing the test so is disabled
until the problem is corrected. Issue #186 */
#if 0 //defined(ARM_MATH_NEON)

void arm_biquad_cascade_df2T_f32(
const arm_biquad_cascade_df2T_instance_f32 * S,
Expand Down
9 changes: 8 additions & 1 deletion Testing/PatternGeneration/BIQUAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,22 @@ def generatePatterns():
configq15=Tools.Config(PATTERNDIR,PARAMDIR,"q15")
#configq7=Tools.Config(PATTERNDIR,PARAMDIR,"q7")


configf64.setOverwrite(False)
configf32.setOverwrite(False)
configf16.setOverwrite(False)
configq31.setOverwrite(False)
configq15.setOverwrite(False)


writeBenchmarks(configf32)
writeBenchmarks(configf16)
writeBenchmarks(configq31)
writeBenchmarks(configq15)
writeBenchmarks(configf64)

#configf32.setOverwrite(True)
writeTests(configf32,0)

writeTests(configf16,16)
writeTests(configq31,31)
writeTests(configq15,15)
Expand Down
Loading

0 comments on commit 38857b2

Please sign in to comment.