Skip to content

Commit ef85725

Browse files
TPC Improvement (Exclude tutorials and wrapper API documents) (#1635)
* TPC Improvement * Change implementation of wrapper for TPC Improvement. * Add CI/CD test about TPC and Converter for Keras * Add "permissions: read" to CI/CDs(indicated github bot)
1 parent d7966e0 commit ef85725

252 files changed

Lines changed: 3069 additions & 991 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.14, TPC 1.0 (Keras)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_keras_tests.yml
19+
with:
20+
converter-version: "3.14.*"
21+
tpc-version: "1.0"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.16, TPC 1.0 (Keras)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_keras_tests.yml
19+
with:
20+
converter-version: "3.16.*"
21+
tpc-version: "1.0"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.16, TPC 4.0 (Keras)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_keras_tests.yml
19+
with:
20+
converter-version: "3.16.*"
21+
tpc-version: "4.0"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.17, TPC 1.0 (Keras)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_keras_tests.yml
19+
with:
20+
converter-version: "3.17.*"
21+
tpc-version: "1.0"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.17, TPC 4.0 (Keras)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_keras_tests.yml
19+
with:
20+
converter-version: "3.17.*"
21+
tpc-version: "4.0"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.17, TPC 5.0 (Keras)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_keras_tests.yml
19+
with:
20+
converter-version: "3.17.*"
21+
tpc-version: "5.0"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Run Network Deployment Keras Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
converter-version:
10+
required: true
11+
type: string
12+
tpc-version:
13+
required: true
14+
type: string
15+
16+
jobs:
17+
run-tests:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Install Python 3
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.11"
25+
- name: Setup MCT environment
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -r requirements.txt
29+
pip install tensorflow==2.15
30+
pip install pytest pytest-mock
31+
pip list | grep -e mct -e edge -e tensorflow
32+
- name: Run MCT test
33+
env:
34+
TPC_VERSION: ${{ inputs.tpc-version }}
35+
run: |
36+
pytest network_deployment_tests/keras/test_run_mct.py -s
37+
- name: Uninstall MCTQ and CustomLayer
38+
run: |
39+
pip uninstall -y mct-quantizers edge-mdt-cl
40+
- name: Setup Converter environment
41+
run: |
42+
pip install imx500-converter[tf]==${{ inputs.converter-version }}
43+
pip list | grep -e mct -e edge -e imx500
44+
- name: Run Converter test
45+
run: |
46+
pytest network_deployment_tests/keras/test_run_converter.py -s
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Run Network Deployment Pytorch Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
converter-version:
10+
required: true
11+
type: string
12+
tpc-version:
13+
required: true
14+
type: string
15+
onnx-opset-version:
16+
required: false
17+
type: string
18+
default: "20"
19+
20+
jobs:
21+
run-tests:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Install Python 3
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.11"
29+
- name: Setup MCT environment
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements.txt
33+
pip install "torch<2.7" "torchvision<0.22" "onnx<1.18" "onnxruntime<1.22" "onnxruntime-extensions<0.14"
34+
pip install pytest pytest-mock
35+
pip list | grep -e mct -e edge -e onnx
36+
- name: Run MCT test
37+
env:
38+
TPC_VERSION: ${{ inputs.tpc-version }}
39+
ONNX_OPSET_VERSION: ${{ inputs.onnx-opset-version }}
40+
run: |
41+
pytest network_deployment_tests/pytorch/test_run_mct.py -s
42+
- name: Uninstall MCTQ and CustomLayer
43+
run: |
44+
pip uninstall -y mct-quantizers edge-mdt-cl
45+
- name: Setup Converter environment
46+
run: |
47+
pip install imx500-converter[pt]==${{ inputs.converter-version }}
48+
pip list | grep -e mct -e edge -e onnx -e imx500
49+
- name: Run Converter test
50+
run: |
51+
pytest network_deployment_tests/pytorch/test_run_converter.py -s
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Converter 3.14, TPC 1.0 (Pytorch)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_pytorch_tests.yml
19+
with:
20+
converter-version: "3.14.*"
21+
tpc-version: "1.0"
22+
onnx-opset-version: "15"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Converter 3.16, TPC 1.0 (Pytorch)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggers
8+
schedule:
9+
- cron: 0 0 * * *
10+
pull_request:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
jobs:
17+
run-tests:
18+
uses: ./.github/workflows/run_network_deployment_pytorch_tests.yml
19+
with:
20+
converter-version: "3.16.*"
21+
tpc-version: "1.0"

0 commit comments

Comments
 (0)