You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by aleczhanshi via Apache TVM Discuss <no...@discuss.tvm.ai> on 2020/09/21 13:49:33 UTC

[Apache TVM Discuss] [Questions] LocalRunner and RPCRunner


Hi there,

I'm a newbie to TVM and I'm trying to get started with the tuning tutorial for x86 and NVIDIA GPU. My question is about the Runners. It seems like the LocalRunner itself does not distinguish the backend that the tuning is done for, but the tuning by itself should be specific to hardware (CPU/GPU/ASIC). Am I missing anything here?

>         runner=autotvm.LocalRunner(number=1, repeat=10,
>                                    min_repeat_ms=0,
>                                    enable_cpu_cache_flush=True),

If we want to expose the hardware features to the tuning module, should I use the RPCRunner and specify the "device" like below?

>         runner=autotvm.RPCRunner(
>             "1080ti",  # change the device key to your key
>             "0.0.0.0",
>             9190,
>             number=20,
>             repeat=3,
>             timeout=4,
>             min_repeat_ms=150,

Thanks!





---
[Visit Topic](https://discuss.tvm.apache.org/t/localrunner-and-rpcrunner/7959/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/dbf523f834ef8aec44ed1089403452d2134a4455c4777775b87aa45d4f3e1a3d).

[Apache TVM Discuss] [Questions] LocalRunner and RPCRunner

Posted by "Cody H. Yu via Apache TVM Discuss" <no...@discuss.tvm.ai>.

It uses the target specified in MeasureInput. See L428 in

https://github.com/apache/incubator-tvm/blob/master/python/tvm/autotvm/measure/measure_methods.py





---
[Visit Topic](https://discuss.tvm.apache.org/t/localrunner-and-rpcrunner/7959/4) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/98191c062cfba35993df34a6d6ccbe952bcef04cb2d66c1f62b6160c5b4c376e).

[Apache TVM Discuss] [Questions] LocalRunner and RPCRunner

Posted by aleczhanshi via Apache TVM Discuss <no...@discuss.tvm.ai>.

Thanks for the explanation! I'm looking at the LocalBuilder function in both the CPU and GPU tutorials, but neither of them takes any arguments related to the target. How does the builder know about the target?

> tuning_option = {
>     "log_filename": log_file,
>     "tuner": "xgb",
>     "n_trial": 2000,
>     "early_stopping": 600,
>     "measure_option": autotvm.measure_option(
>         builder=autotvm.LocalBuilder(timeout=10),
>         runner=autotvm.LocalRunner(number=20, repeat=3, timeout=4, min_repeat_ms=150),
>     ),
> }

> tuning_option = {
>     'log_filename': log_file,
>     'tuner': 'random',
>     'early_stopping': None,
> 
>     'measure_option': autotvm.measure_option(
>         builder=autotvm.LocalBuilder(),
>         runner=autotvm.LocalRunner(number=1, repeat=10,
>                                    min_repeat_ms=0,
>                                    enable_cpu_cache_flush=True),
>     ),
> }





---
[Visit Topic](https://discuss.tvm.apache.org/t/localrunner-and-rpcrunner/7959/3) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/fc652f7b349061c7805725ab0090cb2ceef4918e04cf7b60c7121bc4c78c9e00).

[Apache TVM Discuss] [Questions] LocalRunner and RPCRunner

Posted by "Cody H. Yu via Apache TVM Discuss" <no...@discuss.tvm.ai>.

The hardware related information is specified in "target". In your case, the target should be `cuda -model=1080ti`. The builder will build the model based on the target, and runner is only in charge of running the built model, so it doesn't have to take the hardware information. Accordingly, the device key in RPC runner is just a label and can be arbitrarily specified.





---
[Visit Topic](https://discuss.tvm.apache.org/t/localrunner-and-rpcrunner/7959/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/474fe0ec55d48d6ebdf75ea8edd4f5fd786a579db6d34194fa187ed62a10a0ac).