Skip to content

[IR] Expose list of PassContext configuration names to the Python APIs#8212

Merged
comaniac merged 1 commit into
apache:mainfrom
leandron:pass_context_configs
Jun 9, 2021
Merged

[IR] Expose list of PassContext configuration names to the Python APIs#8212
comaniac merged 1 commit into
apache:mainfrom
leandron:pass_context_configs

Conversation

@leandron

@leandron leandron commented Jun 8, 2021

Copy link
Copy Markdown
Contributor

Expose list of PassContext configurations to the Python APIs:

  • Expose C++ PassContext::ListConfigNames() via its Python counterpart tvm.ir.transform.PassContext.list_configs()
  • Add unit tests for the C++ and Python layers
  • In a follow-up PR we'll use this API to set configurations using tvmc

cc @Mousius @gromero @manupa-arm @areusch for reviews

@junrushao

Copy link
Copy Markdown
Member

CC: @zhiics @comaniac @kevinthesun

@comaniac comaniac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. A nit about the API name. ListAllConfigs seems a bit confusing, as it is actually listing the config names without their values. Maybe ListConfigNames might be better.

@leandron

leandron commented Jun 8, 2021

Copy link
Copy Markdown
Contributor Author

LGTM. A nit about the API name. ListAllConfigs seems a bit confusing, as it is actually listing the config names without their values. Maybe ListConfigNames might be better.

Makes sense, thanks @comaniac I've just renamed it.

@leandron

leandron commented Jun 9, 2021

Copy link
Copy Markdown
Contributor Author

cc @mbaret can you also review and possibly merge?

@mbaret mbaret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread python/tvm/ir/transform.py Outdated
 * Expose C++ PassContext::ListAllConfigs via its Python counterpart
   tvm.ir.transform.PassContext.list_configs()

 * Add unit tests for the C++ and Python layers

@zackcquic zackcquic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @leandron:

LGTM.

May I know what kind of features (next PR as you mentioned before) depend on this change?

@leandron

leandron commented Jun 9, 2021

Copy link
Copy Markdown
Contributor Author

Hi @leandron:

LGTM.

May I know what kind of features (next PR as you mentioned before) depend on this change?

Hi @zackcquic yes, sure. I'm working on a PR to give tvmc the ability to set some PassContext configurations (the ones that can accept simple values) via the command line.

I'm actually going to update this PR to also be able to pass the types of the PassContext configurations, so that I can present better messages.

I have the tvmc changes already done, just thought that separate PRs for the changes was more appropriate, that's is why the tvmc changes are not added here.

@comaniac comaniac merged commit 1f2ca06 into apache:main Jun 9, 2021
@comaniac

comaniac commented Jun 9, 2021

Copy link
Copy Markdown
Contributor

Thanks @leandron @mbaret @zhiics @zackcquic

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Jun 17, 2021
…8212)

* Expose C++ PassContext::ListAllConfigs via its Python counterpart
   tvm.ir.transform.PassContext.list_configs()

 * Add unit tests for the C++ and Python layers
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jun 17, 2021
…8212)

* Expose C++ PassContext::ListAllConfigs via its Python counterpart
   tvm.ir.transform.PassContext.list_configs()

 * Add unit tests for the C++ and Python layers
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.

6 participants