Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Pre-build Reference System Dependencies #9270

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

Mousius
Copy link
Member

@Mousius Mousius commented Oct 13, 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

@areusch
Copy link
Contributor

areusch commented Oct 13, 2021

@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
Copy link
Member Author

Mousius commented Oct 13, 2021

@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
Copy link
Member Author

Mousius commented Oct 13, 2021

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:main Oct 14, 2021
@areusch
Copy link
Contributor

areusch commented Oct 14, 2021

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 free to 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