Skip to content

[docs] Getting Started with TVM: Auto Tuning with Python#7641

Closed
hogepodge wants to merge 62 commits intoapache:mainfrom
hogepodge:tutorial-python-resnet
Closed

[docs] Getting Started with TVM: Auto Tuning with Python#7641
hogepodge wants to merge 62 commits intoapache:mainfrom
hogepodge:tutorial-python-resnet

Conversation

@hogepodge
Copy link
Contributor

Follows up on the TVMC tutorial, shows how to accomplish the same tasks using the python api

Follows up on the TVMC tutorial, shows how to accomplish
the same tasks using the python api
@hogepodge
Copy link
Contributor Author

@tqchen @leandron

@leandron
Copy link
Contributor

cc @mbaret

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, and give people a great perspective on how to use the Python API. Just a few minor comments.

hogepodge and others added 24 commits March 17, 2021 14:02
Removed extra spaces, matched file names, lazy import of timeit.
* Relax simulated qnn tests to prevent flakiness.

* Change name of helper to make pytest happy.
* add support for optional args for frontends tvmc

* remove unnecessary comments

* Add changes suggested by Matt W. via PR

Co-authored-by: Jocelyn <jocelyn@pop-os.localdomain>
* [RUNTIME] Add libbacktrace for backtraces with line numbers

Co-authored-by: Robert Kimball <bobkimball@gmail.com>
* [CPP_RPC] allow user supplied work dir

* clang format
* [TFLite] Cast operator adapted for MLIR-based convertor

Cast operator now can be executed in MLIR-based version.
Unit test updated

Change-Id: I30e5c1c9d69355116b560af8f6d0582b2d593538

* Comment added

Change-Id: I3e2d29ef201283de337168d0b82679b63ca2fcf4
* [AutoScheduler] Add function name in message

* fix
…#7700)

* Handle 0 box case for return_indices=False case

* Add unit test for mx NMS
* [RUNTIME] Cleanup build for libbacktrace

- Introduce TVM_USE_LIBBACKTRACE value macro to be consistent
  wth other value macros(instead of relying on disabled flag).
- Introduce AUTO mode for libbacktrace
- Temporary disable MacOS support in light of recent bug report.
- Refactor out the libbacktrace.cmake to libs
- Properly use TVM_DLL so that code is cross platform.
- Fallback to the weaker dmlc impl when backtrace is disabled.

* Update Logging.cmake

* Update the macro check order to be consistent with the rest.
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Junru Shao <junrushao1994@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Tristan Konolige <tristan.konolige@gmail.com>
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Junru Shao <junrushao1994@gmail.com>
- Updated default Ethos-N driver stack to 21.02
  - Fixed some test failures associated with this change
* [TOPI] Use fixed thread block size in unique op for Vulkan

* forgot to add min for non vk backend
Set with consumers is empty during preparing auto scheduler sketches
for Metal device. Added check on the size of the set.
In case when the set with consumers is empty we just skip this rule.
* This adds a new '--tag' parameter so that we can
   build docker images on a particular tag, not only ':latest'
   as given by Docker

 * It opens up the possibility of generating "staging" images on
   a different tag, in the same servers as we keep the production
   images

 * By default it keeps previous behaviour of using ':latest' tag.
A diamond dependency currently generates a duplication of ancestors:
  A
 / \
B   C
 \ /
  D
under some conditions, this scenario leads to the following dictionnary
entry: "D":[A, A] instead of "D":[A].

This results in failures when subsequently trying to transpose node
states based on this data.

Change-Id: I72f9b19286bbab0581b851c228b9d0e79ead400f
Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with minor nit.

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tqchen and others added 21 commits March 26, 2021 14:25
* [docs] Getting Started with TVM: AutoTVM and Matrix Multiply

This patch moves the matrix multiplcation example tuning
with AutoTVM to the tutorial directory, and expands on the
content. This follows and builds on the section on TE

* Applying lint style

* Fix license

* Apply suggestions from code review

Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>

* Change comparison tolerance to smaller value

Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
* [RUNTIME][WEB] Cleanup logging for web runtime.

The log(info) won't work for web runtime due to the usage of time
function.

- Introduce TVM_LOG_CUSTOMIZE anf TVM_LOG_STACK_TRACE.
- Reorganize the log customization code to wasm_runtime(so non-gpu usecase can apply).
- Update the testcase to cover the logging.

* Fix windows build and address comment.
* Getting Started: Introduction and Installation

The first two sections of the "Getting Started with TVM" guide.
A high level introduction to TVM, and a slight introduction
on installation options.


Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com>
* Some docstring fixes.

* Couple of small fixes:

- Use `west attach` instead of `west debug` in commandline to prevent
  debugger from resetting device.

- Fix warning on use of led_pin in zephyr-runtime/src/main.c.

* Adding Zephyr demo runtime.

* Cleanup of uTVM tests and demo runtime.

* Working on QEMU support.

Need to add board-specific prj.conf files.

* Adding board-specific prj.conf files.

* Some cleanup.

* Lots of hacking to get ONNX model to run on QEMU and nRF5340.

Added test_onnx unit test.

Still need to clean up tutorial.

* Adding data for unit tests.

* Cleanup demo_runtime code.

* Fix up tutorial.

* Couple of small fixes:

- Use `west attach` instead of `west debug` in commandline to prevent
  debugger from resetting device.

- Fix warning on use of led_pin in zephyr-runtime/src/main.c.

* Adding Zephyr demo runtime.

* Cleanup of uTVM tests and demo runtime.

* Working on QEMU support.

Need to add board-specific prj.conf files.

* Adding board-specific prj.conf files.

* Some cleanup.

* Lots of hacking to get ONNX model to run on QEMU and nRF5340.

Added test_onnx unit test.

Still need to clean up tutorial.

* Lots of hacking to get ONNX model to run on QEMU and nRF5340.

Added test_onnx unit test.

Still need to clean up tutorial.

* Adding data for unit tests.

* Cleanup demo_runtime code.

* Fix up tutorial.

* Fix tutorial.

* Fix tutorial and runtime.

* Fix merge conflicts.

* Fix merge conflict.

* Remove redundant files.

* Revert dep.

* Fixup

* Add new files to check_file_type.py.

* Adding missing ONNX file.

* Fixup docs.

* Fix linting rule.

* small fixes

* Add missing file to check_file_type.py.

* clang-format this file.

* Fix formatting.

* Black formatting.

* Lint comments.

* Fix path for test.

* Bump CI.

* Update from_onnx.

* fix path

* Fixing

* Revert dmlc-core to 21cc7de0dc9fd6acb796e1be6181fa8e6b6c8f41

* Fix path again.

* Fix tutorial to not use actual Zephyr.

* Revert submodule version change

* Fix bad merge.

* Trying to fix this mess.

* Fix formatting.

* context -> device

* Removing tutorial since I can't get it to pass CI.

Co-authored-by: Mehrdad Hessar <mehrdad.hessar@gmail.com>
Co-authored-by: Andrew Reusch <areusch@octoml.ai>
Follows up on the TVMC tutorial, shows how to accomplish
the same tasks using the python api
Removed extra spaces, matched file names, lazy import of timeit.
@hogepodge hogepodge requested a review from yzhliu as a code owner March 29, 2021 17:44
@hogepodge
Copy link
Contributor Author

Merge conflicts have turned this into a mess. I'm going to abandon and push a clean patch.

@hogepodge hogepodge closed this Mar 29, 2021
@hogepodge hogepodge deleted the tutorial-python-resnet branch June 24, 2021 23:32
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.

Comments