Skip to content

Conversation

@leandron
Copy link
Contributor

TVMC - a command line driver for TVM

@leandron
Copy link
Contributor Author

If possible, I'll be presenting a live demo today on the "Online Compiler Chat".

@tqchen
Copy link
Member

tqchen commented Jul 24, 2020

@comaniac
Copy link
Contributor

Thanks for the PR! Since CLI itself serves as an infra, it would be better to break this PR to a series of PRs like the following:

  • PR1: The basic CLI infra mainly including 1) CLI setup, 2) the registration mechanism, and 3) the document.
  • PR2: CLI -- compile.
  • PR3: CLI -- run.
  • PR4: CLI -- tune.

In this way, people can focus on the overall CLI infra in the first PR. Once everyone is happy with it, the rest PRs would have a much clearer scope. For example, "CLI -- compile" would attract people who are familiar with compilation flow. In this way, we can expect the following advantages:

  1. We can focus on what functions/options should be included in a scope.
  2. We can focus on the implementation of those functions/options in each scope. For example, I've seen many redundant/similar functions implemented in tvmc and I believe some of them should reuse the existing ones in TVM.
  3. The CLI PRs can be sent and reviewed in parallel, and they won't block each other.

@leandron
Copy link
Contributor Author

leandron commented Aug 4, 2020

Thanks for the PR! Since CLI itself serves as an infra, it would be better to break this PR to a series of PRs like the following:

Sure @comaniac, will do.

@LiyouZhou
Copy link

LiyouZhou commented Aug 6, 2020

The command nametvmc sounds strange, it is not immediately obvious what the c stands for. Can the shell command be called just tvm compile tvm tune etc. same as aws cli or github cli.

@leandron
Copy link
Contributor Author

The command nametvmc sounds strange, it is not immediately obvious what the c stands for. Can the shell command be called just tvm compile tvm tune etc. same as aws cli or github cli.

This is open for discussion - for the moment I'm keeping the original name of the work tvmc, but I'm happy to consider other options (including tvm).

@leandron leandron changed the title TVMC - a command line driver for TVM TVMC - a command line driver for TVM (Part 1) Aug 10, 2020
@leandron
Copy link
Contributor Author

leandron commented Aug 10, 2020

@comaniac here is a new version of this patch with only the minimal code to enable the command line. Follow up patches, that I will send after this, will deal with compile, run and tune functionalities.

So, here is a checklist:

  • tvmc enablement (this)
  • compile
  • run
  • tune
  • Tutorial

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

Thanks for the refactoring! This is now much clearer.

On the other hand, since you also removed all subparsers from this PR, it's hard to imagine the subparser registration mechanism. I'd suggest adding one subparser that does nothing as a placeholder to illustrate the file organization, registration mechanism, and required fields. Otherwise, people might have the similar question as the one I left below.

 * Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

LGTM.

cc @tqchen @jroesch

@tqchen
Copy link
Member

tqchen commented Aug 13, 2020

cc @jroesch @yzhliu @icemelon9 @junrushao1994

@tqchen tqchen merged commit 36d1ed3 into apache:master Aug 16, 2020
@tqchen
Copy link
Member

tqchen commented Aug 16, 2020

Thanks @leandron @comaniac this PR is now merged

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 3, 2020
* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165


Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants