tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[TFLite][CI] Update TensorFlow dependency to 2.9.1

Open leandron opened this issue 3 years ago • 5 comments
trafficstars

This updates the TF version to be used in TVM CI to 2.9.1, which brings improvements so that more platforms are supported by official packages. This PR updates the Docker images scripting to install TF and TFLite and some CMake changes required when updating from TF 2.6.x to 2.9.x.

Adding it here as a draft until we get #12130 merged.

cc @areusch @Mousius @driazati @NicolaLancellotti for reviews

leandron avatar Jul 19 '22 11:07 leandron

@leandron when investigating the Python deps I also came across this bug. We currently build a tflite library from the tensorflow source, and in TF 2.7 the build system was switched to CMake I believe. I haven't yet had time to solve this, but I'll let you know if I do.

areusch avatar Jul 25 '22 04:07 areusch

@leandron when investigating the Python deps I also came across this bug. We currently build a tflite library from the tensorflow source, and in TF 2.7 the build system was switched to CMake I believe. I haven't yet had time to solve this, but I'll let you know if I do.

This is solved in this PR. The only issue is that the CI is testing with the old images. I'll generate a new set from ci-docker-staging and re-run the tests. it should be fine.

leandron avatar Jul 25 '22 08:07 leandron

hm, was that https://ci.tlcpack.ai/blue/organizations/jenkins/docker-images-ci%2Fdocker-image-run-tests/detail/docker-image-run-tests/171/pipeline?

areusch avatar Jul 25 '22 19:07 areusch

Yes. However it still requires the Docker images to have the updated TF for the whole CI.

I generated a new set, and will make a new CI staging run with the new images. Then it should be fine.

leandron avatar Jul 25 '22 20:07 leandron

ah ok cool--lmk when i can take a look at them

areusch avatar Jul 26 '22 01:07 areusch

@areusch just to update here as we're discussing, once this is merged, the PR that updates the Docker images, will need to update task_config_build_cpu.sh from:

echo set\(USE_TFLITE ON\) >> config.cmake

to:

echo set\(USE_TFLITE /opt/tflite\) >> config.cmake

This way we keep the default source based installation in the new format introduced here.

If I happen to do the update myself, I'll do that update above, but it will be evident if this is not there, the build will fail at Docker image testing time.

leandron avatar Sep 02 '22 15:09 leandron

@mbrookhart could you have a look?

areusch avatar Sep 02 '22 16:09 areusch

lgtm once comments are addressed

Thanks @driazati

leandron avatar Sep 02 '22 18:09 leandron

@tvm-bot rerun

leandron avatar Sep 02 '22 22:09 leandron

@tvm-bot rerun

leandron avatar Sep 05 '22 09:09 leandron

Looks good to me, just wanted to mention that this might break microTVM testing on hardware since RVM uses a different tensorflow version. If it does we need a follow up PR. https://github.com/apache/tvm/blob/2622ac9e638b259cae017813ad93937c0ff8a2f9/apps/microtvm/pyproject.toml#L107

mehrdadh avatar Sep 07 '22 18:09 mehrdadh

Looks good to me, just wanted to mention that this might break microTVM testing on hardware since RVM uses a different tensorflow version. If it does we need a follow up PR.

https://github.com/apache/tvm/blob/2622ac9e638b259cae017813ad93937c0ff8a2f9/apps/microtvm/pyproject.toml#L107

Did this change recently? I’ve run many test rounds and haven’t seen any breakage in microtvm

leandron avatar Sep 07 '22 18:09 leandron

thanks @leandron !!

areusch avatar Sep 07 '22 19:09 areusch

@leandron I don't think it changed recently, it should be fine

mehrdadh avatar Sep 07 '22 20:09 mehrdadh