Skip to content

[CI] Pre-build Reference System Dependencies - #9270

Merged
areusch merged 1 commit into
apache:mainfrom
Mousius:reference-system-test-deps
Oct 14, 2021
Merged

[CI] Pre-build Reference System Dependencies#9270
areusch merged 1 commit into
apache:mainfrom
Mousius:reference-system-test-deps

Conversation

@Mousius

Copy link
Copy Markdown
Member

Building these dependencies from scratch in each test was taking much longer than really necessary.

Before:

$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m19.982s
user 0m13.255s
sys 0m3.403s

After:

$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m10.963s
user 0m5.516s
sys 0m2.232s

@areusch

Copy link
Copy Markdown
Contributor

@Mousius do you have an idea how much larger this makes ci-cpu? just wary of including build artifacts in our docker base images

@Mousius

Mousius commented Oct 13, 2021

Copy link
Copy Markdown
MemberAuthor

@areusch the Driver is about 364K and CMSIS NN is about 1.6MB

Building these dependencies from scratch in each test was taking much
longer than really necessary.
Before:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m19.982s
user 0m13.255s
sys 0m3.403s
```
After:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m10.963s
user 0m5.516s
sys 0m2.232s
```
@Mousius
Mousiusforce-pushed the reference-system-test-deps branch from 2b5d824 to 0a25f9eCompareOctober 13, 2021 17:44
@Mousius

Copy link
Copy Markdown
MemberAuthor

Docker output with a cut down ci_cpu:

REPOSITORY TAG IMAGE ID CREATED SIZE
tvm.ci_cpu before-dep 248183f4c170 11 seconds ago 2.16GB
tvm.ci_cpu after-deps 295ad1fb553e 6 minutes ago 2.16GB

Can't figure out how to make this more granular, but seems ok 😸

@areusch
areusch merged commit 4c00264 into apache:mainOct 14, 2021
@areusch

Copy link
Copy Markdown
Contributor

thanks @Mousius, the PR is now merged!

masahi pushed a commit to Laurawly/tvm-1 that referenced this pull request Oct 14, 2021
Building these dependencies from scratch in each test was taking much
longer than really necessary.
Before:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m19.982s
user 0m13.255s
sys 0m3.403s
```
After:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m10.963s
user 0m5.516s
sys 0m2.232s
```
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
Building these dependencies from scratch in each test was taking much
longer than really necessary.
Before:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m19.982s
user 0m13.255s
sys 0m3.403s
```
After:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m10.963s
user 0m5.516s
sys 0m2.232s
```
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
Building these dependencies from scratch in each test was taking much
longer than really necessary.
Before:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m19.982s
user 0m13.255s
sys 0m3.403s
```
After:
```
$ time python3 -m pytest tests/python/contrib/test_ethosu/test_codegen.py::test_tflite_depthwise_conv2d[strides0-dilation0-SAME-kernel_shape0-relu-ifm_shape0-ethos-u55-256]
real 0m10.963s
user 0m5.516s
sys 0m2.232s
```
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Mousius@areusch