-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
d3a3751
to
e99c17d
Compare
0c84906
to
ebd3610
Compare
ebd3610
to
9d59a2f
Compare
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.
9d59a2f
to
cfb297c
Compare
There was a problem hiding this 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.
* [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
* [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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* [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
* [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
* [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
This introduces
executor
andruntime
into the various entrypoints but also intotvmc
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 creatingit themselves so it can be annotated once.
Validated the demo application continues to classify the tabby cat with
new CLI options.
Builds on #9246