-
Notifications
You must be signed in to change notification settings - Fork 47
Implement a TVM inference pipeline #14
Comments
All dendpency of Autoware need to be supplied as a rosdep package. hence TVM_Runtime needed to be added. Ideally, we want to build a single binary that can support multiple hardware configurations. As part of this work, we need to do the following validation.
@JWhitleyWork can you check to see if we are on the same page? |
@LiyouZhou Yes, this looks correct to me. I'm still working on the ROS package. Please see this TVM config file which enables CUDA, Vulkan, OpenGL, and OpenCL. This will currently only work on ROS Foxy / Ubuntu Focal because Vulkan is not available in Ubuntu Bionic. If using in Bionic, set |
@JWhitleyWork Using modelzoo to build the libtvm runtime shared object and to compile yolo_v2_tiny, I get to the following results.
|
@JWhitleyWork it looks like we still need to build multiple configurations for this package. Is this supported in the ROS distribution model? If CUDA is enabled, tvm v0.7 is preferred as it has more complete support. v0.7 has api change from v0.6 so if you don't mind, can we start with 0.7 so we don't have to go through the upgrade process once committed. See this for a v0.7 installation script. |
@LiyouZhou We can certainly do this. So, I would create 3 different branches each with a different
Each of these would generate a separate package with a different name such as |
@JWhitleyWork I think this is very good to start with. |
@LiyouZhou @LucaFos @ambroise-arm I'm working on the vendor package at https://github.com/autowarefoundation/tvm_vendor. I have installations for
Additional note: You will need to prefix includes with |
@ambroise-arm will be doing this testing in the next couple of days. |
@ambroise-arm |
@JWhitleyWork Tested on melodic. I got to a working pipeline with the following steps:
|
@ambroise-arm Thanks for the detailed feedback! I've done the following to
Please re-test and let me know if you run into anything else. Once you've verified that everything works as expected, I'll circle back around to this PR and make a PR to your repo for some required formatting changes in CMakeLists.txt and package.xml. |
@JWhitleyWork install(DIRECTORY ${SOURCE_DIR}/3rdparty/dmlc-core/include/dmlc
- DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}/dmlc
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
) Otherwise it works fine. |
@ambroise-arm Thanks for the fix! Applied and tested locally for installation location. Additionally, I added the subfolder |
Scratch that. It adds almost 30 minutes to the build which is not acceptable. We'll have to wait until |
@JWhitleyWork It works! |
#13 has been updated with the |
Excellent! I'll go ahead and get the release process started for Melodic. We'll work on Dashing and Foxy once we get to the Autoware.Auto example. |
Last Melodic sync was 11/5 so it might be a couple of weeks before it gets into the release repo. |
@ambroise-arm @LiyouZhou @LucaFos Some quick updates:
Moving the |
@JWhitleyWork I think you inverted the words "catkin_package" and "add_library" in your last message. So far I had only tested building with I am pretty sure that And also about |
Feature request
Description
Proceeding with https://discourse.ros.org/t/unified-ml-inference-in-autoware-a-proposal/14058 plan, we need an implementation for a generic inference pipeline using TVM.
Implementation considerations
The pipeline will be generic, the preprocessing and postprocessing stages will need to be implemented by the user.
Additional information
A validation test will also be provided, running the pipeline on yolo_v2_tiny.
The text was updated successfully, but these errors were encountered: