What should I do to understand tvm source code?

I’m familiar with C++ and know the basic concepts about python, and tvm source seems hard to read.

Maybe it’s because lack of prior-knowledge? Should I learn some knowledge about functional programming or Compilation before reading the source code? If not, where should I start?

For example, I want to know the details of tvm.relay.build_module, but when I dive into it using pdb, I soon get lost… I have no roadmap of the whole framework.

Any advice? Thank you!

1 Like

The developer documents would be helpful https://docs.tvm.ai/. Also if you are navigating the code using the IDE, try out https://github.com/tqchen/ffi-navigator which will give you ability to jump across FFIs

1 Like

I am in the same boat as you are. I have started from tvm.relay.build_module(), and got lost multiple time. I am trying to get IDE setup so that I can debug. I am wondering if you are using IDE?

I can not even find IDE setup tutorial to debug.

OK. I’ll try it. Thank you!

I used pycharm and tried pdb to trace the running process, but failed both. I’ll try the method tianqi chen suggested.