Unverified Commit 3fb937fe by Tianqi Chen Committed by GitHub

[DOCS] Fix vta tutorial (#4809)

parent 6f7d6fa4
...@@ -25,6 +25,7 @@ rm -rf docs/_build/html/javadoc ...@@ -25,6 +25,7 @@ rm -rf docs/_build/html/javadoc
# remove stale tutorials and always build from scratch. # remove stale tutorials and always build from scratch.
rm -rf docs/tutorials rm -rf docs/tutorials
rm -rf docs/vta/tutorials
# C++ doc # C++ doc
make doc make doc
......
...@@ -165,7 +165,7 @@ def compile_network(env, target, model, start_pack, stop_pack): ...@@ -165,7 +165,7 @@ def compile_network(env, target, model, start_pack, stop_pack):
# ---------------------------------- # ----------------------------------
# key total free pending # key total free pending
# ---------------------------------- # ----------------------------------
# pynq 6 6 0 # pynq 6 6 0
# rpi3b 11 11 0 # rpi3b 11 11 0
# ---------------------------------- # ----------------------------------
# #
...@@ -223,7 +223,7 @@ tuning_option = { ...@@ -223,7 +223,7 @@ tuning_option = {
# .. note:: How to set tuning options # .. note:: How to set tuning options
# #
# In general, the default values provided here work well. # In general, the default values provided here work well.
# If you have enough time budget, you can set :code:`n_trial`, :code:`early_stopping` # If you have enough time budget, you can set :code:`n_trial`, :code:`early_stopping`
# to larger values, makes the tuning run for longer. # to larger values, makes the tuning run for longer.
# If your device is under-powered or your conv2d operators are large, consider # If your device is under-powered or your conv2d operators are large, consider
# setting a longer timeout. # setting a longer timeout.
...@@ -348,12 +348,13 @@ def tune_and_evaluate(tuning_opt): ...@@ -348,12 +348,13 @@ def tune_and_evaluate(tuning_opt):
# Perform task extraction on Relay program # Perform task extraction on Relay program
print("Extract tasks...") print("Extract tasks...")
relay_prog, params = compile_network(env, target, network, start_pack, stop_pack) relay_prog, params = compile_network(env, target, network, start_pack, stop_pack)
tasks = autotvm.task.extract_from_program(func=relay_prog, mod = relay.Module.from_expr(relay_prog)
tasks = autotvm.task.extract_from_program(mod,
params=params, params=params,
ops=(tvm.relay.op.nn.conv2d,), ops=(tvm.relay.op.nn.conv2d,),
target=target, target=target,
target_host=env.target_host) target_host=env.target_host)
# We should have extracted 10 convolution tasks # We should have extracted 10 convolution tasks
assert len(tasks) == 10 assert len(tasks) == 10
print("Extracted {} conv2d tasks:".format(len(tasks))) print("Extracted {} conv2d tasks:".format(len(tasks)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment