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
[DOCS] Devguide: TVM Codebase Walkthrough Tutorial #2160
Comments
For the new folks, like myself, starting from scratch would be a long slog, but doing the more detailed discovery would be beneficial and writing up those experiences perfect for other newbies. Here is my suggestion, for the core developers of pieces of functionality that deliver a particular use case, if you could write a simple description and a list of code segments that follow the implementation. folks like myself can pick that up and transform that into a proper walk through. Two birds one stone: you get a newby to write the doc, and the newby learns by inspection, guided by the principal architect of the flow. |
One thing I am missing for comprehension is a proper architecture description that organizes the problem TVM and VTA are trying to solve, enumerates what the state space is of potential solutions, and why the particular organization was selected to deliver this solution. That architecture description should also identify independent areas of functionality, and I presume that this will be reflected in the code organization and build processes. Those independent areas would be areas of research interest and possibly further expansion of the state space of improved solutions. For example, I would be very interested in the thoughts that went into the transformation from (?) (to be inserted when I know) to Relay. |
I want to contribute some write-up, since this issue is kind of dear to my heart. I can kick-start with a vector-add example, if nobody is going to do it. Recently I've studied how exactly python and c++ interop works (without using pybind or Boost Python etc). It would be interesting to write about it too. Below are things which I think should be documented:
Below are things I'm not familiar with. I appreciate if somebody can write about them.
|
Thanks for @Ravenwater @masahi this all makes sense and please go for it. For specific details, I would recommend us to open new threads(like working threads) in the discuss, where everyone can jump in and add details. |
Ok, started this thread: https://discuss.tvm.ai/t/tvm-vta-architecture-scope-and-roadmap/1212 |
Ah...I think I can take one. As @tqchen know, I am writing articles to introduce TVM to Chinese developers and wish to attract them to join us (see https://zhuanlan.zhihu.com/p/50529704) . My next article will introduce one op of frozen model (like CoreML, Keras and so on) , then how to change into NNVM (Relay doesn't have frontend and I don't also be familiar with that, sorry about this), then how to be called into TVM, then how to become LLVM IR. I will walk through this by detail code (even the exact line) If @tqchen think this way (top -> down) is also good, I will PR this go-through tutorial when I complete this Chinese version. |
Based on #2206, I can elaborate on how a schedule can be formed as a preliminary function body. |
As more contributors start to collaborate on TVM, it would be super helpful to write a few developer guides to walk through the TVM code base. As an open source project, we value the maintainability and docs above the code itself, and we should provide some dev guide to do so. The current runtime system doc is one example. But we need more of these.
In particular, it would be helpful to analysis a simple example (e.g., vector add, or relay compilation) and go through all the files/steps it involved. Because we have the PackedFunc and sometimes code goes across python/c++, such an initial navigation example would be super helpful for beginners who want to work on the codebase. Please reply to this issue if you are interested in helping out on this.
Proposed Action Item
Let us build a dev-guide series called hacking TVM by example. The general idea is to provide a simple python side example and walk through the details, when necessary, we can focus on a particular part of detail and leave others into other examples. This kinda of example is usually complementary to the general document we have so far to highlight certain problems a developer might have.
Some of the existing resources:
We can propose new items, for example, one action item could be what happens when we build an add one function in CUDA and LLVM
The text was updated successfully, but these errors were encountered: