Running the autotuning example, which I’ve downloaded as a standalone Python script, however I am having difficult getting it working.
First, the line from tvm import te
fails with ImportError: cannot import name 'te' from 'tvm'
. I’ve applied a fix by replacing it with import tvm as te
.
However, the template decorator appears to have some issue, since it fails with the following error:
File "example_autotune.py", line 55, in <module>
@autotvm.template("tutorial/matmul_v1") # 1. use a decorator
File "/home/[redacted]/tools/tvm/python/tvm/autotvm/task/task.py", line 284, in template
fname = get_func_name(func)
File "/home/[redacted]/tools/tvm/python/tvm/autotvm/util.py", line 140, in get_func_name
return func.func_name if hasattr(func, 'func_name') else func.__name__
AttributeError: 'str' object has no attribute '__name__'
Given these two issues, does this example include some depreciated features? Or does it only work inside the tvm tree somewhere?