Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 279ac70

Browse files
authored
Merge branch 'main' into interface-framework-onnx
2 parents 087b485 + 833ec73 commit 279ac70

Some content is hidden

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

43 files changed

+12455
-157
lines changed

.github/workflows/merge-test.yaml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Merge Tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- 'release/*'
7+
8+
jobs:
9+
get-branch:
10+
runs-on: ubuntu-18.04
11+
outputs:
12+
branch: ${{ steps.get-branch.outputs.branch }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- run: git branch --show-current
16+
- name: Get current branch
17+
id: get-branch
18+
run: echo "::set-output name=branch::$(git branch --show-current)"
19+
base-tests:
20+
runs-on: ubuntu-18.04
21+
needs: get-branch
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v2
25+
with:
26+
repository: "neuralmagic/sparsezoo"
27+
path: "sparsezoo"
28+
ref: ${{needs.get-branch.outputs.branch}}
29+
- name: "⚙️ Install sparsezoo dependencies"
30+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
31+
- name: "Clean sparsezoo directory"
32+
run: rm -r sparsezoo/
33+
- name: "⚙️ Install dependencies"
34+
run: pip3 install .[dev]
35+
- name: "🔬 Running base tests"
36+
run: make test
37+
deepsparse-tests:
38+
runs-on: ubuntu-18.04
39+
needs: get-branch
40+
steps:
41+
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v2
43+
with:
44+
repository: "neuralmagic/sparsezoo"
45+
path: "sparsezoo"
46+
ref: ${{needs.get-branch.outputs.branch}}
47+
- name: "⚙️ Install sparsezoo dependencies"
48+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
49+
- name: "Clean sparsezoo directory"
50+
run: rm -r sparsezoo/
51+
- name: "⚙️ Install dependencies"
52+
run: pip3 install .[dev,deepsparse]
53+
- name: "🔬 Running deepsparse tests"
54+
run: make test TARGETS=deepsparse
55+
keras-tests:
56+
runs-on: ubuntu-18.04
57+
needs: get-branch
58+
steps:
59+
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v2
61+
with:
62+
repository: "neuralmagic/sparsezoo"
63+
path: "sparsezoo"
64+
ref: ${{needs.get-branch.outputs.branch}}
65+
- name: "⚙️ Install sparsezoo dependencies"
66+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
67+
- name: "Clean sparsezoo directory"
68+
run: rm -r sparsezoo/
69+
- name: "⚙️ Install dependencies"
70+
run: pip3 install .[dev,tf_keras]
71+
- name: "🔬 Running keras tests"
72+
run: make test TARGETS=keras
73+
onnx-tests:
74+
runs-on: ubuntu-18.04
75+
needs: get-branch
76+
steps:
77+
- uses: actions/checkout@v2
78+
- uses: actions/checkout@v2
79+
with:
80+
repository: "neuralmagic/sparsezoo"
81+
path: "sparsezoo"
82+
ref: ${{needs.get-branch.outputs.branch}}
83+
- name: "⚙️ Install sparsezoo dependencies"
84+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
85+
- name: "Clean sparsezoo directory"
86+
run: rm -r sparsezoo/
87+
- name: "⚙️ Install dependencies"
88+
run: pip3 install .[dev,torchvision]
89+
- name: "🔬 Running onnx tests"
90+
run: make test TARGETS=onnx
91+
pytorch-tests:
92+
runs-on: ubuntu-18.04
93+
needs: get-branch
94+
steps:
95+
- uses: actions/checkout@v2
96+
- uses: actions/checkout@v2
97+
with:
98+
repository: "neuralmagic/sparsezoo"
99+
path: "sparsezoo"
100+
ref: ${{needs.get-branch.outputs.branch}}
101+
- name: "⚙️ Install sparsezoo dependencies"
102+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
103+
- name: "Clean sparsezoo directory"
104+
run: rm -r sparsezoo/
105+
- name: "⚙️ Install dependencies"
106+
run: pip3 install .[dev,torchvision]
107+
- name: "🔬 Running pytorch tests"
108+
run: make test TARGETS=pytorch
109+
tensorflow-v1-tests:
110+
runs-on: ubuntu-18.04
111+
needs: get-branch
112+
steps:
113+
- uses: actions/checkout@v2
114+
- uses: actions/checkout@v2
115+
with:
116+
repository: "neuralmagic/sparsezoo"
117+
path: "sparsezoo"
118+
ref: ${{needs.get-branch.outputs.branch}}
119+
- name: "⚙️ Install sparsezoo dependencies"
120+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
121+
- name: "Clean sparsezoo directory"
122+
run: rm -r sparsezoo/
123+
- name: "⚙️ Install dependencies"
124+
run: pip3 install .[dev,tf_v1]
125+
- name: "🔬 Running tensorflow_v1 tests"
126+
run: make test TARGETS=tensorflow_v1
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: Pull Request Tests
2+
on: pull_request
3+
4+
jobs:
5+
diff-check:
6+
runs-on: ubuntu-18.04
7+
outputs:
8+
base: ${{ steps.base-check.outputs.output }}
9+
deepsparse: ${{ steps.deepsparse-check.outputs.output }}
10+
keras: ${{ steps.keras-check.outputs.output }}
11+
onnx: ${{ steps.onnx-check.outputs.output }}
12+
pytorch: ${{ steps.pytorch-check.outputs.output }}
13+
tensorflow_v1: ${{ steps.tensorflow_v1-check.outputs.output }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
- name: "Checking if sparseml was changed"
19+
id: base-check
20+
run: >
21+
(git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparseml|setup.py")
22+
&& echo "::set-output name=output::1" || echo "::set-output name=output::0"
23+
- name: "Checking if sparseml.deepsaprse was changed"
24+
id: deepsparse-check
25+
run: >
26+
(git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparseml/deepsparse|setup.py")
27+
&& echo "::set-output name=output::1" || echo "::set-output name=output::0"
28+
- name: "Checking if sparseml.keras was changed"
29+
id: keras-check
30+
run: >
31+
(git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparseml/keras|setup.py")
32+
&& echo "::set-output name=output::1" || echo "::set-output name=output::0"
33+
- name: "Checking if sparseml.onnx was changed"
34+
id: onnx-check
35+
run: >
36+
(git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparseml/onnx|setup.py")
37+
&& echo "::set-output name=output::1" || echo "::set-output name=output::0"
38+
- name: "Checking if sparseml.pytorch was changed"
39+
id: pytorch-check
40+
run: >
41+
(git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparseml/pytorch|setup.py")
42+
&& echo "::set-output name=output::1" || echo "::set-output name=output::0"
43+
- name: "Checking if sparseml.tensorflow_v1 was changed"
44+
id: tensorflow_v1-check
45+
run: >
46+
(git diff --name-only origin/main HEAD | grep -E "[src|tests]/sparseml/tensorflow_v1|setup.py")
47+
&& echo "::set-output name=output::1" || echo "::set-output name=output::0"
48+
base-tests:
49+
runs-on: ubuntu-18.04
50+
needs: diff-check
51+
if: ${{needs.diff-check.outputs.base == 1}}
52+
steps:
53+
- uses: actions/checkout@v2
54+
- uses: actions/checkout@v2
55+
with:
56+
repository: "neuralmagic/sparsezoo"
57+
path: "sparsezoo"
58+
- name: "⚙️ Install sparsezoo dependencies"
59+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
60+
- name: "Clean sparsezoo directory"
61+
run: rm -r sparsezoo/
62+
- name: "⚙️ Install dependencies"
63+
run: pip3 install .[dev]
64+
- name: "🔬 Running base tests"
65+
run: make test
66+
deepsparse-tests:
67+
runs-on: ubuntu-18.04
68+
needs: diff-check
69+
if: ${{needs.diff-check.outputs.deepsparse == 1}}
70+
steps:
71+
- uses: actions/checkout@v2
72+
- uses: actions/checkout@v2
73+
with:
74+
repository: "neuralmagic/sparsezoo"
75+
path: "sparsezoo"
76+
- name: "⚙️ Install sparsezoo dependencies"
77+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
78+
- name: "Clean sparsezoo directory"
79+
run: rm -r sparsezoo/
80+
- name: "⚙️ Install dependencies"
81+
run: pip3 install .[dev,deepsparse]
82+
- name: "🔬 Running deepsparse tests"
83+
run: make test TARGETS=deepsparse
84+
keras-tests:
85+
runs-on: ubuntu-18.04
86+
needs: diff-check
87+
if: ${{needs.diff-check.outputs.keras == 1}}
88+
steps:
89+
- uses: actions/checkout@v2
90+
- uses: actions/checkout@v2
91+
with:
92+
repository: "neuralmagic/sparsezoo"
93+
path: "sparsezoo"
94+
- name: "⚙️ Install sparsezoo dependencies"
95+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
96+
- name: "Clean sparsezoo directory"
97+
run: rm -r sparsezoo/
98+
- name: "⚙️ Install dependencies"
99+
run: pip3 install .[dev,tf_keras]
100+
- name: "🔬 Running keras tests"
101+
run: make test TARGETS=keras
102+
onnx-tests:
103+
runs-on: ubuntu-18.04
104+
needs: diff-check
105+
if: ${{needs.diff-check.outputs.onnx == 1}}
106+
steps:
107+
- uses: actions/checkout@v2
108+
- uses: actions/checkout@v2
109+
with:
110+
repository: "neuralmagic/sparsezoo"
111+
path: "sparsezoo"
112+
- name: "⚙️ Install sparsezoo dependencies"
113+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
114+
- name: "Clean sparsezoo directory"
115+
run: rm -r sparsezoo/
116+
- name: "⚙️ Install dependencies"
117+
run: pip3 install .[dev,torchvision]
118+
- name: "🔬 Running onnx tests"
119+
run: make test TARGETS=onnx
120+
pytorch-tests:
121+
runs-on: ubuntu-18.04
122+
needs: diff-check
123+
if: ${{needs.diff-check.outputs.pytorch == 1}}
124+
steps:
125+
- uses: actions/checkout@v2
126+
- uses: actions/checkout@v2
127+
with:
128+
repository: "neuralmagic/sparsezoo"
129+
path: "sparsezoo"
130+
- name: "⚙️ Install sparsezoo dependencies"
131+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
132+
- name: "Clean sparsezoo directory"
133+
run: rm -r sparsezoo/
134+
- name: "⚙️ Install dependencies"
135+
run: pip3 install .[dev,torchvision]
136+
- name: "🔬 Running pytorch tests"
137+
run: make test TARGETS=pytorch
138+
tensorflow-v1-tests:
139+
runs-on: ubuntu-18.04
140+
needs: diff-check
141+
if: ${{needs.diff-check.outputs.tensorflow_v1 == 1}}
142+
steps:
143+
- uses: actions/checkout@v2
144+
- uses: actions/checkout@v2
145+
with:
146+
repository: "neuralmagic/sparsezoo"
147+
path: "sparsezoo"
148+
- name: "⚙️ Install sparsezoo dependencies"
149+
run: pip3 install -U pip && pip3 install setuptools sparsezoo/
150+
- name: "Clean sparsezoo directory"
151+
run: rm -r sparsezoo/
152+
- name: "⚙️ Install dependencies"
153+
run: pip3 install .[dev,tf_v1]
154+
- name: "🔬 Running tensorflow_v1 tests"
155+
run: make test TARGETS=tensorflow_v1

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ limitations under the License.
2525
<a href="https://github.com/neuralmagic/sparseml/actions/workflows/quality-check.yaml">
2626
<img alt="Quality Check" src="https://img.shields.io/github/workflow/status/neuralmagic/sparseml/Quality%20Checks/main?label=Quality%20Checks&style=for-the-badge" height=25>
2727
</a>
28+
<a href="https://github.com/neuralmagic/sparseml/actions/workflows/merge-test.yaml">
29+
<img alt="Main" src="https://img.shields.io/github/workflow/status/neuralmagic/sparseml/Merge%20Tests/main?style=for-the-badge" height=25>
30+
</a>
2831
</p>
2932
<p>
3033
<a href="https://github.com/neuralmagic/sparseml/blob/main/LICENSE">

0 commit comments

Comments
 (0)