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

Align TVM packages with ModelZoo changes #1879

Closed
5 tasks done
ambroise-arm opened this issue Sep 15, 2022 · 3 comments · Fixed by #2158
Closed
5 tasks done

Align TVM packages with ModelZoo changes #1879

ambroise-arm opened this issue Sep 15, 2022 · 3 comments · Fixed by #2158
Assignees
Labels
priority:high High urgency and importance. type:new-feature New functionalities or additions, feature requests.

Comments

@ambroise-arm
Copy link
Contributor

ambroise-arm commented Sep 15, 2022

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

The neural network artifacts built for TVM as part of the ModelZoo CI are changing in layout. The change has been discussed in autowarefoundation/modelzoo#63 and autowarefoundation/autoware#2508. The Autoware packages need to align with the change.

ModelZoo artifacts changed from being held in a single archive to one archive per model/backend combination. It allows users to only download needed archives.

This task depends on #628 being completed first.

The prebuilt asset rework will be needed for the neural networks added in ModelZoo for #908 to be available in Autoware.

Purpose

Reduce bandwidth usage.

Have a better versioning of the models.

Possible approaches

Change from all models being handled by the "neural_networks_provider" package to models being downloaded by packages that need them.

Leverage the newly added versioning of the prebuilt models.

Definition of done

  • Rework prebuilt assets management
  • Model descriptors versioning
@ambroise-arm ambroise-arm added the type:new-feature New functionalities or additions, feature requests. label Sep 15, 2022
@ambroise-arm ambroise-arm self-assigned this Sep 15, 2022
@BonoloAWF BonoloAWF added the priority:high High urgency and importance. label Sep 15, 2022
@angry-crab
Copy link
Contributor

angry-crab commented Sep 28, 2022

Please correct me if I'm wrong. It seems that the currect ci compiles the tvm library and uploads it. The library will be downloaded when building the package. But these packages only contain inference functionality. To make full use of tvm utility, I think it is necessary to create pre and postprocessing operations with tvm as well. For example, this page introduces a simple way to create tvm operations which can be optimized further using different schedule modules. Therefore, in the near future, I'm think of moving the whole pipeline to tvm implementation as opposed to current implementation of c++. Do you think it is necessary or not. If the answer is yes, how should we add corresponding operations to the package? Please let me know you thoughts.

@ambroise-arm
Copy link
Contributor Author

You are correct in the description of the inference functionality.

Note that I have never used those tvm operations, so I don't know how difficult, or how appropriate it would be for what we want to achieve.

From my point of view, using tvm operations in the pre/post processing steps is not necessary. But my motivation for using TVM is mainly based on portability of the hardware, not so much performance. So I am happy with C++ for pre/post processing, but it would most likely be more performant to use code that can be compiled for a dedicated HW backend.
Maybe a first step could be benchmarking lidar_centerpoint with C++ processing to see if it is acceptable or not.

If we do choose to use tvm operations, it may be worth revisiting the way things get compiled. The tvm operations would need to be compiled for the same target backend as the inference, so it may then be interesting to move the compilation of the neural network away from the ModelZoo CI and into the build step of the Autoware package.

@ambroise-arm
Copy link
Contributor Author

Second step was not done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high High urgency and importance. type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants