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

[AutoTVM][Testing] Add tune_relay scripts #12685

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

junrushao
Copy link
Member

Example:

python -m tvm.autotvm.testing.tune_relay  \
       --workload bert_base               \
       --input-shape '[1,64]'             \
       --target "llvm"                    \
       --num-trials 800                   \
       --rpc-host 192.168.6.66            \
       --rpc-port 4445                    \
       --rpc-key 3090ti                   \
       --work-dir /logs/autotvm-bert_base \
       --cache-dir /cache-workloads       \
       --graph-tuner True                 \
       --cpu-flush True                   \
       --backend graph

@junrushao junrushao marked this pull request as ready for review September 2, 2022 08:05
@junrushao
Copy link
Member Author

CC: @comaniac @Hzfengsy

Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

Out of curiosity is there any reason this couldn't be integrated into TVMC under tvmc tune? - cc @leandron

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.

Good point @lhutton1 - I think there is a big feature overlap here with tvmc tune, and from the community point of view, tvmc has tests, documentation, tutorials and support material available.

Any reason to have such a similar CLI in a separate place?

@junrushao
Copy link
Member Author

Thanks for asking! As indicated, it’s only used for testing purpose. We have no interest or intent to have any overlap with tvmc, but instead are using this for inspecting performance parity as a testing tool.

@junrushao
Copy link
Member Author

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.

Otherwise LGTM. IMHO, it's no hurt to have testing scripts under certain module in general, as it is serving different users than TVMC. Specifically, testing scripts could be more flexible for future changes as they don't impact user experience.

python/tvm/autotvm/testing/tune_relay.py Show resolved Hide resolved
python/tvm/autotvm/testing/tune_relay.py Show resolved Hide resolved
@leandron
Copy link
Contributor

leandron commented Sep 2, 2022

Otherwise LGTM. IMHO, it's no hurt to have testing scripts under certain module in general, as it is serving different users than TVMC. Specifically, testing scripts could be more flexible for future changes as they don't impact user experience.

Actually thinking this way it makes sense. Thanks @comaniac

@junrushao
Copy link
Member Author

Thanks! Yeah we mainly wanted some flexibility testing things out - and I fully support it if some day you guys want to migrate similar testing logic to TVMC :-)

@junrushao junrushao force-pushed the feature/2022-09-01/autotvm-tuning branch from 835be34 to e760594 Compare September 2, 2022 18:55
Example:

```bash
python -m tvm.autotvm.testing.tune_relay  \
       --workload bert_base               \
       --input-shape '[1,64]'             \
       --target "llvm"                    \
       --num-trials 800                   \
       --rpc-host 192.168.6.66            \
       --rpc-port 4445                    \
       --rpc-key 3090ti                   \
       --work-dir /logs/autotvm-bert_base \
       --cache-dir /cache-workloads       \
       --graph-tuner True                 \
       --cpu-flush True                   \
       --backend graph
```
@junrushao junrushao force-pushed the feature/2022-09-01/autotvm-tuning branch from e760594 to 87cad9d Compare September 2, 2022 19:07
@junrushao junrushao merged commit 0cbf3aa into apache:main Sep 2, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
Example:

```bash
python -m tvm.autotvm.testing.tune_relay  \
       --workload bert_base               \
       --input-shape '[1,64]'             \
       --target "llvm"                    \
       --num-trials 800                   \
       --rpc-host 192.168.6.66            \
       --rpc-port 4445                    \
       --rpc-key 3090ti                   \
       --work-dir /logs/autotvm-bert_base \
       --cache-dir /cache-workloads       \
       --graph-tuner True                 \
       --cpu-flush True                   \
       --backend graph
```
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.

5 participants