Skip to content

Conversation

@cconvey
Copy link
Contributor

@cconvey cconvey commented Feb 18, 2022

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

@cconvey
Copy link
Contributor Author

cconvey commented Feb 18, 2022

cc: @areusch

@cconvey
Copy link
Contributor Author

cconvey commented Feb 22, 2022

cc: @jwfromm

Copy link
Contributor

@gromero gromero left a comment

Choose a reason for hiding this comment

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

@cconvey I think that's correct. For instance, we can now pass a Runtime() object and a Executor() object (that can be of aot or graph type) to relay.build, so runtime and executor are different concepts, although quite dependent when "running/executing" the runtime.

Please add the tag [TVMC] in front of the commit message title and write a commit message quickly explaining the change. Having an empty commit body messages is not a good practice in any case.

As default for the TVM project, when merged to the tree, a patchset gets the commit title from the PR title and a single patch like this one gets its title from the single patch associated to the PR, so in this case you need to push the commit again.

Thank you.

@gromero
Copy link
Contributor

gromero commented Feb 22, 2022

cc @leandron

@cconvey
Copy link
Contributor Author

cconvey commented Feb 22, 2022

Thanks @gromero ! Would you mind clarifying part of your comment?

... we can now pass a Runtime() object and a Executor() object

When you write Runtime() and Executor(), are you referring to actual C++/Python functions or class names? Or should I read that as pseudocode that wouldn't be literally valid in TVM?

My impression was that TVM doesn't actually use common base classes, etc. to ensure a common interface across the different executor implementations.

@gromero
Copy link
Contributor

gromero commented Feb 24, 2022

Thanks @gromero ! Would you mind clarifying part of your comment?

... we can now pass a Runtime() object and a Executor() object

When you write Runtime() and Executor(), are you referring to actual C++/Python functions or class names? Or should I read that as pseudocode that wouldn't be literally valid in TVM?

@cconvey I had the Runtime and Executor Python classes in mind yep, the ones found in the source below, which are actually mapped to the C++ code found in ./src, via the CFFI:

https://github.com/apache/tvm/blob/main/python/tvm/relay/backend/executor.py#L27
https://github.com/apache/tvm/blob/main/python/tvm/relay/backend/runtime.py#L27

and used, for instance, like in:

https://github.com/apache/tvm/blob/main/tests/micro/zephyr/test_zephyr_aot.py#L69-L72

But more broadly I was just saying that if I'm not mistaken in the past the concepts of runtime and executor were not as clear as they are now, back when there wasn't the even the AOT executor and before the discussions/changes around:

#9352

... and I think your patch is fixing what looks a reminiscent code of that period.

@cconvey
Copy link
Contributor Author

cconvey commented Feb 24, 2022

Thanks @gromero for all the background information, I find it very helpful! AFAIK I've addressed your feedback.

Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

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

LGTM

@gromero
Copy link
Contributor

gromero commented Feb 25, 2022

@leandron It seems the CI failed due to an unrelated issue (something related to Ethos-U55 AOT tests, but I can't follow exactly what) Have you ever seen this error before? Is it known to be a flaky test? hmm just realized that @areusch seems to wresting with some ethos-u55 test in here too: #10283 (comment)

@cconvey The CI failed but I can't see how it can be related to your change, hence while we try to understand it better could you please re-trigger the CI? (you can, for example, just do git --amend --no-edit to change the commit hash and push --force again).

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.

thanks @gromero !

@areusch
Copy link
Contributor

areusch commented Feb 28, 2022

@cconvey yeah i think these are the flaky ethos-u tests, can you push again? I think #10020 but unsure if there is a better bug for this particular flake

Copy link
Contributor

@jwfromm jwfromm left a comment

Choose a reason for hiding this comment

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

Makes sense to me, thanks @cconvey.

Renames variable from `runtime` with `executor` to better
reflect current terminology and reduce confusion.
@cconvey
Copy link
Contributor Author

cconvey commented Mar 23, 2022

@tqchen Ready for merge

@masahi masahi merged commit e956eb3 into apache:main Mar 25, 2022
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
Renames variable from `runtime` with `executor` to better
reflect current terminology and reduce confusion.
@cconvey cconvey deleted the tvmc_cleanup branch May 5, 2022 13:26
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