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

[Relay] Pass manager documentation #3480

Closed
slyubomirsky opened this issue Jul 3, 2019 · 10 comments
Closed

[Relay] Pass manager documentation #3480

slyubomirsky opened this issue Jul 3, 2019 · 10 comments

Comments

@slyubomirsky
Copy link
Contributor

Recently, some parts of the Relay pass manager (#2512) have been merged and have changed the way that passes are invoked in Relay. As this was a breaking change that affects a lot of Relay's functionality, I think it would be useful if there were high-level developer docs for it, explaining how to use it and how everything is meant to work. Is there anyone who is in a good position to take the lead on starting docs for the pass manager?

@zhiics @jroesch @MarisaKirisame @tqchen

@tqchen
Copy link
Member

tqchen commented Jul 3, 2019

To make things more actionable, I would recommend creating a breakdown of lists. In particular, enhancing https://docs.tvm.ai/api/python/relay/transform.html could be one specific item that we can work on.

@slyubomirsky
Copy link
Contributor Author

slyubomirsky commented Jul 3, 2019

Oh, I see, so there is documentation via the generated API pages.

What I had in mind when I wrote this issue was a one-page summary answering the questions, "What is the pass manager?" and "How do I use the pass manager?" Otherwise, it's hard to know quite where to start with writing a pass.

Another action item might be updating the existing instructions on writing a Relay pass to reflect the use of the pass manager: https://docs.tvm.ai/dev/relay_add_pass.html (@weberlo I believe you wrote the first version of that).

@weberlo
Copy link
Contributor

weberlo commented Jul 3, 2019

Yeah. I can update that material if someone's willing to explain to me how writing passes is different with the pass manager. Even some specific examples of where it's used would be helpful to generalize into high-level docs.

@zhiics
Copy link
Member

zhiics commented Jul 3, 2019

@weberlo Thanks for being willing to contribute. I can help when you are writing the doc. There are few docs that may help:

  1. the original issue: [Relay][RFC] Pass Manager #2512
  2. the pass API design issue: [RFC][Relay] Pass API Discussion #3202
  3. Jared's FCRC notebook.
  4. Pass manager unit test.

Please let me know if you need any help. Thanks.

@zhiics
Copy link
Member

zhiics commented Jul 3, 2019

@weberlo I think I can probably start working on it next week. I will ask your guys to help review when it is ready. Thank you.

@slyubomirsky
Copy link
Contributor Author

Thanks for the replies; I think having docs will be very helpful.

@zhiics
Copy link
Member

zhiics commented Jul 9, 2019

#3515

@tqchen
Copy link
Member

tqchen commented Jul 9, 2019

A good first step would be great if we can also have tutorials on how to use them.

I would also like us to address the design philosophy about "trying to make developers easy to customize the pass pipelines", which is different from traditional pass managers. Both in terms of dev docs and user docs(how easy it is to do such customization). Keep in mind such different would clarify our technical difference from traditional compilers' pass managers.

Maybe we should not even call the tutorial pass manager, but rather pass infrastructure.

@slyubomirsky
Copy link
Contributor Author

#3515 has been merged, meaning there is now documentation for how to use the pass infrastructure. Thank you very much for your help, to everyone who contributed.

A remaining step is to update the instructions for writing a pass to include the pass manager (only the last section needs to change and it should reference the other pass manager doc): https://docs.tvm.ai/dev/relay_add_pass.html I will perhaps get around to this myself

@slyubomirsky
Copy link
Contributor Author

New docs have been written and existing ones are updated. Closing unless further changes become necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants