Skip to content

Conversation

@lhutton1
Copy link
Contributor

@lhutton1 lhutton1 commented Nov 7, 2022

Comes as a followup from conversations in #13216. By making the pass context a global value for both compile and tune commands, we can ensure the pass context is exactly as the user expected and also test components such as convert_graph_layout under a pass context suitable for testing (e.g. add instruments). With this change, it becomes the users responsibility to ensure the PassContext they select is suitable for the passes that will be run. By default, opt_level remains as 3 so current workflows that do not alter the pass context from the command line / TVMC Python API should not be affected.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Nov 7, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@lhutton1
Copy link
Contributor Author

lhutton1 commented Nov 7, 2022

also cc @leandron @ekalda

Comes as a followup from conversations in apache#13216. By making the pass
context a global value for both `compile` and `tune` commands, we can
ensure the pass context is exactly as the user expected and also
test components such as `convert_graph_layout` under a pass context
suitable for testing (e.g. add instruments). With this change, it
becomes the users responsibility to ensure the PassContext they
select is suitable for the passes that will be run. By default,
`opt_level` remains as 3 so current workflows that do not alter the pass
context from the command line / TVMC Python API should not be affected.

Change-Id: I7a601daf6fbe664f77bce1b45efeb7ca29f621b3
@lhutton1 lhutton1 force-pushed the global-pass-context branch from e097d3e to 84c6fa3 Compare November 8, 2022 09:35
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @lhutton1 for cleaning this up!

Change-Id: I04f5bd031ae4717825f42e373bcb0e1e2c1c9d90
@lhutton1 lhutton1 force-pushed the global-pass-context branch from 6012b8b to e685e91 Compare November 9, 2022 11:18
@leandron leandron merged commit 23ade0c into apache:main Nov 10, 2022
@leandron
Copy link
Contributor

Thanks @ekalda @lhutton1

@lhutton1 lhutton1 deleted the global-pass-context branch November 10, 2022 14:08
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
* [TVMC] Global pass context for compile and tune

Comes as a followup from conversations in apache#13216. By making the pass
context a global value for both `compile` and `tune` commands, we can
ensure the pass context is exactly as the user expected and also
test components such as `convert_graph_layout` under a pass context
suitable for testing (e.g. add instruments). With this change, it
becomes the users responsibility to ensure the PassContext they
select is suitable for the passes that will be run. By default,
`opt_level` remains as 3 so current workflows that do not alter the pass
context from the command line / TVMC Python API should not be affected.

Change-Id: I7a601daf6fbe664f77bce1b45efeb7ca29f621b3

* fix vitis-ai test and typo

Change-Id: I04f5bd031ae4717825f42e373bcb0e1e2c1c9d90
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.

4 participants