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] Open transform namespace #3226

Merged
merged 6 commits into from
May 22, 2019
Merged

Conversation

zhiics
Copy link
Member

@zhiics zhiics commented May 22, 2019

This PR is the first item of #3202

Now we open the transform namespace by adding transform.h and transform.py. Currently, pass manager related code is moved to these two files. The ir_pass related code is left in the original place. They will be moved once we finish porting.

cc @jroesch @tqchen @MarisaKirisame @wweic @slyubomirsky

@zhiics
Copy link
Member Author

zhiics commented May 22, 2019

I am also going to change sequential_pass and SequentialPass to sequential. That is what we intended, right? @tqchen @MarisaKirisame

@tqchen
Copy link
Member

tqchen commented May 22, 2019

We don’t want Sequential and sequential, both of which are duplicated.

Consider merge as Sequential(use constructor in py and possibly the same function name in cxx).

Let us double check the desirable API. Specially, we want to have something like

Pass FoldConstant();

@tqchen
Copy link
Member

tqchen commented May 22, 2019

A quick way to check is to see if we can reproduce the example shown in the RFC

@zhiics
Copy link
Member Author

zhiics commented May 22, 2019

I think we should be able to execute that example using the current Sequential, like https://github.com/dmlc/tvm/blob/master/tests/python/relay/test_pass_manager.py#L357

The problem is that we need to finish pass registration, meaning we need to have Pass FoldConstant() first. This is the goal of #3191, @MarisaKirisame is working on it.

But I currently haven't used BuildConfig in Sequential pass yet.

* perform a host of optimizations with a given optimization level and disabled
* passes.
*/
class SequentialNode : public PassNode {
Copy link
Member

Choose a reason for hiding this comment

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

declare node, but hide the implementation inside. (User don't need to see SequentialNode, they only need to see Sequantial)

@tqchen tqchen merged commit c93235d into apache:master May 22, 2019
@tqchen
Copy link
Member

tqchen commented May 22, 2019

Merge this in for now. Thanks, @zhiics. I will propose a few improves in a follow-up PR

@zhiics zhiics deleted the transform branch May 22, 2019 20:58
wweic pushed a commit to wweic/tvm that referenced this pull request Jun 26, 2019
wweic pushed a commit to neo-ai/tvm that referenced this pull request Jun 27, 2019
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.

2 participants