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

[TVMC][Relay] Introduce executor and runtime parameters #9352

Merged
merged 2 commits into from
Nov 20, 2021

Conversation

Mousius
Copy link
Member

@Mousius Mousius commented Oct 22, 2021

This introduces executor and runtime into the various entrypoints but also into tvmc as --executor and --runtime. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial IRModule rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.

Builds on #9246

@Mousius Mousius force-pushed the tvmc-registry-executor branch 14 times, most recently from 0c84906 to ebd3610 Compare November 16, 2021 10:10
This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

background: this PR implements the accepted RFC apache/tvm-rfcs#29. In discussion over that RFC, there was some desire to move towards a more unified data structure for configuring the compiler. Another pre-RFC was spun out and discussion has been ongoing for some time. Originally I was waiting a bit on this PR to see if that discussion settled quickly, but it's becoming considerably more complex than anticipated with more voices weighing in there than on the original RFC.

A challenge with this PR is that the direction this PR goes is somewhat controversial in context of the pre-RFC's discussion, even though the original RFC was accepted. In order to follow-through on the accepted RFC and avoid bitrot here, I'm going to approve and merge this PR. I've discussed this with dissenters @tqchen and @junrushao1994, and we think this is ok as we've recently cut 0.8. We intend to follow up with another PR implementing the Compilation Configuration RFC next quarter and before the 0.9 release. Though we will technically make two API changes at HEAD before 0.9 is released, in effect there will be only one change when considering releases only. This change should be backwards-compatible with the existing tvm.relay.build API.

@areusch areusch merged commit 0cb6337 into apache:main Nov 20, 2021
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* [TVMC][Relay] Introduce executor and runtime parameters

This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.

* Correct Graph Executor Python API
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* [TVMC][Relay] Introduce executor and runtime parameters

This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.

* Correct Graph Executor Python API
@@ -623,27 +620,13 @@ def create_llvm_options(cpu_ver, config): # pylint: disable=unused-argument
args = [s.replace("=", "@") for s in llvm_options.split()]
return "--llvm-options=" + ",".join(args)

# TVM target attributes string
def create_tvm_options(cpu_ver, config): # pylint: disable=unused-argument
Copy link
Contributor

Choose a reason for hiding this comment

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

This essentially broke the link-params on Hexagon. You added code to transfer target attributes to the executor, but here you removed the target attributes from the hexagon target.

Copy link
Contributor

Choose a reason for hiding this comment

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

ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* [TVMC][Relay] Introduce executor and runtime parameters

This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.

* Correct Graph Executor Python API
yangulei pushed a commit to yangulei/tvm that referenced this pull request Jan 11, 2022
* [TVMC][Relay] Introduce executor and runtime parameters

This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.

* Correct Graph Executor Python API
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [TVMC][Relay] Introduce executor and runtime parameters

This introduces `executor` and `runtime` into the various entrypoints but also into `tvmc` as `--executor` and `--runtime`. This touchs a lot of files and I've tried to update anywhere as necessary.

Notable, executor code generators now accept the initial `IRModule` rather than creating
it themselves so it can be annotated once.

Validated the demo application continues to classify the tabby cat with
new CLI options.

* Correct Graph Executor Python API
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.

3 participants