Skip to content

Commit 9b8a083

Browse files
authored
Merge pull request #9 from analogdevicesinc/release-3.0.0
Release 3.0.0
2 parents 92ab59d + bef3eed commit 9b8a083

File tree

1,045 files changed

+46048
-17897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,045 files changed

+46048
-17897
lines changed

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.zip filter=lfs diff=lfs merge=lfs -text
2+
*.pb filter=lfs diff=lfs merge=lfs -text
3+
*.tflite filter=lfs diff=lfs merge=lfs -text
4+
*.pth filter=lfs diff=lfs merge=lfs -text
5+
*.onnx filter=lfs diff=lfs merge=lfs -text
6+
*.tfrecord filter=lfs diff=lfs merge=lfs -text
7+
*.pdom filter=lfs diff=lfs merge=lfs -text
8+
*.h5 filter=lfs diff=lfs merge=lfs -text
9+
*.h5.[[:space:]]*.wav filter=lfs diff=lfs merge=lfs -text
10+
*.doc filter=lfs diff=lfs merge=lfs -text
11+
*.xlsx filter=lfs diff=lfs merge=lfs -text
12+
*.pkl filter=lfs diff=lfs merge=lfs -text

.github/workflows/build-and-test.yml

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ on:
66
push:
77
pull_request:
88
branches:
9+
- 'release/**'
910
- main
10-
- dev
1111

1212
jobs:
1313
Build-and-Test:
14-
runs-on: self-hosted
14+
runs-on: [self-hosted, tflm-runner]
1515
strategy:
1616
fail-fast: false
1717
matrix:
1818
cces_ver: ["3.0.0", "3.0.2"]
19+
config: ["Release", "Debug"]
1920
container:
2021
image: tagoylo/tflm-ci:latest
2122
volumes:
@@ -24,48 +25,68 @@ jobs:
2425
CCES_PATH: /opt/analog/cces/${{ matrix.cces_ver }}
2526
steps:
2627
- uses: actions/checkout@v4
27-
- name: Build libTFLM using CCES ${{ matrix.cces_ver }}
28-
shell: bash
29-
run:
30-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
28+
with:
29+
submodules: recursive
30+
token: ${{ secrets.GH_PAT }}
3131

3232
- name: Build libadi_sharcfx_nn using CCES ${{ matrix.cces_ver }}
3333
shell: bash
3434
run: |
3535
cd adi_sharcfx_nn/Project
36-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
36+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
37+
38+
- name: Build libTFLM using CCES ${{ matrix.cces_ver }}
39+
shell: bash
40+
run:
41+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
3742

3843
- name: Build denoiser example project
3944
shell: bash
4045
run: |
41-
cd Utils/automated-model-conversion/dtln
42-
bash convert_models.sh
43-
cd ../../../examples/denoiser/denoiser_fileio
44-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
46+
cd cces/Utils/automated-model-conversion/dtln
47+
chmod +x run_in_bash.sh
48+
bash run_in_bash.sh
49+
cd ../../../..
50+
cd cces/examples/denoiser/denoiser_fileio
51+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
4552
cd ../denoiser_realtime
46-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
53+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
4754
4855
- name: Build kws example project
4956
shell: bash
5057
run: |
51-
cd examples/keyword_spotter/kws_fileio
52-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
58+
cd cces/examples/keyword_spotter/kws_fileio
59+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
5360
cd ../kws_realtime
54-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
61+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
5562
5663
- name: Build genre_id example project
5764
shell: bash
5865
run: |
59-
cd Utils/automated-model-conversion/genre_identification
60-
bash convert_models.sh
61-
cd ../../../examples/genre_identification/genre_id_fileio
62-
make -j4 SHARCFX_ROOT=${{ env.CCES_PATH }}
66+
cd cces/examples/genre_identification/genre_id_fileio
67+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
68+
cd ../genre_id_realtime
69+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
70+
71+
- name: Build urbansound_classification example project
72+
shell: bash
73+
run: |
74+
cd cces/examples/urbansound_classification/urbansound_id_fileio
75+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
76+
cd ../urbansound_id_realtime
77+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
6378
79+
- name: Build bootloader_sharcfx project
80+
shell: bash
81+
run: |
82+
cd cces/Utils/flashing-tools/bootloader_sharcfx
83+
make -j4 CONFIG=${{ matrix.config }} SHARCFX_ROOT=${{ env.CCES_PATH }}
84+
6485
- name: Test libTFLM artifact using CCES ${{ matrix.cces_ver }}
6586
shell: bash
6687
run: |
67-
cd unit_test
68-
make -j4 CCES=${{ env.CCES_PATH }} | tee test_results.log
88+
cd test/unit_test
89+
make -j4 CONFIG=${{ matrix.config }} CCES=${{ env.CCES_PATH }} | tee test_results.log
6990
if grep -q "FAILED" test_results.log; then
7091
echo "Unit test failed"
7192
exit 1
@@ -91,7 +112,7 @@ jobs:
91112
COMMIT_HASH=${GITHUB_SHA::7}
92113
UPLOAD_PATH="TFLM/${FOLDER_NAME}/build_${{ github.run_number }}-${BUILD_DATE}-${COMMIT_HASH}/${{ matrix.cces_ver }}"
93114
echo "Uploading test results to JF: ${{ env.JF_URL }}/$UPLOAD_PATH"
94-
TEST_FILE_PATH="./unit_test/test_results.log"
115+
TEST_FILE_PATH="./test/unit_test/test_results.log"
95116
curl -u${{ env.JF_ACCESS_TOKEN }} -T ${TEST_FILE_PATH} ${{ env.JF_URL }}/${UPLOAD_PATH}/ > /dev/null
96117
BUILD_FILE_PATH="./build/libTFLM.a"
97118
echo "Uploading build artifact to JF: ${{ env.JF_URL }}/$UPLOAD_PATH"

.gitignore

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,33 @@ env
33
.venv
44
.env
55
build
6-
tmp
6+
tmp
7+
# Ignore Git internal folder (redundant; Git never tracks this, but for clarity)
8+
.git/
9+
10+
# Ignore metadata
11+
.metadata/
12+
13+
# Ignore *.ignore files and folders
14+
*.ignore
15+
*.ignore/
16+
17+
# Ignore all build-related folders
18+
**/build/
19+
**/Build/
20+
**/BUILD/
21+
22+
# Ignore Debug and Release folders (case-insensitive)
23+
**/Debug/
24+
**/debug/
25+
**/Release/
26+
**/release/
27+
28+
# Ignore temporary folders
29+
tmp/
30+
31+
# Allow Debug and Release folders in specific paths
32+
!Lib/Debug/
33+
!Lib/Release/
34+
!cces/TFLM/lib/Debug/
35+
!cces/TFLM/lib/Release/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "adi_sharcfx_nn"]
2+
path = adi_sharcfx_nn
3+
url = https://github.com/analogdevicesinc/nn.git
Binary file not shown.
Binary file not shown.
237 KB
Binary file not shown.
2.38 MB
Binary file not shown.

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
include ./tools/sharcfx/sharcfx.mk
22

33
BUILD_DIR := ./build
4-
LIB_SRCS := ./TFLM/src
4+
LIB_SRCS := .
55
LIB := libTFLM.a
6+
TARGET_LIB_DIR := $(LIB_SRCS)/cces/TFLM/Lib
67

78
INCLUDES += \
89
-I"$(LIB_SRCS)" \
@@ -17,15 +18,15 @@ INCLUDES += \
1718
-I"$(LIB_SRCS)/third_party/ruy/ruy/profiler" \
1819
-I"$(LIB_SRCS)/third_party/ruy" \
1920
-I"$(LIB_SRCS)/third_party/gemmlowp/fixedpoint" \
20-
-I"./examples/shared" \
21+
-I"./cces/examples/shared" \
2122
-I"./adi_sharcfx_nn/Include"
2223

2324
C_SRCS += \
2425
$(wildcard $(LIB_SRCS)/third_party/kissfft/tools/*.c) \
2526
$(wildcard $(LIB_SRCS)/third_party/kissfft/*.c) \
2627
$(wildcard $(LIB_SRCS)/tensorflow/lite/experimental/microfrontend/lib/*.c) \
2728
$(wildcard $(LIB_SRCS)/tensorflow/lite/kernels/internal/optimized/*.c) \
28-
$(wildcard ./examples/shared/*.c)
29+
$(wildcard ./cces/examples/shared/*.c)
2930

3031
CC_SRCS += \
3132
$(wildcard $(LIB_SRCS)/tensorflow/lite/schema/*.cc) \

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,15 @@ Next, build the `libTFLM.a` file:
9696
At this point, you should have a `libTFLM.a` library archive located inside the `Debug` or `Release` folder.
9797

9898
Instructions to build and run the examples are found in their respective READMEs.
99-
- [Denoiser](examples/denoiser/README.md)
100-
- [Keyword Spotting](examples/keyword_spotter/README.md)
101-
- [Genre Identification](examples/genre_identification/README.md)
99+
- [Denoiser](cces/examples/denoiser/README.md)
100+
- [Keyword Spotting](cces/examples/keyword_spotter/README.md)
101+
- [Genre Identification](cces/examples/genre_identification/README.md)
102+
- [Urban Sound Classification](cces/examples/urbansound_classification/README.md)
102103

103-
We have also included utilities for automated model conversion and flashing. These are available in the [utils](Utils) directory.
104-
- [Automated model conversion for DTLN](Utils/automated-model-conversion/dtln/README.md)
105-
- [Automated model conversion for Genre ID](Utils/automated-model-conversion/genre_identification/README.md)
106-
- [Flashing](Utils/flashing-tools/README.md)
104+
We have also included utilities for automated model conversion and flashing. These are available in the [Utils](cces/Utils) directory.
105+
- [Automated model conversion for DTLN](cces/Utils/automated-model-conversion/dtln/README.md)
106+
- [Automated model conversion for Genre ID](cces/Utils/automated-model-conversion/genre_identification/README.md)
107+
- [Flashing](cces/Utils/flashing-tools/README.md)
107108

108109
### Option 2: via the Headless build
109110

@@ -144,6 +145,17 @@ The default debugger is ICE-1000. To configure this with other debugger like the
144145
make flash DEBUGGER=2000
145146
```
146147

148+
### Multi-boot
149+
Please follow [bootloader_sharcfx](cces/Utils/flashing-tools/bootloader_sharcfx) for multi-stage booting functionality.
150+
151+
Please note that the models we use in the example applications are for DEMO purpose only. If a product needs to be created using the same models, commercial license needs to be taken, and the necessary due diligence needs to be handled by the party with the rightful owners.
152+
153+
## Datasets
154+
CC BY 4.0 compliant datasets for Urban Sound Classification and Music Genre Identification are available upon request for evaluation and training.
155+
156+
APPENDIX A - THIRD PARTY LICENSES FOR OPEN-SOURCE COMPONENTS ARE DETAILED AT THE LOCATION BELOW:
157+
* HTTPS://DOWNLOAD.ANALOG.COM/SHARC-FX-TFLM-EDGE-AI-SDK/VERSIONS.HTML [https://download.analog.com/sharc-fx-tflm-edge-ai-sdk/versions.html]
158+
147159
# Getting Help
148160

149161
Please raise a GitHub Issue for support.

0 commit comments

Comments
 (0)