mlc-ai/mlc-zh

Possible error fix on chapter 6

ax7e opened this issue · 1 comments

ax7e commented

The following code could not compile in TVM 0.11.dev,

from tvm import meta_schedule as ms

sch_tuned = ms.tune_tir(
    mod=MyModuleMatmul,
    target="nvidia/tesla-p100",
    config=ms.TuneConfig(
      max_trials_global=64,
      num_trials_per_iter=64,
    ),
    work_dir="./tune_tmp",
    task_name="main"
)
sch_tuned.mod.show()

It should be changed to

from tvm import meta_schedule as ms
from tvm.target import Target

sch_tuned = ms.tune_tir(
    mod=MyModuleMatmul,
    target=Target("nvidia/tesla-p100"),
    max_trials_global=64,
    num_trials_per_iter=64,
    work_dir="./tune_tmp",
    task_name="main"
)
sch_tuned.mod.show()