Uh oh!
There was an error while loading. Please reload this page.
[tvmc] command line driver 'compile' (part 2/4) - #6302
Conversation
leandron
commented
Aug 19, 2020
Also cc @tom-gall who sent a patch on top of my previous PR adding supporting AArch32. Can you send that one again, once this one is merged? |
tom-gall
commented
Aug 19, 2020
Sure happy to. |
comaniac
left a comment
There was a problem hiding this comment.
Reviewed the argument interface only and have some comments. I'd prefer to have consents on the interface before diving into the implementations.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tqchen
commented
Aug 20, 2020
One thing to note is that given we are updating the target convention to use the json as an input, it might be helpful to think about what is the target that can be accepted from the command line. cc @comaniac@junrushao1994 |
junrushao
commented
Aug 20, 2020
@tqchen I am thinking about unifying target creation from legacy string, JSON file and tags. |
comaniac
commented
Aug 20, 2020
Zhi and I had a discussion with ARM folks today and here is a rough proposal:
As a result, the users that know nothing about the target can simply provide a tag. On ther other hand, advance users can still specify targets in any supported formats. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
leandron
commented
Sep 9, 2020
I updated it removing a skipped test due to #6410, which is now fixed. |
comaniac
left a comment
There was a problem hiding this comment.
Thanks for the changes. It looks much better now.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
comaniac
commented
Sep 10, 2020
cc @masahi@junrushao1994@tqchen for a final review. |
I recently rebased with the latest changes and un-skipped the test fixed by #6442 @tqchen@comaniac@junrushao1994 would you mind having another look into this PR? |
comaniac
left a comment
There was a problem hiding this comment.
LGTM. We can merge it after passing the CI.
Thanks for the efforts :)
Uh oh!
There was an error while loading. Please reload this page.
* Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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: Cody Yu <comaniac0422@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
tqchen
commented
Sep 18, 2020
* [tvmc] command line driver 'compile' (part 2/4) * Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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> * tvmc: adjust TODOs * tvmc: fix linting errors * Address code-review comments * Adjust pytest fixture to not break when there is no tensorflow * Fix frontend tests, to cope with different frameworks in different images * Apply suggestions from code review Co-authored-by: Cody Yu <comaniac0422@gmail.com> * Fix lint and code-review issues * Re-format with black. * tvmc: Move dependencies to extras_requires 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> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* [tvmc] command line driver 'compile' (part 2/4) * Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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> * tvmc: adjust TODOs * tvmc: fix linting errors * Address code-review comments * Adjust pytest fixture to not break when there is no tensorflow * Fix frontend tests, to cope with different frameworks in different images * Apply suggestions from code review Co-authored-by: Cody Yu <comaniac0422@gmail.com> * Fix lint and code-review issues * Re-format with black. * tvmc: Move dependencies to extras_requires 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> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* [tvmc] command line driver 'compile' (part 2/4) * Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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> * tvmc: adjust TODOs * tvmc: fix linting errors * Address code-review comments * Adjust pytest fixture to not break when there is no tensorflow * Fix frontend tests, to cope with different frameworks in different images * Apply suggestions from code review Co-authored-by: Cody Yu <comaniac0422@gmail.com> * Fix lint and code-review issues * Re-format with black. * tvmc: Move dependencies to extras_requires 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> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* [tvmc] command line driver 'compile' (part 2/4) * Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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> * tvmc: adjust TODOs * tvmc: fix linting errors * Address code-review comments * Adjust pytest fixture to not break when there is no tensorflow * Fix frontend tests, to cope with different frameworks in different images * Apply suggestions from code review Co-authored-by: Cody Yu <comaniac0422@gmail.com> * Fix lint and code-review issues * Re-format with black. * tvmc: Move dependencies to extras_requires 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> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* [tvmc] command line driver 'compile' (part 2/4) * Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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> * tvmc: adjust TODOs * tvmc: fix linting errors * Address code-review comments * Adjust pytest fixture to not break when there is no tensorflow * Fix frontend tests, to cope with different frameworks in different images * Apply suggestions from code review Co-authored-by: Cody Yu <comaniac0422@gmail.com> * Fix lint and code-review issues * Re-format with black. * tvmc: Move dependencies to extras_requires 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> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* [tvmc] command line driver 'compile' (part 2/4) * Add 'compile' subcommand into tvmc (tvm.driver.tvmc) * Add frontends: Keras, ONNX, TensorFlow, tflite, PyTorch * Add tests for the 'compile' subcommand * Enable command line driver tests as part of integration tests * Skip tests if the cross-compilation toolchain is not installed 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> * tvmc: adjust TODOs * tvmc: fix linting errors * Address code-review comments * Adjust pytest fixture to not break when there is no tensorflow * Fix frontend tests, to cope with different frameworks in different images * Apply suggestions from code review Co-authored-by: Cody Yu <comaniac0422@gmail.com> * Fix lint and code-review issues * Re-format with black. * tvmc: Move dependencies to extras_requires 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> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
OneIsAll-w
commented
Mar 15, 2021
tvmc first-run with 'compile' problem |
leandron
commented
Mar 15, 2021
This is a small issue, that only reproduce because you probably have an |
OneIsAll-w
commented
Mar 15, 2021
Thanks a lot @leandron |
leandron
commented
Mar 15, 2021
It seems it has something to do with the actual string you're sending on the command line. It is not strictly a bug in tvmc at this point. Can you please file an issue so that we can investigate that? |
OneIsAll-w
commented
Mar 15, 2021
I didn't change anything, I still used the command: |
comaniac
commented
Mar 15, 2021
@OneIsAll-w please do not use the closed PR for bug reporting and discussion. It would be better to create a post in https://discuss.tvm.apache.org/ and point to this PR. |
This is a follow-up PR on top of #6112, introducing
compilesubcommand ontvmcorpython -m tvm.driver.tvmcsetup.pyto make TVM python package ready-to-use on installKnown limitations:
There are still 2 patches to be submitted:
tvmc tuneandtvmc run, both depending on this.In case you want to have a look and test
compile, you can use the--dump-codegen llor--dump-codegen asmor--dump-codegen relayto check the output module as source.A sample usage would look like (assumes TVM is built and working):
@tqchen@comaniac@jroesch, can you have a look?