@@ -17,9 +17,30 @@ permissions:
1717 contents : read
1818
1919jobs :
20- dl3_export :
20+ export :
2121 runs-on : ubuntu-latest
22- name : Export DL3 to XNNPACK
22+ strategy :
23+ fail-fast : false
24+ matrix :
25+ include :
26+ - name : dl3
27+ path : dl3/python
28+ artifact : dl3-xnnpack-fp32
29+ output : dl3/python/dl3_xnnpack_fp32.pte
30+ - name : mv2
31+ path : mv2/python
32+ artifact : mv2-xnnpack
33+ output : mv2/python/model_mv2_xnnpack.pte
34+ - name : mv3
35+ path : mv3/python
36+ artifact : mv3-models
37+ output : |
38+ mv3/python/mv3.pte
39+ mv3/python/mv3_coreml_all.pte
40+ mv3/python/mv3_mps_float16.pte
41+ mv3/python/mv3_xnnpack_fp32.pte
42+
43+ name : Export ${{ matrix.name }}
2344
2445 steps :
2546 - name : Checkout repository
@@ -37,76 +58,12 @@ jobs:
3758 pip install executorch torchvision
3859
3960 - name : Run export script
40- working-directory : dl3/python
61+ working-directory : ${{ matrix.path }}
4162 run : python export.py
4263
4364 - name : Upload exported model
4465 uses : actions/upload-artifact@v4
4566 with :
46- name : dl3-xnnpack-fp32
47- path : dl3/python/dl3_xnnpack_fp32.pte
48- if-no-files-found : error
49-
50- mv2_export :
51- runs-on : ubuntu-latest
52- name : Export MV2 to XNNPACK
53-
54- steps :
55- - name : Checkout repository
56- uses : actions/checkout@v4
57-
58- - name : Set up Python
59- uses : actions/setup-python@v5
60- with :
61- python-version : ' 3.11'
62- cache : ' pip'
63-
64- - name : Install dependencies
65- run : |
66- python -m pip install --upgrade pip
67- pip install executorch torchvision
68-
69- - name : Run export script
70- working-directory : mv2/python
71- run : python export.py
72-
73- - name : Upload exported model
74- uses : actions/upload-artifact@v4
75- with :
76- name : mv2-xnnpack
77- path : mv2/python/model_mv2_xnnpack.pte
78- if-no-files-found : error
79-
80- mv3_export :
81- runs-on : ubuntu-latest
82- name : Export MV3 to XNNPACK and CoreML
83-
84- steps :
85- - name : Checkout repository
86- uses : actions/checkout@v4
87-
88- - name : Set up Python
89- uses : actions/setup-python@v5
90- with :
91- python-version : ' 3.11'
92- cache : ' pip'
93-
94- - name : Install dependencies
95- run : |
96- python -m pip install --upgrade pip
97- pip install executorch torchvision
98-
99- - name : Run export script
100- working-directory : mv3/python
101- run : python export.py
102-
103- - name : Upload exported models
104- uses : actions/upload-artifact@v4
105- with :
106- name : mv3-models
107- path : |
108- mv3/python/mv3.pte
109- mv3/python/mv3_coreml_all.pte
110- mv3/python/mv3_mps_float16.pte
111- mv3/python/mv3_xnnpack_fp32.pte
67+ name : ${{ matrix.artifact }}
68+ path : ${{ matrix.output }}
11269 if-no-files-found : error
0 commit comments