You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2023/01/12 19:36:15 UTC
[tvm-site] branch asf-site updated: deploying docs (apache/tvm@c3c6276c061400a5231847697b3763417baf4f88)
This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/tvm-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new f7f2e4c7d6 deploying docs (apache/tvm@c3c6276c061400a5231847697b3763417baf4f88)
f7f2e4c7d6 is described below
commit f7f2e4c7d6e9bab4a76908bece5b368a5af2e3bd
Author: tvm-bot <95...@users.noreply.github.com>
AuthorDate: Thu Jan 12 19:36:07 2023 +0000
deploying docs (apache/tvm@c3c6276c061400a5231847697b3763417baf4f88)
---
.../tune_relay_cuda.py | 4 -
.../067cf39a44d9f315a39f8a7547c556d8/install.py | 6 -
.../tune_sparse_x86.py | 5 -
.../deploy_sparse.ipynb | 11 -
.../0e2f38fcb1a1fb3e636e5953aa600dee/from_mxnet.py | 5 +-
.../opt_gemm.ipynb | 11 -
.../tvmc_python.py | 5 -
.../micro_pytorch.py | 5 -
.../from_paddle.py | 5 -
.../tune_network_arm.py | 5 -
.../deploy_prequantized_tflite.ipynb | 11 -
.../intrin_math.ipynb | 2 +-
.../deploy_model_on_android.py | 5 -
.../tvmc_command_line_driver.py | 5 -
.../deploy_model_on_adreno.py | 6 -
.../286e7f77f494a25312ac88e3f234822e/extern_op.py | 5 -
.../using_pipeline_executor.py | 10 -
.../2a0982f8ca0176cb17713d28286536e4/reduction.py | 3 -
.../autotvm_relay_x86.ipynb | 11 -
.../micro_tflite.py | 5 -
.../introduction.py | 5 -
.../tune_relay_arm.py | 5 -
.../3a9b1d387f618487c8ccf6b8b78ae179/intro_topi.py | 4 -
.../from_coreml.py | 5 -
.../opt_conv_cuda.py | 10 +-
.../relay_quick_start.ipynb | 11 -
.../deploy_model_on_nano.py | 4 -
.../deploy_model_on_rasp.py | 6 -
.../tensor_expr_get_started.py | 5 -
.../428c6201e29ce74e73c6b41eee589f62/tensorize.py | 5 -
.../tensor_expr_get_started.ipynb | 11 -
.../use_pass_infra.py | 5 -
.../micro_ethosu.ipynb | 11 -
.../deploy_prequantized_tflite.py | 5 -
.../autotvm_relay_x86.py | 5 -
.../tensor_ir_blitz_course.py | 4 -
.../tune_relay_mobile_gpu.py | 5 -
.../tune_network_mali.py | 5 -
.../tune_relay_x86.py | 5 -
.../tuple_inputs.py | 5 -
.../tune_conv2d_cuda.py | 4 -
.../6e0673ce1f08636c34d0b9a73ea114f7/uma.ipynb | 11 -
.../opt_conv_tensorcore.py | 4 -
.../cross_compilation_and_rpc.py | 5 -
.../from_darknet.py | 6 -
.../deploy_object_detection_pytorch.py | 6 -
.../deploy_quantized.py | 5 -
.../micro_reference_vm.py | 6 -
.../from_tensorflow.py | 6 -
.../opt_conv_cuda.ipynb | 11 -
.../8c7d8fd6a4b93bcff1f5573943dd02f4/scan.py | 3 -
.../tvmc_python.ipynb | 11 -
.../autotvm_matmul_x86.py | 5 -
.../96137df89d8034b548f407123ec50ce9/opt_gemm.py | 5 -
.../deploy_sparse.py | 5 -
.../micro_autotune.py | 5 -
.../introduction.ipynb | 11 -
.../from_tflite.py | 6 -
.../micro_ethosu.py | 5 -
.../bring_your_own_datatypes.ipynb | 11 -
.../deploy_prequantized.ipynb | 11 -
.../c23f7654585d9b0fa2129e1765b2a8f2/from_keras.py | 3 -
.../c253040abc62eace272e406b7e1a4df5/tedd.py | 5 -
.../low_level_custom_pass.py | 5 -
.../using_relay_viz.py | 5 -
.../relay_quick_start.py | 10 +-
.../deploy_ssd_gluoncv.py | 5 -
.../use_pass_instrument.py | 5 -
.../using_external_lib.py | 5 -
.../intrin_math.py | 7 +-
.../schedule_primitives.py | 5 -
.../dabb6b43ea9ef9d7bd1a3912001deace/build_gcn.py | 5 -
.../tune_conv2d_layer_cuda.py | 4 -
.../tune_network_x86.py | 5 -
.../auto_scheduler_matmul_x86.py | 5 -
.../tune_network_cuda.py | 5 -
.../eb551cfff8900ec35fae9f15aa728e45/from_onnx.py | 5 -
.../bring_your_own_datatypes.py | 5 -
.../tvmc_command_line_driver.ipynb | 11 -
.../from_oneflow.py | 3 -
.../f8a7209a0e66b246185bfc41bbc82f54/micro_aot.py | 5 -
.../from_pytorch.py | 6 -
.../f9c6910c7b4a120c51a9bf48f34f3ad7/uma.py | 6 -
.../deploy_prequantized.py | 5 -
docs/_images/sphx_glr_micro_train_001.png | Bin 330120 -> 335230 bytes
docs/_images/sphx_glr_micro_train_thumb.png | Bin 23754 -> 23974 bytes
.../how_to/compile_models/from_coreml.rst.txt | 20 +-
.../how_to/compile_models/from_darknet.rst.txt | 25 +-
.../how_to/compile_models/from_keras.rst.txt | 20 +-
.../how_to/compile_models/from_mxnet.rst.txt | 26 +-
.../how_to/compile_models/from_oneflow.rst.txt | 26 +-
.../how_to/compile_models/from_onnx.rst.txt | 26 +-
.../how_to/compile_models/from_paddle.rst.txt | 20 +-
.../how_to/compile_models/from_pytorch.rst.txt | 29 ++-
.../how_to/compile_models/from_tensorflow.rst.txt | 41 ++--
.../how_to/compile_models/from_tflite.rst.txt | 23 +-
.../compile_models/sg_execution_times.rst.txt | 22 +-
.../deploy_models/deploy_model_on_adreno.rst.txt | 39 ++-
.../deploy_models/deploy_model_on_android.rst.txt | 34 +--
.../deploy_models/deploy_model_on_nano.rst.txt | 37 ++-
.../deploy_models/deploy_model_on_rasp.rst.txt | 37 ++-
.../deploy_object_detection_pytorch.rst.txt | 31 ++-
.../deploy_models/deploy_prequantized.rst.txt | 75 +++---
.../deploy_prequantized_tflite.rst.txt | 81 +++----
.../how_to/deploy_models/deploy_quantized.rst.txt | 22 +-
.../how_to/deploy_models/deploy_sparse.rst.txt | 45 ++--
.../deploy_models/deploy_ssd_gluoncv.rst.txt | 24 +-
.../deploy_models/sg_execution_times.rst.txt | 20 +-
.../extend_tvm/bring_your_own_datatypes.rst.txt | 83 +++----
.../extend_tvm/low_level_custom_pass.rst.txt | 20 +-
.../how_to/extend_tvm/sg_execution_times.rst.txt | 10 +-
.../how_to/extend_tvm/use_pass_infra.rst.txt | 42 ++--
.../how_to/extend_tvm/use_pass_instrument.rst.txt | 80 +++---
.../optimize_operators/opt_conv_cuda.rst.txt | 39 +--
.../optimize_operators/opt_conv_tensorcore.rst.txt | 27 +--
.../how_to/optimize_operators/opt_gemm.rst.txt | 89 +++----
.../optimize_operators/sg_execution_times.rst.txt | 8 +-
.../sg_execution_times.rst.txt | 14 +-
.../tune_conv2d_layer_cuda.rst.txt | 41 ++--
.../tune_network_arm.rst.txt | 26 +-
.../tune_network_cuda.rst.txt | 26 +-
.../tune_network_mali.rst.txt | 24 +-
.../tune_network_x86.rst.txt | 26 +-
.../tune_sparse_x86.rst.txt | 168 ++++++-------
.../tune_with_autotvm/sg_execution_times.rst.txt | 10 +-
.../tune_with_autotvm/tune_conv2d_cuda.rst.txt | 211 ++++++++++++----
.../tune_with_autotvm/tune_relay_arm.rst.txt | 26 +-
.../tune_with_autotvm/tune_relay_cuda.rst.txt | 31 ++-
.../tune_relay_mobile_gpu.rst.txt | 28 +--
.../tune_with_autotvm/tune_relay_x86.rst.txt | 14 +-
.../how_to/work_with_microtvm/micro_aot.rst.txt | 28 +--
.../work_with_microtvm/micro_autotune.rst.txt | 52 ++--
.../how_to/work_with_microtvm/micro_ethosu.rst.txt | 51 ++--
.../work_with_microtvm/micro_pytorch.rst.txt | 28 +--
.../how_to/work_with_microtvm/micro_tflite.rst.txt | 32 +--
.../how_to/work_with_microtvm/micro_train.rst.txt | 18 +-
.../work_with_microtvm/sg_execution_times.rst.txt | 18 +-
.../how_to/work_with_relay/build_gcn.rst.txt | 28 +--
.../work_with_relay/sg_execution_times.rst.txt | 10 +-
.../work_with_relay/using_external_lib.rst.txt | 22 +-
.../using_pipeline_executor.rst.txt | 68 +++---
.../how_to/work_with_relay/using_relay_viz.rst.txt | 22 +-
.../how_to/work_with_schedules/extern_op.rst.txt | 18 +-
.../how_to/work_with_schedules/intrin_math.rst.txt | 31 ++-
.../how_to/work_with_schedules/reduction.rst.txt | 44 ++--
.../how_to/work_with_schedules/scan.rst.txt | 26 +-
.../schedule_primitives.rst.txt | 52 ++--
.../work_with_schedules/sg_execution_times.rst.txt | 14 +-
.../how_to/work_with_schedules/tedd.rst.txt | 26 +-
.../how_to/work_with_schedules/tensorize.rst.txt | 44 ++--
.../work_with_schedules/tuple_inputs.rst.txt | 16 +-
.../tutorials/autotvm/sg_execution_times.rst.txt | 6 +-
.../frontend/deploy_classification.rst.txt | 2 +-
.../tutorials/frontend/deploy_detection.rst.txt | 2 +-
.../tutorials/frontend/sg_execution_times.rst.txt | 6 +-
.../tutorials/optimize/sg_execution_times.rst.txt | 6 +-
.../topic/vta/tutorials/sg_execution_times.rst.txt | 6 +-
.../tutorial/auto_scheduler_matmul_x86.rst.txt | 38 +--
docs/_sources/tutorial/autotvm_matmul_x86.rst.txt | 58 ++---
docs/_sources/tutorial/autotvm_relay_x86.rst.txt | 145 +++++------
.../tutorial/cross_compilation_and_rpc.rst.txt | 26 +-
docs/_sources/tutorial/intro_topi.rst.txt | 45 ++--
docs/_sources/tutorial/introduction.rst.txt | 15 +-
docs/_sources/tutorial/relay_quick_start.rst.txt | 35 +--
docs/_sources/tutorial/sg_execution_times.rst.txt | 28 +--
.../tutorial/tensor_expr_get_started.rst.txt | 189 +++++++--------
.../tutorial/tensor_ir_blitz_course.rst.txt | 41 ++--
.../tutorial/tvmc_command_line_driver.rst.txt | 41 ++--
docs/_sources/tutorial/tvmc_python.rst.txt | 41 ++--
docs/_sources/tutorial/uma.rst.txt | 60 ++---
docs/commit_hash | 2 +-
docs/how_to/compile_models/from_darknet.html | 2 +-
docs/how_to/compile_models/from_mxnet.html | 2 +-
docs/how_to/compile_models/from_oneflow.html | 14 +-
docs/how_to/compile_models/from_onnx.html | 4 +-
docs/how_to/compile_models/from_pytorch.html | 16 +-
docs/how_to/compile_models/from_tensorflow.html | 2 +-
docs/how_to/compile_models/sg_execution_times.html | 22 +-
.../deploy_models/deploy_model_on_adreno.html | 2 +-
.../deploy_models/deploy_model_on_android.html | 2 +-
.../deploy_object_detection_pytorch.html | 53 ++--
docs/how_to/deploy_models/deploy_prequantized.html | 11 +-
.../deploy_models/deploy_prequantized_tflite.html | 7 +-
docs/how_to/deploy_models/deploy_quantized.html | 2 +-
docs/how_to/deploy_models/deploy_sparse.html | 3 -
docs/how_to/deploy_models/deploy_ssd_gluoncv.html | 36 +--
docs/how_to/deploy_models/sg_execution_times.html | 20 +-
.../extend_tvm/bring_your_own_datatypes.html | 5 +-
docs/how_to/extend_tvm/sg_execution_times.html | 10 +-
docs/how_to/extend_tvm/use_pass_instrument.html | 16 +-
docs/how_to/optimize_operators/opt_conv_cuda.html | 5 +-
.../optimize_operators/opt_conv_tensorcore.html | 2 +-
docs/how_to/optimize_operators/opt_gemm.html | 19 +-
.../optimize_operators/sg_execution_times.html | 8 +-
.../sg_execution_times.html | 14 +-
.../tune_conv2d_layer_cuda.html | 4 +-
.../tune_with_autoscheduler/tune_network_cuda.html | 4 +-
.../tune_with_autoscheduler/tune_network_x86.html | 4 +-
.../tune_with_autoscheduler/tune_sparse_x86.html | 134 +++++------
.../tune_with_autotvm/sg_execution_times.html | 10 +-
.../how_to/tune_with_autotvm/tune_conv2d_cuda.html | 196 ++++++++++++---
docs/how_to/work_with_microtvm/micro_autotune.html | 16 +-
docs/how_to/work_with_microtvm/micro_ethosu.html | 3 -
docs/how_to/work_with_microtvm/micro_pytorch.html | 5 +-
docs/how_to/work_with_microtvm/micro_train.html | 16 +-
.../work_with_microtvm/sg_execution_times.html | 22 +-
.../how_to/work_with_relay/sg_execution_times.html | 10 +-
.../work_with_relay/using_pipeline_executor.html | 8 +-
docs/how_to/work_with_schedules/intrin_math.html | 3 +-
.../work_with_schedules/sg_execution_times.html | 14 +-
docs/how_to/work_with_schedules/tensorize.html | 2 +-
docs/install/nnpack.html | 12 +-
docs/reference/api/python/auto_scheduler.html | 4 +-
.../api/typedoc/classes/bytestreamreader.html | 12 +-
.../api/typedoc/classes/cachedcallstack.html | 34 +--
docs/reference/api/typedoc/classes/dldatatype.html | 12 +-
docs/reference/api/typedoc/classes/dldevice.html | 10 +-
.../reference/api/typedoc/classes/environment.html | 12 +-
docs/reference/api/typedoc/classes/ffilibrary.html | 20 +-
.../api/typedoc/classes/graphexecutor.html | 16 +-
docs/reference/api/typedoc/classes/instance.html | 40 +--
docs/reference/api/typedoc/classes/memory.html | 34 +--
docs/reference/api/typedoc/classes/module.html | 10 +-
docs/reference/api/typedoc/classes/ndarray.html | 22 +-
.../api/typedoc/classes/packedfunccell.html | 6 +-
docs/reference/api/typedoc/classes/rpcserver.html | 14 +-
docs/reference/api/typedoc/classes/scalar.html | 6 +-
.../api/typedoc/classes/webgpucontext.html | 12 +-
docs/reference/api/typedoc/enums/argtypecode.html | 30 +--
.../api/typedoc/enums/aynccallbackcode.html | 4 +-
.../api/typedoc/enums/dldatatypecode.html | 8 +-
.../api/typedoc/enums/rpcserverstate.html | 12 +-
docs/reference/api/typedoc/enums/sizeof.html | 18 +-
docs/reference/api/typedoc/index.html | 112 ++++-----
.../api/typedoc/interfaces/disposable.html | 2 +-
.../api/typedoc/interfaces/functioninfo.html | 6 +-
.../api/typedoc/interfaces/libraryprovider.html | 4 +-
docs/searchindex.js | 2 +-
.../vta/tutorials/autotvm/sg_execution_times.html | 6 +-
.../tutorials/frontend/deploy_classification.html | 2 +-
.../vta/tutorials/frontend/deploy_detection.html | 2 +-
.../vta/tutorials/frontend/sg_execution_times.html | 10 +-
.../vta/tutorials/optimize/sg_execution_times.html | 6 +-
docs/topic/vta/tutorials/sg_execution_times.html | 6 +-
docs/tutorial/auto_scheduler_matmul_x86.html | 4 +-
docs/tutorial/autotvm_matmul_x86.html | 20 +-
docs/tutorial/autotvm_relay_x86.html | 267 ++++++++++-----------
docs/tutorial/cross_compilation_and_rpc.html | 2 +-
docs/tutorial/intro_topi.html | 2 +-
docs/tutorial/introduction.html | 3 -
docs/tutorial/relay_quick_start.html | 3 -
docs/tutorial/sg_execution_times.html | 36 +--
docs/tutorial/tensor_expr_get_started.html | 49 ++--
docs/tutorial/tvmc_command_line_driver.html | 3 -
docs/tutorial/tvmc_python.html | 3 -
docs/tutorial/uma.html | 3 -
256 files changed, 2441 insertions(+), 2907 deletions(-)
diff --git a/docs/_downloads/0387f07dee851b2b8c6b73e3e88c3140/tune_relay_cuda.py b/docs/_downloads/0387f07dee851b2b8c6b73e3e88c3140/tune_relay_cuda.py
index 7cb6cb8dd3..ee0a83ab8e 100644
--- a/docs/_downloads/0387f07dee851b2b8c6b73e3e88c3140/tune_relay_cuda.py
+++ b/docs/_downloads/0387f07dee851b2b8c6b73e3e88c3140/tune_relay_cuda.py
@@ -61,11 +61,7 @@ __name__ == "__main__":` block.
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import os
import numpy as np
diff --git a/docs/_downloads/067cf39a44d9f315a39f8a7547c556d8/install.py b/docs/_downloads/067cf39a44d9f315a39f8a7547c556d8/install.py
index b864dbfa85..0eb3ccc94c 100644
--- a/docs/_downloads/067cf39a44d9f315a39f8a7547c556d8/install.py
+++ b/docs/_downloads/067cf39a44d9f315a39f8a7547c556d8/install.py
@@ -48,9 +48,3 @@ methods for installing TVM. These include:
# Check out `TLCPack <https://tlcpack.ai>`_ to learn more. Note that the
# third party binary packages could contain additional licensing terms for
# the hardware drivers that are bundled with it.
-
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
diff --git a/docs/_downloads/07733b6b2cc4df026fce525285e8f538/tune_sparse_x86.py b/docs/_downloads/07733b6b2cc4df026fce525285e8f538/tune_sparse_x86.py
index 0a2ddbd1bd..3d810b25fe 100644
--- a/docs/_downloads/07733b6b2cc4df026fce525285e8f538/tune_sparse_x86.py
+++ b/docs/_downloads/07733b6b2cc4df026fce525285e8f538/tune_sparse_x86.py
@@ -35,11 +35,6 @@ get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
diff --git a/docs/_downloads/0b60295044fd20226a0d5adc52b50b2f/deploy_sparse.ipynb b/docs/_downloads/0b60295044fd20226a0d5adc52b50b2f/deploy_sparse.ipynb
index 1e73311150..8ec08a8ee3 100644
--- a/docs/_downloads/0b60295044fd20226a0d5adc52b50b2f/deploy_sparse.ipynb
+++ b/docs/_downloads/0b60295044fd20226a0d5adc52b50b2f/deploy_sparse.ipynb
@@ -18,17 +18,6 @@
"\n# Deploy a Hugging Face Pruned Model on CPU\n**Author**: [Josh Fromm](https://github.com/jwfromm)\n\nThis tutorial demonstrates how to take any pruned model, in this case [PruneBert\nfrom Hugging Face](https://huggingface.co/huggingface/prunebert-base-uncased-6-finepruned-w-distil-squad),\nand use TVM to leverage the model's sparsity support to produce real speedups. Although\nthe primary purpose of this tutorial is to realize speedups on already pruned\nmodels, it may also be [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/0e2f38fcb1a1fb3e636e5953aa600dee/from_mxnet.py b/docs/_downloads/0e2f38fcb1a1fb3e636e5953aa600dee/from_mxnet.py
index cfd66ecdb7..0694d2aed0 100644
--- a/docs/_downloads/0e2f38fcb1a1fb3e636e5953aa600dee/from_mxnet.py
+++ b/docs/_downloads/0e2f38fcb1a1fb3e636e5953aa600dee/from_mxnet.py
@@ -33,13 +33,10 @@ or please refer to official installation guide.
https://mxnet.apache.org/versions/master/install/index.html
"""
+# some standard imports
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-# some standard imports
import mxnet as mx
import tvm
import tvm.relay as relay
diff --git a/docs/_downloads/0f8d36b3ffd04a5a08089dc671eb788e/opt_gemm.ipynb b/docs/_downloads/0f8d36b3ffd04a5a08089dc671eb788e/opt_gemm.ipynb
index 0212b828d4..143634f2bf 100644
--- a/docs/_downloads/0f8d36b3ffd04a5a08089dc671eb788e/opt_gemm.ipynb
+++ b/docs/_downloads/0f8d36b3ffd04a5a08089dc671eb788e/opt_gemm.ipynb
@@ -18,17 +18,6 @@
"\n\n# How to optimize GEMM on CPU\n**Author**: [Jian Weng](https://github.com/were), [Ruofei Yu](https://github.com/yuruofeifei)\n\n(TL;DR) TVM provides abstract interfaces which allows users to depict an algorithm and the\nalgorithm's implementing organization (the so-called schedule) separately. Typically, writing\nalgorithm in high-performance schedule breaks the algorithm's readability and modularity. Also,\ntrying various seemingly promising schedules is time-co [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/10724e9ad9c29faa223c1d5eab6dbef9/tvmc_python.py b/docs/_downloads/10724e9ad9c29faa223c1d5eab6dbef9/tvmc_python.py
index 417f8ad887..a92c3af626 100644
--- a/docs/_downloads/10724e9ad9c29faa223c1d5eab6dbef9/tvmc_python.py
+++ b/docs/_downloads/10724e9ad9c29faa223c1d5eab6dbef9/tvmc_python.py
@@ -36,11 +36,6 @@ Follow the steps to download a resnet model via the terminal:
Let's start editing the python file in your favorite text editor.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################
# Step 0: Imports
diff --git a/docs/_downloads/12b9ecc04c41abaa12022061771821d1/micro_pytorch.py b/docs/_downloads/12b9ecc04c41abaa12022061771821d1/micro_pytorch.py
index f7f0c9209a..370e4d7e80 100644
--- a/docs/_downloads/12b9ecc04c41abaa12022061771821d1/micro_pytorch.py
+++ b/docs/_downloads/12b9ecc04c41abaa12022061771821d1/micro_pytorch.py
@@ -34,11 +34,6 @@ since the model would not fit on our current supported Zephyr boards.
# .. include:: ../../../../gallery/how_to/work_with_microtvm/install_dependencies.rst
#
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import pathlib
import torch
diff --git a/docs/_downloads/16269b77359771348d507395692524cf/from_paddle.py b/docs/_downloads/16269b77359771348d507395692524cf/from_paddle.py
index 199547b814..5e78c8c3b0 100644
--- a/docs/_downloads/16269b77359771348d507395692524cf/from_paddle.py
+++ b/docs/_downloads/16269b77359771348d507395692524cf/from_paddle.py
@@ -31,11 +31,6 @@ For more details, refer to the official install instructions at:
https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tarfile
import paddle
import numpy as np
diff --git a/docs/_downloads/17b139d609f9480c7eeda2da1f90f28c/tune_network_arm.py b/docs/_downloads/17b139d609f9480c7eeda2da1f90f28c/tune_network_arm.py
index 09a1d0cea5..a109acba06 100644
--- a/docs/_downloads/17b139d609f9480c7eeda2da1f90f28c/tune_network_arm.py
+++ b/docs/_downloads/17b139d609f9480c7eeda2da1f90f28c/tune_network_arm.py
@@ -46,11 +46,6 @@ get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
import os
diff --git a/docs/_downloads/1a26d790f7b98309d730181290dae3ee/deploy_prequantized_tflite.ipynb b/docs/_downloads/1a26d790f7b98309d730181290dae3ee/deploy_prequantized_tflite.ipynb
index 93b9d89091..0bc0f835d1 100644
--- a/docs/_downloads/1a26d790f7b98309d730181290dae3ee/deploy_prequantized_tflite.ipynb
+++ b/docs/_downloads/1a26d790f7b98309d730181290dae3ee/deploy_prequantized_tflite.ipynb
@@ -18,17 +18,6 @@
"\n# Deploy a Framework-prequantized Model with TVM - Part 3 (TFLite)\n**Author**: [Siju Samuel](https://github.com/siju-samuel)\n\nWelcome to part 3 of the Deploy Framework-Prequantized Model with TVM tutorial.\nIn this part, we will start with a Quantized TFLite graph and then compile and execute it via TVM.\n\n\nFor more details on quantizing the model using TFLite, readers are encouraged to\ngo through [Converting Quantized Models](https://www.tensorflow.org/lite/convert/quan [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/1e482ba1190961191e3a0bdbd0585faa/intrin_math.ipynb b/docs/_downloads/1e482ba1190961191e3a0bdbd0585faa/intrin_math.ipynb
index 6c816142e5..679acc80ee 100644
--- a/docs/_downloads/1e482ba1190961191e3a0bdbd0585faa/intrin_math.ipynb
+++ b/docs/_downloads/1e482ba1190961191e3a0bdbd0585faa/intrin_math.ipynb
@@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
- "from __future__ import absolute_import, print_function\n\n\nimport numpy as np\n\nimport tvm\nfrom tvm import te\nfrom tvm.ir import register_op_attr, register_intrin_lowering"
+ "from __future__ import absolute_import, print_function\n\nimport numpy as np\n\nimport tvm\nfrom tvm import te\nfrom tvm.ir import register_op_attr, register_intrin_lowering"
]
},
{
diff --git a/docs/_downloads/21a9dd883b196be58ca1c5cd02700274/deploy_model_on_android.py b/docs/_downloads/21a9dd883b196be58ca1c5cd02700274/deploy_model_on_android.py
index 4bf86e2981..2e5d916cd6 100644
--- a/docs/_downloads/21a9dd883b196be58ca1c5cd02700274/deploy_model_on_android.py
+++ b/docs/_downloads/21a9dd883b196be58ca1c5cd02700274/deploy_model_on_android.py
@@ -25,11 +25,6 @@ Deploy the Pretrained Model on Android
This is an example of using Relay to compile a keras model and deploy it on Android device.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
import numpy as np
diff --git a/docs/_downloads/233ceda3a682ae5df93b4ce0bcfbf870/tvmc_command_line_driver.py b/docs/_downloads/233ceda3a682ae5df93b4ce0bcfbf870/tvmc_command_line_driver.py
index 3f4413e848..27302b721b 100644
--- a/docs/_downloads/233ceda3a682ae5df93b4ce0bcfbf870/tvmc_command_line_driver.py
+++ b/docs/_downloads/233ceda3a682ae5df93b4ce0bcfbf870/tvmc_command_line_driver.py
@@ -41,11 +41,6 @@ The goal of this section is to give you an overview of TVM and TVMC's
capabilities, and set the stage for understanding how TVM works.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################
# Using TVMC
diff --git a/docs/_downloads/2387d8448da213eb625e6b3d916327d4/deploy_model_on_adreno.py b/docs/_downloads/2387d8448da213eb625e6b3d916327d4/deploy_model_on_adreno.py
index 8d25e50b56..c120c5339b 100644
--- a/docs/_downloads/2387d8448da213eb625e6b3d916327d4/deploy_model_on_adreno.py
+++ b/docs/_downloads/2387d8448da213eb625e6b3d916327d4/deploy_model_on_adreno.py
@@ -120,12 +120,6 @@ Let's push them to the device and run TVM RPC Server.
# -----------------
# As an example we would use classical cat image from ImageNet
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
from PIL import Image
from tvm.contrib.download import download_testdata
from matplotlib import pyplot as plt
diff --git a/docs/_downloads/286e7f77f494a25312ac88e3f234822e/extern_op.py b/docs/_downloads/286e7f77f494a25312ac88e3f234822e/extern_op.py
index ad741a08d5..9026eb016c 100644
--- a/docs/_downloads/286e7f77f494a25312ac88e3f234822e/extern_op.py
+++ b/docs/_downloads/286e7f77f494a25312ac88e3f234822e/extern_op.py
@@ -32,11 +32,6 @@ or pointer to DLTensor as argument.
from __future__ import absolute_import, print_function
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import numpy as np
diff --git a/docs/_downloads/29c30a5341c6aa08601b51791150fa4b/using_pipeline_executor.py b/docs/_downloads/29c30a5341c6aa08601b51791150fa4b/using_pipeline_executor.py
index 87516d656d..8f61368656 100644
--- a/docs/_downloads/29c30a5341c6aa08601b51791150fa4b/using_pipeline_executor.py
+++ b/docs/_downloads/29c30a5341c6aa08601b51791150fa4b/using_pipeline_executor.py
@@ -107,11 +107,6 @@ subgraphs = graph_split(net["main"], split_config, params)
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
#########################################
# Build the subgraph with cutlass target.
@@ -188,11 +183,6 @@ print(pipe_config)
|mod0.output(0)-> mod1.data_n_0
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-# testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
##############################
# Build the pipeline executor.
# ----------------------------
diff --git a/docs/_downloads/2a0982f8ca0176cb17713d28286536e4/reduction.py b/docs/_downloads/2a0982f8ca0176cb17713d28286536e4/reduction.py
index c084c45d38..72c8d691a9 100644
--- a/docs/_downloads/2a0982f8ca0176cb17713d28286536e4/reduction.py
+++ b/docs/_downloads/2a0982f8ca0176cb17713d28286536e4/reduction.py
@@ -30,9 +30,6 @@ from __future__ import absolute_import, print_function
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
import tvm
import tvm.testing
diff --git a/docs/_downloads/2f91b1346a0ba21b800081aa15fdaac2/autotvm_relay_x86.ipynb b/docs/_downloads/2f91b1346a0ba21b800081aa15fdaac2/autotvm_relay_x86.ipynb
index 76a3ecae0d..10cb685fd8 100644
--- a/docs/_downloads/2f91b1346a0ba21b800081aa15fdaac2/autotvm_relay_x86.ipynb
+++ b/docs/_downloads/2f91b1346a0ba21b800081aa15fdaac2/autotvm_relay_x86.ipynb
@@ -18,17 +18,6 @@
"\n# Compiling and Optimizing a Model with the Python Interface (AutoTVM)\n**Author**:\n[Chris Hoge](https://github.com/hogepodge)\n\nIn the [TVMC Tutorial](tvmc_command_line_driver), we covered how to compile, run, and tune a\npre-trained vision model, ResNet-50 v2 using the command line interface for\nTVM, TVMC. TVM is more that just a command-line tool though, it is an\noptimizing framework with APIs available for a number of different languages\nthat gives you tremendous flex [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/2fb9ae7bf124f72614a43137cf2919cb/micro_tflite.py b/docs/_downloads/2fb9ae7bf124f72614a43137cf2919cb/micro_tflite.py
index cbdf6cd6f4..86e5d6b4b1 100644
--- a/docs/_downloads/2fb9ae7bf124f72614a43137cf2919cb/micro_tflite.py
+++ b/docs/_downloads/2fb9ae7bf124f72614a43137cf2919cb/micro_tflite.py
@@ -30,11 +30,6 @@ model with Relay.
# .. include:: ../../../../gallery/how_to/work_with_microtvm/install_dependencies.rst
#
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
diff --git a/docs/_downloads/31d82e25454740f5ba711497485c0dd4/introduction.py b/docs/_downloads/31d82e25454740f5ba711497485c0dd4/introduction.py
index 908a8e52c7..8d1f0e2699 100644
--- a/docs/_downloads/31d82e25454740f5ba711497485c0dd4/introduction.py
+++ b/docs/_downloads/31d82e25454740f5ba711497485c0dd4/introduction.py
@@ -45,11 +45,6 @@ Contents
#. :doc:`Compiling Deep Learning Models for GPUs <relay_quick_start>`
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################
# An Overview of TVM and Model Optimization
diff --git a/docs/_downloads/35eacf8f75629e07aeda1329bdb7d53c/tune_relay_arm.py b/docs/_downloads/35eacf8f75629e07aeda1329bdb7d53c/tune_relay_arm.py
index a8f66d9b08..0cb02c036f 100644
--- a/docs/_downloads/35eacf8f75629e07aeda1329bdb7d53c/tune_relay_arm.py
+++ b/docs/_downloads/35eacf8f75629e07aeda1329bdb7d53c/tune_relay_arm.py
@@ -62,11 +62,6 @@ __name__ == "__main__":` block.
#
# Now return to python code. Import packages.
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
diff --git a/docs/_downloads/3a9b1d387f618487c8ccf6b8b78ae179/intro_topi.py b/docs/_downloads/3a9b1d387f618487c8ccf6b8b78ae179/intro_topi.py
index f2a4db6086..cfebc36b81 100644
--- a/docs/_downloads/3a9b1d387f618487c8ccf6b8b78ae179/intro_topi.py
+++ b/docs/_downloads/3a9b1d387f618487c8ccf6b8b78ae179/intro_topi.py
@@ -28,11 +28,7 @@ In this tutorial, we will see how TOPI can save us from writing boilerplate code
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import tvm
import tvm.testing
from tvm import te
diff --git a/docs/_downloads/3aeab7c9d659bf5da70126a1aff7c403/from_coreml.py b/docs/_downloads/3aeab7c9d659bf5da70126a1aff7c403/from_coreml.py
index 4d0eea2d8d..b54329920b 100644
--- a/docs/_downloads/3aeab7c9d659bf5da70126a1aff7c403/from_coreml.py
+++ b/docs/_downloads/3aeab7c9d659bf5da70126a1aff7c403/from_coreml.py
@@ -34,11 +34,6 @@ or please refer to official site
https://github.com/apple/coremltools
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import tvm.relay as relay
diff --git a/docs/_downloads/3c5c85c3954f3110f16ca084e286f03a/opt_conv_cuda.py b/docs/_downloads/3c5c85c3954f3110f16ca084e286f03a/opt_conv_cuda.py
index 33e5d98553..1ab38450f5 100644
--- a/docs/_downloads/3c5c85c3954f3110f16ca084e286f03a/opt_conv_cuda.py
+++ b/docs/_downloads/3c5c85c3954f3110f16ca084e286f03a/opt_conv_cuda.py
@@ -30,13 +30,6 @@ channel, batch.
"""
-# sphinx_gallery_start_ignore
-# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
################################################################
# Preparation and Algorithm
# -------------------------
@@ -47,6 +40,9 @@ testing.utils.install_request_hook(depth=3)
# convolution. The following code defines the convolution algorithm in TVM.
#
+# sphinx_gallery_start_ignore
+# sphinx_gallery_requires_cuda = True
+# sphinx_gallery_end_ignore
import numpy as np
import tvm
from tvm import te
diff --git a/docs/_downloads/3dd2108354ac3028c96bcd6a0c7899dd/relay_quick_start.ipynb b/docs/_downloads/3dd2108354ac3028c96bcd6a0c7899dd/relay_quick_start.ipynb
index a5a6e8902b..6f9b2c1e11 100644
--- a/docs/_downloads/3dd2108354ac3028c96bcd6a0c7899dd/relay_quick_start.ipynb
+++ b/docs/_downloads/3dd2108354ac3028c96bcd6a0c7899dd/relay_quick_start.ipynb
@@ -18,17 +18,6 @@
"\n\n# Quick Start Tutorial for Compiling Deep Learning Models\n**Author**: [Yao Wang](https://github.com/kevinthesun), [Truman Tian](https://github.com/SiNZeRo)\n\nThis example shows how to build a neural network with Relay python frontend and\ngenerates a runtime library for Nvidia GPU with TVM.\nNotice that you need to build TVM with cuda and llvm enabled.\n"
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/3fde0fe8b31bf786dec2a01858372eae/deploy_model_on_nano.py b/docs/_downloads/3fde0fe8b31bf786dec2a01858372eae/deploy_model_on_nano.py
index 3d8a4a796f..abd0b3fab6 100644
--- a/docs/_downloads/3fde0fe8b31bf786dec2a01858372eae/deploy_model_on_nano.py
+++ b/docs/_downloads/3fde0fe8b31bf786dec2a01858372eae/deploy_model_on_nano.py
@@ -27,11 +27,7 @@ it on Jetson Nano.
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import tvm
from tvm import te
import tvm.relay as relay
diff --git a/docs/_downloads/408ef96692a668b33d94eca33cac7e0a/deploy_model_on_rasp.py b/docs/_downloads/408ef96692a668b33d94eca33cac7e0a/deploy_model_on_rasp.py
index ab5374d93d..de4ed9aff0 100644
--- a/docs/_downloads/408ef96692a668b33d94eca33cac7e0a/deploy_model_on_rasp.py
+++ b/docs/_downloads/408ef96692a668b33d94eca33cac7e0a/deploy_model_on_rasp.py
@@ -26,12 +26,6 @@ This is an example of using Relay to compile a ResNet model and deploy
it on Raspberry Pi.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
import tvm
from tvm import te
import tvm.relay as relay
diff --git a/docs/_downloads/40a01cffb015a67aaec0fad7e27cf80d/tensor_expr_get_started.py b/docs/_downloads/40a01cffb015a67aaec0fad7e27cf80d/tensor_expr_get_started.py
index 11186d2f14..ba7e0c0270 100644
--- a/docs/_downloads/40a01cffb015a67aaec0fad7e27cf80d/tensor_expr_get_started.py
+++ b/docs/_downloads/40a01cffb015a67aaec0fad7e27cf80d/tensor_expr_get_started.py
@@ -39,11 +39,6 @@ serve as the comparative basis for future tutorials covering more advanced
features of TVM.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################
# Example 1: Writing and Scheduling Vector Addition in TE for CPU
diff --git a/docs/_downloads/428c6201e29ce74e73c6b41eee589f62/tensorize.py b/docs/_downloads/428c6201e29ce74e73c6b41eee589f62/tensorize.py
index 45eaf349f3..63ba829903 100644
--- a/docs/_downloads/428c6201e29ce74e73c6b41eee589f62/tensorize.py
+++ b/docs/_downloads/428c6201e29ce74e73c6b41eee589f62/tensorize.py
@@ -35,11 +35,6 @@ and usage of tensorize instead of providing an efficient solution.
from __future__ import absolute_import, print_function
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import tvm.testing
diff --git a/docs/_downloads/4459ebf5b03d332f7f380abdaef81c05/tensor_expr_get_started.ipynb b/docs/_downloads/4459ebf5b03d332f7f380abdaef81c05/tensor_expr_get_started.ipynb
index 1d14e1f220..3bd51cd5cb 100644
--- a/docs/_downloads/4459ebf5b03d332f7f380abdaef81c05/tensor_expr_get_started.ipynb
+++ b/docs/_downloads/4459ebf5b03d332f7f380abdaef81c05/tensor_expr_get_started.ipynb
@@ -18,17 +18,6 @@
"\n\n# Working with Operators Using Tensor Expression\n**Author**: [Tianqi Chen](https://tqchen.github.io)\n\nIn this tutorial we will turn our attention to how TVM works with Tensor\nExpression (TE) to define tensor computations and apply loop optimizations. TE\ndescribes tensor computations in a pure functional language (that is each\nexpression has no side effects). When viewed in context of the TVM as a whole,\nRelay describes a computation as a set of operators, and each of [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/5499fb7d70e17c6aabf49246a978db52/use_pass_infra.py b/docs/_downloads/5499fb7d70e17c6aabf49246a978db52/use_pass_infra.py
index a41a26fc0b..f82cf40029 100644
--- a/docs/_downloads/5499fb7d70e17c6aabf49246a978db52/use_pass_infra.py
+++ b/docs/_downloads/5499fb7d70e17c6aabf49246a978db52/use_pass_infra.py
@@ -40,11 +40,6 @@ a certain optimization and create an optimization pipeline for a Relay program.
The same approach can be used for tir as well.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
import tvm
diff --git a/docs/_downloads/55a9eff88b1303e525d53269eeb16897/micro_ethosu.ipynb b/docs/_downloads/55a9eff88b1303e525d53269eeb16897/micro_ethosu.ipynb
index 9edb809c86..d553c22355 100644
--- a/docs/_downloads/55a9eff88b1303e525d53269eeb16897/micro_ethosu.ipynb
+++ b/docs/_downloads/55a9eff88b1303e525d53269eeb16897/micro_ethosu.ipynb
@@ -18,17 +18,6 @@
"\n# Running TVM on bare metal Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU with CMSIS-NN\n**Author**:\n[Grant Watson](https://github.com/grant-arm)\n\nThis section contains an example of how to use TVM to run a model\non an Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU with CMSIS-NN, using bare metal.\nThe Cortex(R)-M55 is a small, low-power CPU designed for use in embedded\ndevices. CMSIS-NN is a collection of kernels optimized for Arm(R) Cortex(R)-M CPUs.\nThe Ethos(TM)-U55 [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/56691c7a27d45da61d112276334640d3/deploy_prequantized_tflite.py b/docs/_downloads/56691c7a27d45da61d112276334640d3/deploy_prequantized_tflite.py
index 494b4a9e21..2d0e225dce 100644
--- a/docs/_downloads/56691c7a27d45da61d112276334640d3/deploy_prequantized_tflite.py
+++ b/docs/_downloads/56691c7a27d45da61d112276334640d3/deploy_prequantized_tflite.py
@@ -42,11 +42,6 @@ Now please check if TFLite package is installed successfully, ``python -c "impor
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
###############################################################################
# Necessary imports
diff --git a/docs/_downloads/57a45d9bef1af358191e7d50043e652c/autotvm_relay_x86.py b/docs/_downloads/57a45d9bef1af358191e7d50043e652c/autotvm_relay_x86.py
index b7dfbe28f4..b7e9cebb5d 100644
--- a/docs/_downloads/57a45d9bef1af358191e7d50043e652c/autotvm_relay_x86.py
+++ b/docs/_downloads/57a45d9bef1af358191e7d50043e652c/autotvm_relay_x86.py
@@ -42,11 +42,6 @@ The goal of this section is to give you an overview of TVM's capabilites and
how to use them through the Python API.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################
# TVM is a deep learning compiler framework, with a number of different modules
diff --git a/docs/_downloads/5c7000b5aef924e29ec975ec3002ea03/tensor_ir_blitz_course.py b/docs/_downloads/5c7000b5aef924e29ec975ec3002ea03/tensor_ir_blitz_course.py
index dc75a3fb94..346dc6154f 100644
--- a/docs/_downloads/5c7000b5aef924e29ec975ec3002ea03/tensor_ir_blitz_course.py
+++ b/docs/_downloads/5c7000b5aef924e29ec975ec3002ea03/tensor_ir_blitz_course.py
@@ -31,11 +31,7 @@ TensorIR is a domain specific language for deep learning programs serving two br
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import tvm
from tvm.ir.module import IRModule
from tvm.script import tir as T
diff --git a/docs/_downloads/644d28fc67dfb3099fb0d275ffcf1c7c/tune_relay_mobile_gpu.py b/docs/_downloads/644d28fc67dfb3099fb0d275ffcf1c7c/tune_relay_mobile_gpu.py
index d73e46448b..dd0a3a9837 100644
--- a/docs/_downloads/644d28fc67dfb3099fb0d275ffcf1c7c/tune_relay_mobile_gpu.py
+++ b/docs/_downloads/644d28fc67dfb3099fb0d275ffcf1c7c/tune_relay_mobile_gpu.py
@@ -60,11 +60,6 @@ __name__ == "__main__":` block.
#
# Now return to python code. Import packages.
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
diff --git a/docs/_downloads/67bf7dd99bcfb837cf3e8b461a5eeb48/tune_network_mali.py b/docs/_downloads/67bf7dd99bcfb837cf3e8b461a5eeb48/tune_network_mali.py
index 8ac0b235d7..e72e261e4b 100644
--- a/docs/_downloads/67bf7dd99bcfb837cf3e8b461a5eeb48/tune_network_mali.py
+++ b/docs/_downloads/67bf7dd99bcfb837cf3e8b461a5eeb48/tune_network_mali.py
@@ -44,11 +44,6 @@ get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
diff --git a/docs/_downloads/6836ce26807b8d33b8f499287c1f3d04/tune_relay_x86.py b/docs/_downloads/6836ce26807b8d33b8f499287c1f3d04/tune_relay_x86.py
index 2ba597d1da..a44c30bb89 100644
--- a/docs/_downloads/6836ce26807b8d33b8f499287c1f3d04/tune_relay_x86.py
+++ b/docs/_downloads/6836ce26807b8d33b8f499287c1f3d04/tune_relay_x86.py
@@ -29,11 +29,6 @@ get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
import numpy as np
diff --git a/docs/_downloads/68abf665197871646fffcd0955bddad7/tuple_inputs.py b/docs/_downloads/68abf665197871646fffcd0955bddad7/tuple_inputs.py
index 86ec8b2d19..edf82ddca7 100644
--- a/docs/_downloads/68abf665197871646fffcd0955bddad7/tuple_inputs.py
+++ b/docs/_downloads/68abf665197871646fffcd0955bddad7/tuple_inputs.py
@@ -28,11 +28,6 @@ In this tutorial, we will introduce the usage of tuple inputs in TVM.
from __future__ import absolute_import, print_function
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import numpy as np
diff --git a/docs/_downloads/6ad550da5092845382b1197f58a93816/tune_conv2d_cuda.py b/docs/_downloads/6ad550da5092845382b1197f58a93816/tune_conv2d_cuda.py
index a73b97525f..d7047a0afb 100644
--- a/docs/_downloads/6ad550da5092845382b1197f58a93816/tune_conv2d_cuda.py
+++ b/docs/_downloads/6ad550da5092845382b1197f58a93816/tune_conv2d_cuda.py
@@ -50,11 +50,7 @@ __name__ == "__main__":` block.
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import logging
import sys
import numpy as np
diff --git a/docs/_downloads/6e0673ce1f08636c34d0b9a73ea114f7/uma.ipynb b/docs/_downloads/6e0673ce1f08636c34d0b9a73ea114f7/uma.ipynb
index e98f2e035c..e873d3033f 100644
--- a/docs/_downloads/6e0673ce1f08636c34d0b9a73ea114f7/uma.ipynb
+++ b/docs/_downloads/6e0673ce1f08636c34d0b9a73ea114f7/uma.ipynb
@@ -25,17 +25,6 @@
"This is an introductory tutorial to the **Universal Modular Accelerator Interface** (UMA).\nUMA provides an easy-to-use API to integrate new hardware accelerators into TVM.\n\nThis tutorial gives you step-by-step guidance how to use UMA to\nmake your hardware accelerator TVM-ready.\nWhile there is no one-fits-all solution for this problem, UMA targets to provide a stable and Python-only\nAPI to integrate a number of hardware accelerator classes into TVM.\n\n\nIn this tutorial yo [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/7372db5919b5619bc34fde3434862bca/opt_conv_tensorcore.py b/docs/_downloads/7372db5919b5619bc34fde3434862bca/opt_conv_tensorcore.py
index 5734f064f0..b43fac9139 100644
--- a/docs/_downloads/7372db5919b5619bc34fde3434862bca/opt_conv_tensorcore.py
+++ b/docs/_downloads/7372db5919b5619bc34fde3434862bca/opt_conv_tensorcore.py
@@ -53,11 +53,7 @@ convolution has a large batch. We strongly recommend covering the :ref:`opt-conv
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import tvm
from tvm import te
import numpy as np
diff --git a/docs/_downloads/766206ab8f1fd80ac34d9816cb991a0d/cross_compilation_and_rpc.py b/docs/_downloads/766206ab8f1fd80ac34d9816cb991a0d/cross_compilation_and_rpc.py
index feab28fa11..c7e302693d 100644
--- a/docs/_downloads/766206ab8f1fd80ac34d9816cb991a0d/cross_compilation_and_rpc.py
+++ b/docs/_downloads/766206ab8f1fd80ac34d9816cb991a0d/cross_compilation_and_rpc.py
@@ -93,11 +93,6 @@ and the Firefly-RK3399 for an OpenCL example.
#
# Here we will declare a simple kernel on the local machine:
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
diff --git a/docs/_downloads/7716f96385bd5abb6e822041e285be54/from_darknet.py b/docs/_downloads/7716f96385bd5abb6e822041e285be54/from_darknet.py
index 8397efa63b..ef0a858377 100644
--- a/docs/_downloads/7716f96385bd5abb6e822041e285be54/from_darknet.py
+++ b/docs/_downloads/7716f96385bd5abb6e822041e285be54/from_darknet.py
@@ -32,12 +32,6 @@ Please install CFFI and CV2 before executing this script
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
# numpy and matplotlib
import numpy as np
import matplotlib.pyplot as plt
diff --git a/docs/_downloads/7795da4b258c8feff986668b95ef57ad/deploy_object_detection_pytorch.py b/docs/_downloads/7795da4b258c8feff986668b95ef57ad/deploy_object_detection_pytorch.py
index ffde042e2b..8400e82b42 100644
--- a/docs/_downloads/7795da4b258c8feff986668b95ef57ad/deploy_object_detection_pytorch.py
+++ b/docs/_downloads/7795da4b258c8feff986668b95ef57ad/deploy_object_detection_pytorch.py
@@ -40,12 +40,6 @@ Currently, TVM supports PyTorch 1.7 and 1.4. Other versions may
be unstable.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
import tvm
from tvm import relay
from tvm import relay
diff --git a/docs/_downloads/7810ecf51bfc05f7d5e8a400ac3e815d/deploy_quantized.py b/docs/_downloads/7810ecf51bfc05f7d5e8a400ac3e815d/deploy_quantized.py
index 24c7ce3331..f1b45dd7c1 100644
--- a/docs/_downloads/7810ecf51bfc05f7d5e8a400ac3e815d/deploy_quantized.py
+++ b/docs/_downloads/7810ecf51bfc05f7d5e8a400ac3e815d/deploy_quantized.py
@@ -27,11 +27,6 @@ In this tutorial, we will import a GluonCV pre-trained model on ImageNet to
Relay, quantize the Relay model and then perform the inference.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
diff --git a/docs/_downloads/79027b28c061178b7ea56e3f047eeef1/micro_reference_vm.py b/docs/_downloads/79027b28c061178b7ea56e3f047eeef1/micro_reference_vm.py
index 80ab0edf8f..3121bca353 100644
--- a/docs/_downloads/79027b28c061178b7ea56e3f047eeef1/micro_reference_vm.py
+++ b/docs/_downloads/79027b28c061178b7ea56e3f047eeef1/micro_reference_vm.py
@@ -157,9 +157,3 @@ local QEMU emulator running within the VM, run the following commands instead:
"""
-
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
diff --git a/docs/_downloads/7f1d3d1b878694c201c614c807cdebc8/from_tensorflow.py b/docs/_downloads/7f1d3d1b878694c201c614c807cdebc8/from_tensorflow.py
index b85b9e669a..741d981094 100644
--- a/docs/_downloads/7f1d3d1b878694c201c614c807cdebc8/from_tensorflow.py
+++ b/docs/_downloads/7f1d3d1b878694c201c614c807cdebc8/from_tensorflow.py
@@ -29,12 +29,6 @@ For us to begin with, tensorflow python module is required to be installed.
Please refer to https://www.tensorflow.org/install
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
# tvm, relay
import tvm
from tvm import te
diff --git a/docs/_downloads/854257a66df713b1f3f82eb3577f95e3/opt_conv_cuda.ipynb b/docs/_downloads/854257a66df713b1f3f82eb3577f95e3/opt_conv_cuda.ipynb
index 9f55992494..a8544087aa 100644
--- a/docs/_downloads/854257a66df713b1f3f82eb3577f95e3/opt_conv_cuda.ipynb
+++ b/docs/_downloads/854257a66df713b1f3f82eb3577f95e3/opt_conv_cuda.ipynb
@@ -18,17 +18,6 @@
"\n\n# How to optimize convolution on GPU\n**Author**: [Haichen Shen](https://homes.cs.washington.edu/~haichen/)\n\nIn this tutorial, we will demonstrate how to write a high performance\nconvolution implementation in TVM. We use square size input tensors and filters\nas an example, and assume the input to convolution has a large batch. In this\nexample, we use a different layout to store the data in order to achieve better\ndata locality. The buffer layout is HWCN, which stands f [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/8c7d8fd6a4b93bcff1f5573943dd02f4/scan.py b/docs/_downloads/8c7d8fd6a4b93bcff1f5573943dd02f4/scan.py
index d523d5b995..4c5ce94e01 100644
--- a/docs/_downloads/8c7d8fd6a4b93bcff1f5573943dd02f4/scan.py
+++ b/docs/_downloads/8c7d8fd6a4b93bcff1f5573943dd02f4/scan.py
@@ -27,9 +27,6 @@ from __future__ import absolute_import, print_function
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
import tvm
import tvm.testing
diff --git a/docs/_downloads/8d55b8f991fb704002f768367ce2d1a2/tvmc_python.ipynb b/docs/_downloads/8d55b8f991fb704002f768367ce2d1a2/tvmc_python.ipynb
index fe01ab9d3c..91c9328f29 100644
--- a/docs/_downloads/8d55b8f991fb704002f768367ce2d1a2/tvmc_python.ipynb
+++ b/docs/_downloads/8d55b8f991fb704002f768367ce2d1a2/tvmc_python.ipynb
@@ -18,17 +18,6 @@
"\n# Getting Starting using TVMC Python: a high-level API for TVM\n**Author**:\n[Jocelyn Shiue](https://github.com/CircleSpin)\n\nHi! Here we explain the scripting tool designed for the complete TVM beginner. \ud83d\ude42\n\nBefore we get started let's get an example model if you don't already have one.\nFollow the steps to download a resnet model via the terminal:\n\n```python\nmkdir myscripts\ncd myscripts\nwget https://github.com/onnx/models/raw/b9a54e89508f101a1611cd64f4ef56b [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/8e7bbc9dbdda76ac573b24606b41c006/autotvm_matmul_x86.py b/docs/_downloads/8e7bbc9dbdda76ac573b24606b41c006/autotvm_matmul_x86.py
index f074c454bd..a2e355c8ca 100644
--- a/docs/_downloads/8e7bbc9dbdda76ac573b24606b41c006/autotvm_matmul_x86.py
+++ b/docs/_downloads/8e7bbc9dbdda76ac573b24606b41c006/autotvm_matmul_x86.py
@@ -64,11 +64,6 @@ workflow is illustrated by a matrix multiplication example.
#
# Now return to python code. Begin by importing the required packages.
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import logging
import sys
diff --git a/docs/_downloads/96137df89d8034b548f407123ec50ce9/opt_gemm.py b/docs/_downloads/96137df89d8034b548f407123ec50ce9/opt_gemm.py
index 249a4e26e9..7ca4232815 100644
--- a/docs/_downloads/96137df89d8034b548f407123ec50ce9/opt_gemm.py
+++ b/docs/_downloads/96137df89d8034b548f407123ec50ce9/opt_gemm.py
@@ -48,11 +48,6 @@ All the experiment results mentioned below, are executed on 2015's 15' MacBook e
Intel i7-4770HQ CPU. The cache line size should be 64 bytes for all the x86 CPUs.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################################
# Preparation and Baseline
diff --git a/docs/_downloads/9c3764c88ab3eb57dc223b4eda1e8a2f/deploy_sparse.py b/docs/_downloads/9c3764c88ab3eb57dc223b4eda1e8a2f/deploy_sparse.py
index b9a26e0d30..c90a3b566e 100644
--- a/docs/_downloads/9c3764c88ab3eb57dc223b4eda1e8a2f/deploy_sparse.py
+++ b/docs/_downloads/9c3764c88ab3eb57dc223b4eda1e8a2f/deploy_sparse.py
@@ -70,11 +70,6 @@ sparsity. A fun exercise is comparing the real speed of PruneBert with the block
sparse speed using fake weights to see the benefit of structured sparsity.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
###############################################################################
# Load Required Modules
diff --git a/docs/_downloads/9ccca8fd489a1486ac71b55a55c320c5/micro_autotune.py b/docs/_downloads/9ccca8fd489a1486ac71b55a55c320c5/micro_autotune.py
index 3dd4cab6c9..9edb9ae75e 100644
--- a/docs/_downloads/9ccca8fd489a1486ac71b55a55c320c5/micro_autotune.py
+++ b/docs/_downloads/9ccca8fd489a1486ac71b55a55c320c5/micro_autotune.py
@@ -32,11 +32,6 @@ This tutorial explains how to autotune a model using the C runtime.
# .. include:: ../../../../gallery/how_to/work_with_microtvm/install_dependencies.rst
#
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
# You can skip the following two sections (installing Zephyr and CMSIS-NN) if the following flag is False.
# Installing Zephyr takes ~20 min.
diff --git a/docs/_downloads/9f81bc348ac4107d0670f512b8943a99/introduction.ipynb b/docs/_downloads/9f81bc348ac4107d0670f512b8943a99/introduction.ipynb
index 44bc836a18..371418215b 100644
--- a/docs/_downloads/9f81bc348ac4107d0670f512b8943a99/introduction.ipynb
+++ b/docs/_downloads/9f81bc348ac4107d0670f512b8943a99/introduction.ipynb
@@ -18,17 +18,6 @@
"\n# Introduction\n**Authors**:\n[Jocelyn Shiue](https://github.com/),\n[Chris Hoge](https://github.com/hogepodge),\n[Lianmin Zheng](https://github.com/merrymercy)\n\nApache TVM is an open source machine learning compiler framework for CPUs,\nGPUs, and machine learning accelerators. It aims to enable machine learning\nengineers to optimize and run computations efficiently on any hardware backend.\nThe purpose of this tutorial is to take a guided tour through all of the major\nfea [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/a70662bf8dc171d3d17a3945bbbb02e3/from_tflite.py b/docs/_downloads/a70662bf8dc171d3d17a3945bbbb02e3/from_tflite.py
index a248346c29..226e67c82e 100644
--- a/docs/_downloads/a70662bf8dc171d3d17a3945bbbb02e3/from_tflite.py
+++ b/docs/_downloads/a70662bf8dc171d3d17a3945bbbb02e3/from_tflite.py
@@ -56,12 +56,6 @@ Below you can find an example on how to compile TFLite model using TVM.
# Utils for downloading and extracting zip files
# ----------------------------------------------
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
import os
diff --git a/docs/_downloads/ab2eef18d10188532645b1d60fc7dd68/micro_ethosu.py b/docs/_downloads/ab2eef18d10188532645b1d60fc7dd68/micro_ethosu.py
index e80860dc0c..f257507bb5 100644
--- a/docs/_downloads/ab2eef18d10188532645b1d60fc7dd68/micro_ethosu.py
+++ b/docs/_downloads/ab2eef18d10188532645b1d60fc7dd68/micro_ethosu.py
@@ -37,11 +37,6 @@ In this tutorial, we will be compiling a MobileNet v1 model and instructing
TVM to offload operators to the Ethos(TM)-U55 where possible.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
################################################################################
# Obtaining TVM
diff --git a/docs/_downloads/b11795df0596a55e4982bf895d0c8c38/bring_your_own_datatypes.ipynb b/docs/_downloads/b11795df0596a55e4982bf895d0c8c38/bring_your_own_datatypes.ipynb
index d5c2ba50d7..83aacc24c2 100644
--- a/docs/_downloads/b11795df0596a55e4982bf895d0c8c38/bring_your_own_datatypes.ipynb
+++ b/docs/_downloads/b11795df0596a55e4982bf895d0c8c38/bring_your_own_datatypes.ipynb
@@ -18,17 +18,6 @@
"\n# Bring Your Own Datatypes to TVM\n**Authors**: [Gus Smith](https://github.com/gussmith23), [Andrew Liu](https://github.com/hypercubestart)\n\nIn this tutorial, we will show you how to utilize the Bring Your Own Datatypes framework to use your own custom datatypes in TVM.\nNote that the Bring Your Own Datatypes framework currently only handles **software emulated versions of datatypes**.\nThe framework does not support compiling for custom accelerator datatypes out-of-the-box. [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/c20f81a94729f461f33b52cc110fd9d6/deploy_prequantized.ipynb b/docs/_downloads/c20f81a94729f461f33b52cc110fd9d6/deploy_prequantized.ipynb
index c6b7bfeb7a..461aece101 100644
--- a/docs/_downloads/c20f81a94729f461f33b52cc110fd9d6/deploy_prequantized.ipynb
+++ b/docs/_downloads/c20f81a94729f461f33b52cc110fd9d6/deploy_prequantized.ipynb
@@ -18,17 +18,6 @@
"\n# Deploy a Framework-prequantized Model with TVM\n**Author**: [Masahiro Masuda](https://github.com/masahi)\n\nThis is a tutorial on loading models quantized by deep learning frameworks into TVM.\nPre-quantized model import is one of the quantization support we have in TVM. More details on\nthe quantization story in TVM can be found\n[here](https://discuss.tvm.apache.org/t/quantization-story/3920).\n\nHere, we demonstrate how to load and run models quantized by PyTorch, MXNet, [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/c23f7654585d9b0fa2129e1765b2a8f2/from_keras.py b/docs/_downloads/c23f7654585d9b0fa2129e1765b2a8f2/from_keras.py
index ac961ca16a..3da674c250 100644
--- a/docs/_downloads/c23f7654585d9b0fa2129e1765b2a8f2/from_keras.py
+++ b/docs/_downloads/c23f7654585d9b0fa2129e1765b2a8f2/from_keras.py
@@ -37,9 +37,6 @@ https://keras.io/#installation
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
import tvm
from tvm import te
diff --git a/docs/_downloads/c253040abc62eace272e406b7e1a4df5/tedd.py b/docs/_downloads/c253040abc62eace272e406b7e1a4df5/tedd.py
index 7cb24f4335..7d7f8f1490 100644
--- a/docs/_downloads/c253040abc62eace272e406b7e1a4df5/tedd.py
+++ b/docs/_downloads/c253040abc62eace272e406b7e1a4df5/tedd.py
@@ -38,11 +38,6 @@ how to use TEDD and how to interpret the rendered graphs.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
from tvm import topi
diff --git a/docs/_downloads/caa649473e845a115a0397a2855fd356/low_level_custom_pass.py b/docs/_downloads/caa649473e845a115a0397a2855fd356/low_level_custom_pass.py
index 0f99c72cee..50634116ce 100644
--- a/docs/_downloads/caa649473e845a115a0397a2855fd356/low_level_custom_pass.py
+++ b/docs/_downloads/caa649473e845a115a0397a2855fd356/low_level_custom_pass.py
@@ -41,11 +41,6 @@ Before reading this tutorial, we assume readers have already known these topics
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import numpy as np
diff --git a/docs/_downloads/cb089f2129f9829a01cc54eb81528811/using_relay_viz.py b/docs/_downloads/cb089f2129f9829a01cc54eb81528811/using_relay_viz.py
index ae22fe20e1..ce874ca485 100644
--- a/docs/_downloads/cb089f2129f9829a01cc54eb81528811/using_relay_viz.py
+++ b/docs/_downloads/cb089f2129f9829a01cc54eb81528811/using_relay_viz.py
@@ -43,11 +43,6 @@ To install dependencies, run:
For more details, please refer to :py:mod:`tvm.contrib.relay_viz`.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
from typing import (
Dict,
Union,
diff --git a/docs/_downloads/cc6d9aebd24d54d81752590cbc8f99f9/relay_quick_start.py b/docs/_downloads/cc6d9aebd24d54d81752590cbc8f99f9/relay_quick_start.py
index e59f0107f9..0cbe35b3e0 100644
--- a/docs/_downloads/cc6d9aebd24d54d81752590cbc8f99f9/relay_quick_start.py
+++ b/docs/_downloads/cc6d9aebd24d54d81752590cbc8f99f9/relay_quick_start.py
@@ -26,13 +26,6 @@ generates a runtime library for Nvidia GPU with TVM.
Notice that you need to build TVM with cuda and llvm enabled.
"""
-# sphinx_gallery_start_ignore
-# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
######################################################################
# Overview for Supported Hardware Backend of TVM
# ----------------------------------------------
@@ -44,6 +37,9 @@ testing.utils.install_request_hook(depth=3)
# In this tutorial, we'll choose cuda and llvm as target backends.
# To begin with, let's import Relay and TVM.
+# sphinx_gallery_start_ignore
+# sphinx_gallery_requires_cuda = True
+# sphinx_gallery_end_ignore
import numpy as np
from tvm import relay
diff --git a/docs/_downloads/cccb17d28e5e8b2e94ea8cd5ec59f6ed/deploy_ssd_gluoncv.py b/docs/_downloads/cccb17d28e5e8b2e94ea8cd5ec59f6ed/deploy_ssd_gluoncv.py
index f39244a2eb..af15a9337c 100644
--- a/docs/_downloads/cccb17d28e5e8b2e94ea8cd5ec59f6ed/deploy_ssd_gluoncv.py
+++ b/docs/_downloads/cccb17d28e5e8b2e94ea8cd5ec59f6ed/deploy_ssd_gluoncv.py
@@ -24,11 +24,6 @@ This article is an introductory tutorial to deploy SSD models with TVM.
We will use GluonCV pre-trained SSD model and convert it to Relay IR
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
diff --git a/docs/_downloads/d0a1817b910da958b41d88afe4d4952d/use_pass_instrument.py b/docs/_downloads/d0a1817b910da958b41d88afe4d4952d/use_pass_instrument.py
index 3079e2f0e7..fd965cdf97 100644
--- a/docs/_downloads/d0a1817b910da958b41d88afe4d4952d/use_pass_instrument.py
+++ b/docs/_downloads/d0a1817b910da958b41d88afe4d4952d/use_pass_instrument.py
@@ -34,11 +34,6 @@ This tutorial demonstrates how developers can use ``PassContext`` to instrument
passes. Please also refer to the :ref:`pass-infra`.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
import tvm.relay as relay
from tvm.relay.testing import resnet
diff --git a/docs/_downloads/d8509b0a8e7db9031303c1a1f6fd1e70/using_external_lib.py b/docs/_downloads/d8509b0a8e7db9031303c1a1f6fd1e70/using_external_lib.py
index c018ee13c7..38f5b2d460 100644
--- a/docs/_downloads/d8509b0a8e7db9031303c1a1f6fd1e70/using_external_lib.py
+++ b/docs/_downloads/d8509b0a8e7db9031303c1a1f6fd1e70/using_external_lib.py
@@ -32,11 +32,6 @@ For example, to use cuDNN, USE_CUDNN option in `cmake/config.cmake` needs to be
To begin with, we import Relay and TVM.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import numpy as np
diff --git a/docs/_downloads/d9089082842c138d4c81335f88c60c82/intrin_math.py b/docs/_downloads/d9089082842c138d4c81335f88c60c82/intrin_math.py
index 5a8732abd7..5a35ae1cbd 100644
--- a/docs/_downloads/d9089082842c138d4c81335f88c60c82/intrin_math.py
+++ b/docs/_downloads/d9089082842c138d4c81335f88c60c82/intrin_math.py
@@ -30,12 +30,7 @@ the interface via TVM's intrinsic API.
"""
from __future__ import absolute_import, print_function
-
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignoreimport numpy as np
+import numpy as np
import tvm
from tvm import te
diff --git a/docs/_downloads/da47fa2ad30c4b6921171c97e72f36a9/schedule_primitives.py b/docs/_downloads/da47fa2ad30c4b6921171c97e72f36a9/schedule_primitives.py
index af67ed1527..a5c542df54 100644
--- a/docs/_downloads/da47fa2ad30c4b6921171c97e72f36a9/schedule_primitives.py
+++ b/docs/_downloads/da47fa2ad30c4b6921171c97e72f36a9/schedule_primitives.py
@@ -29,11 +29,6 @@ various primitives provided by TVM.
from __future__ import absolute_import, print_function
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import tvm
from tvm import te
import numpy as np
diff --git a/docs/_downloads/dabb6b43ea9ef9d7bd1a3912001deace/build_gcn.py b/docs/_downloads/dabb6b43ea9ef9d7bd1a3912001deace/build_gcn.py
index e6106dd95b..16a87fb0f1 100644
--- a/docs/_downloads/dabb6b43ea9ef9d7bd1a3912001deace/build_gcn.py
+++ b/docs/_downloads/dabb6b43ea9ef9d7bd1a3912001deace/build_gcn.py
@@ -125,11 +125,6 @@ num_classes: int
dimension of model output (Number of classes)
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
dataset = "cora"
g, data = load_dataset(dataset)
diff --git a/docs/_downloads/e3e540f3b477c0c52d8eb73e674e8ffd/tune_conv2d_layer_cuda.py b/docs/_downloads/e3e540f3b477c0c52d8eb73e674e8ffd/tune_conv2d_layer_cuda.py
index 7964694e68..ea03869c8c 100644
--- a/docs/_downloads/e3e540f3b477c0c52d8eb73e674e8ffd/tune_conv2d_layer_cuda.py
+++ b/docs/_downloads/e3e540f3b477c0c52d8eb73e674e8ffd/tune_conv2d_layer_cuda.py
@@ -39,11 +39,7 @@ __name__ == "__main__":` block.
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
-
import os
import numpy as np
diff --git a/docs/_downloads/e416b94ca1090b0897c0f6e0df95b911/tune_network_x86.py b/docs/_downloads/e416b94ca1090b0897c0f6e0df95b911/tune_network_x86.py
index f8caba075d..6eb1b79bfe 100644
--- a/docs/_downloads/e416b94ca1090b0897c0f6e0df95b911/tune_network_x86.py
+++ b/docs/_downloads/e416b94ca1090b0897c0f6e0df95b911/tune_network_x86.py
@@ -45,11 +45,6 @@ get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
diff --git a/docs/_downloads/eac4389b114db015e95cb3cdf8b86b83/auto_scheduler_matmul_x86.py b/docs/_downloads/eac4389b114db015e95cb3cdf8b86b83/auto_scheduler_matmul_x86.py
index 98fd95c338..14f8040bf8 100644
--- a/docs/_downloads/eac4389b114db015e95cb3cdf8b86b83/auto_scheduler_matmul_x86.py
+++ b/docs/_downloads/eac4389b114db015e95cb3cdf8b86b83/auto_scheduler_matmul_x86.py
@@ -38,11 +38,6 @@ We use matrix multiplication as an example in this tutorial.
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
import tvm
diff --git a/docs/_downloads/eafe360d52540634c9eea0fa89e804bd/tune_network_cuda.py b/docs/_downloads/eafe360d52540634c9eea0fa89e804bd/tune_network_cuda.py
index a430411fd9..6709964103 100644
--- a/docs/_downloads/eafe360d52540634c9eea0fa89e804bd/tune_network_cuda.py
+++ b/docs/_downloads/eafe360d52540634c9eea0fa89e804bd/tune_network_cuda.py
@@ -44,11 +44,6 @@ get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import numpy as np
diff --git a/docs/_downloads/eb551cfff8900ec35fae9f15aa728e45/from_onnx.py b/docs/_downloads/eb551cfff8900ec35fae9f15aa728e45/from_onnx.py
index 980091d391..c1f9be72c5 100644
--- a/docs/_downloads/eb551cfff8900ec35fae9f15aa728e45/from_onnx.py
+++ b/docs/_downloads/eb551cfff8900ec35fae9f15aa728e45/from_onnx.py
@@ -32,11 +32,6 @@ Alternatively, you can refer to official site:
https://github.com/onnx/onnx
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import onnx
import numpy as np
import tvm
diff --git a/docs/_downloads/ee99205e9f2e4f54c0fb7925008a5354/bring_your_own_datatypes.py b/docs/_downloads/ee99205e9f2e4f54c0fb7925008a5354/bring_your_own_datatypes.py
index bbd207dbac..f5ff89717c 100644
--- a/docs/_downloads/ee99205e9f2e4f54c0fb7925008a5354/bring_your_own_datatypes.py
+++ b/docs/_downloads/ee99205e9f2e4f54c0fb7925008a5354/bring_your_own_datatypes.py
@@ -52,11 +52,6 @@ If you would like to try this with your own datatype library, first bring the li
ctypes.CDLL('my-datatype-lib.so', ctypes.RTLD_GLOBAL)
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
######################
# A Simple TVM Program
diff --git a/docs/_downloads/efe0b02e219b28e0bd85fbdda35ba8ac/tvmc_command_line_driver.ipynb b/docs/_downloads/efe0b02e219b28e0bd85fbdda35ba8ac/tvmc_command_line_driver.ipynb
index 9d83da7925..a6dea50969 100644
--- a/docs/_downloads/efe0b02e219b28e0bd85fbdda35ba8ac/tvmc_command_line_driver.ipynb
+++ b/docs/_downloads/efe0b02e219b28e0bd85fbdda35ba8ac/tvmc_command_line_driver.ipynb
@@ -18,17 +18,6 @@
"\n# Compiling and Optimizing a Model with TVMC\n**Authors**:\n[Leandro Nunes](https://github.com/leandron),\n[Matthew Barrett](https://github.com/mbaret),\n[Chris Hoge](https://github.com/hogepodge)\n\nIn this section, we will work with TVMC, the TVM command line driver. TVMC is a\ntool that exposes TVM features such as auto-tuning, compiling, profiling and\nexecution of models through a command line interface.\n\nUpon completion of this section, we will have used TVMC to accomp [...]
]
},
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- ""
- ]
- },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/_downloads/f7ae979fbe61064749ce0fb7a621eb4c/from_oneflow.py b/docs/_downloads/f7ae979fbe61064749ce0fb7a621eb4c/from_oneflow.py
index 0925c9fe81..64f659316b 100644
--- a/docs/_downloads/f7ae979fbe61064749ce0fb7a621eb4c/from_oneflow.py
+++ b/docs/_downloads/f7ae979fbe61064749ce0fb7a621eb4c/from_oneflow.py
@@ -39,9 +39,6 @@ Currently, TVM supports OneFlow 0.7.0. Other versions may be unstable.
# sphinx_gallery_start_ignore
# sphinx_gallery_requires_cuda = True
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
# sphinx_gallery_end_ignore
import os, math
from matplotlib import pyplot as plt
diff --git a/docs/_downloads/f8a7209a0e66b246185bfc41bbc82f54/micro_aot.py b/docs/_downloads/f8a7209a0e66b246185bfc41bbc82f54/micro_aot.py
index 8646b6d7ec..81109b2965 100644
--- a/docs/_downloads/f8a7209a0e66b246185bfc41bbc82f54/micro_aot.py
+++ b/docs/_downloads/f8a7209a0e66b246185bfc41bbc82f54/micro_aot.py
@@ -35,11 +35,6 @@ or on Zephyr platform on a microcontroller/board supported by Zephyr.
# .. include:: ../../../../gallery/how_to/work_with_microtvm/install_dependencies.rst
#
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
import os
diff --git a/docs/_downloads/f90d5f6bfd99e0d9812ae5b91503e148/from_pytorch.py b/docs/_downloads/f90d5f6bfd99e0d9812ae5b91503e148/from_pytorch.py
index 064ed70e46..14c264b9f4 100644
--- a/docs/_downloads/f90d5f6bfd99e0d9812ae5b91503e148/from_pytorch.py
+++ b/docs/_downloads/f90d5f6bfd99e0d9812ae5b91503e148/from_pytorch.py
@@ -41,12 +41,6 @@ Currently, TVM supports PyTorch 1.7 and 1.4. Other versions may
be unstable.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
import tvm
from tvm import relay
diff --git a/docs/_downloads/f9c6910c7b4a120c51a9bf48f34f3ad7/uma.py b/docs/_downloads/f9c6910c7b4a120c51a9bf48f34f3ad7/uma.py
index ea38813a7a..5380aa116f 100644
--- a/docs/_downloads/f9c6910c7b4a120c51a9bf48f34f3ad7/uma.py
+++ b/docs/_downloads/f9c6910c7b4a120c51a9bf48f34f3ad7/uma.py
@@ -41,12 +41,6 @@ Making your Hardware Accelerator TVM-ready with UMA
# integrated into TVM using UMA.
#
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
-
######################################################################
# Vanilla
diff --git a/docs/_downloads/fb8217c13f4351224c6cf3aacf1a87fc/deploy_prequantized.py b/docs/_downloads/fb8217c13f4351224c6cf3aacf1a87fc/deploy_prequantized.py
index fdb4de289d..b93ed5e4da 100644
--- a/docs/_downloads/fb8217c13f4351224c6cf3aacf1a87fc/deploy_prequantized.py
+++ b/docs/_downloads/fb8217c13f4351224c6cf3aacf1a87fc/deploy_prequantized.py
@@ -28,11 +28,6 @@ Here, we demonstrate how to load and run models quantized by PyTorch, MXNet, and
Once loaded, we can run compiled, quantized models on any hardware TVM supports.
"""
-# sphinx_gallery_start_ignore
-from tvm import testing
-
-testing.utils.install_request_hook(depth=3)
-# sphinx_gallery_end_ignore
#################################################################################
# First, necessary imports
diff --git a/docs/_images/sphx_glr_micro_train_001.png b/docs/_images/sphx_glr_micro_train_001.png
index 749f250b96..4730ebaecb 100644
Binary files a/docs/_images/sphx_glr_micro_train_001.png and b/docs/_images/sphx_glr_micro_train_001.png differ
diff --git a/docs/_images/sphx_glr_micro_train_thumb.png b/docs/_images/sphx_glr_micro_train_thumb.png
index eb961b1b9c..4f63c99e35 100644
Binary files a/docs/_images/sphx_glr_micro_train_thumb.png and b/docs/_images/sphx_glr_micro_train_thumb.png differ
diff --git a/docs/_sources/how_to/compile_models/from_coreml.rst.txt b/docs/_sources/how_to/compile_models/from_coreml.rst.txt
index f724fc5ae8..59cda69c52 100644
--- a/docs/_sources/how_to/compile_models/from_coreml.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_coreml.rst.txt
@@ -58,14 +58,14 @@ https://github.com/apple/coremltools
-.. GENERATED FROM PYTHON SOURCE LINES 51-55
+.. GENERATED FROM PYTHON SOURCE LINES 46-50
Load pretrained CoreML model
----------------------------
We will download and load a pretrained mobilenet classification network
provided by apple in this example
-.. GENERATED FROM PYTHON SOURCE LINES 55-61
+.. GENERATED FROM PYTHON SOURCE LINES 50-56
.. code-block:: default
@@ -82,13 +82,13 @@ provided by apple in this example
-.. GENERATED FROM PYTHON SOURCE LINES 62-65
+.. GENERATED FROM PYTHON SOURCE LINES 57-60
Load a test image
------------------
A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 65-72
+.. GENERATED FROM PYTHON SOURCE LINES 60-67
.. code-block:: default
@@ -106,13 +106,13 @@ A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 73-76
+.. GENERATED FROM PYTHON SOURCE LINES 68-71
Compile the model on Relay
---------------------------
We should be familiar with the process right now.
-.. GENERATED FROM PYTHON SOURCE LINES 76-85
+.. GENERATED FROM PYTHON SOURCE LINES 71-80
.. code-block:: default
@@ -132,13 +132,13 @@ We should be familiar with the process right now.
-.. GENERATED FROM PYTHON SOURCE LINES 86-89
+.. GENERATED FROM PYTHON SOURCE LINES 81-84
Execute on TVM
-------------------
The process is no different from other example
-.. GENERATED FROM PYTHON SOURCE LINES 89-102
+.. GENERATED FROM PYTHON SOURCE LINES 84-97
.. code-block:: default
@@ -162,13 +162,13 @@ The process is no different from other example
-.. GENERATED FROM PYTHON SOURCE LINES 103-106
+.. GENERATED FROM PYTHON SOURCE LINES 98-101
Look up synset name
-------------------
Look up prediction top 1 index in 1000 class synset.
-.. GENERATED FROM PYTHON SOURCE LINES 106-120
+.. GENERATED FROM PYTHON SOURCE LINES 101-115
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/from_darknet.rst.txt b/docs/_sources/how_to/compile_models/from_darknet.rst.txt
index 044a1c5b93..727a0b0851 100644
--- a/docs/_sources/how_to/compile_models/from_darknet.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_darknet.rst.txt
@@ -37,12 +37,11 @@ Please install CFFI and CV2 before executing this script
%%shell
pip install cffi opencv-python
-.. GENERATED FROM PYTHON SOURCE LINES 34-51
+.. GENERATED FROM PYTHON SOURCE LINES 34-50
.. code-block:: default
-
# numpy and matplotlib
import numpy as np
import matplotlib.pyplot as plt
@@ -65,13 +64,13 @@ Please install CFFI and CV2 before executing this script
-.. GENERATED FROM PYTHON SOURCE LINES 57-60
+.. GENERATED FROM PYTHON SOURCE LINES 51-54
Choose the model
-----------------------
Models are: 'yolov2', 'yolov3' or 'yolov3-tiny'
-.. GENERATED FROM PYTHON SOURCE LINES 60-64
+.. GENERATED FROM PYTHON SOURCE LINES 54-58
.. code-block:: default
@@ -86,13 +85,13 @@ Models are: 'yolov2', 'yolov3' or 'yolov3-tiny'
-.. GENERATED FROM PYTHON SOURCE LINES 65-68
+.. GENERATED FROM PYTHON SOURCE LINES 59-62
Download required files
-----------------------
Download cfg and weights file if first time.
-.. GENERATED FROM PYTHON SOURCE LINES 68-100
+.. GENERATED FROM PYTHON SOURCE LINES 62-94
.. code-block:: default
@@ -141,13 +140,13 @@ Download cfg and weights file if first time.
-.. GENERATED FROM PYTHON SOURCE LINES 101-104
+.. GENERATED FROM PYTHON SOURCE LINES 95-98
Import the graph to Relay
-------------------------
compile the model
-.. GENERATED FROM PYTHON SOURCE LINES 104-113
+.. GENERATED FROM PYTHON SOURCE LINES 98-107
.. code-block:: default
@@ -173,12 +172,12 @@ compile the model
-.. GENERATED FROM PYTHON SOURCE LINES 114-116
+.. GENERATED FROM PYTHON SOURCE LINES 108-110
Load a test image
-----------------
-.. GENERATED FROM PYTHON SOURCE LINES 116-122
+.. GENERATED FROM PYTHON SOURCE LINES 110-116
.. code-block:: default
@@ -201,13 +200,13 @@ Load a test image
-.. GENERATED FROM PYTHON SOURCE LINES 123-126
+.. GENERATED FROM PYTHON SOURCE LINES 117-120
Execute on TVM Runtime
----------------------
The process is no different from other examples.
-.. GENERATED FROM PYTHON SOURCE LINES 126-210
+.. GENERATED FROM PYTHON SOURCE LINES 120-204
.. code-block:: default
@@ -319,7 +318,7 @@ The process is no different from other examples.
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 11.037 seconds)
+ **Total running time of the script:** ( 1 minutes 10.483 seconds)
.. _sphx_glr_download_how_to_compile_models_from_darknet.py:
diff --git a/docs/_sources/how_to/compile_models/from_keras.rst.txt b/docs/_sources/how_to/compile_models/from_keras.rst.txt
index bcc08633ce..f37d684f25 100644
--- a/docs/_sources/how_to/compile_models/from_keras.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_keras.rst.txt
@@ -61,13 +61,13 @@ https://keras.io/#installation
-.. GENERATED FROM PYTHON SOURCE LINES 53-56
+.. GENERATED FROM PYTHON SOURCE LINES 50-53
Load pretrained keras model
----------------------------
We load a pretrained resnet-50 classification model provided by keras.
-.. GENERATED FROM PYTHON SOURCE LINES 56-81
+.. GENERATED FROM PYTHON SOURCE LINES 53-78
.. code-block:: default
@@ -103,13 +103,13 @@ We load a pretrained resnet-50 classification model provided by keras.
-.. GENERATED FROM PYTHON SOURCE LINES 82-85
+.. GENERATED FROM PYTHON SOURCE LINES 79-82
Load a test image
------------------
A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 85-99
+.. GENERATED FROM PYTHON SOURCE LINES 82-96
.. code-block:: default
@@ -145,13 +145,13 @@ A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 100-103
+.. GENERATED FROM PYTHON SOURCE LINES 97-100
Compile the model with Relay
----------------------------
convert the keras model(NHWC layout) to Relay format(NCHW layout).
-.. GENERATED FROM PYTHON SOURCE LINES 103-117
+.. GENERATED FROM PYTHON SOURCE LINES 100-114
.. code-block:: default
@@ -176,12 +176,12 @@ convert the keras model(NHWC layout) to Relay format(NCHW layout).
-.. GENERATED FROM PYTHON SOURCE LINES 118-120
+.. GENERATED FROM PYTHON SOURCE LINES 115-117
Execute on TVM
---------------
-.. GENERATED FROM PYTHON SOURCE LINES 120-124
+.. GENERATED FROM PYTHON SOURCE LINES 117-121
.. code-block:: default
@@ -196,13 +196,13 @@ Execute on TVM
-.. GENERATED FROM PYTHON SOURCE LINES 125-128
+.. GENERATED FROM PYTHON SOURCE LINES 122-125
Look up synset name
-------------------
Look up prediction top 1 index in 1000 class synset.
-.. GENERATED FROM PYTHON SOURCE LINES 128-145
+.. GENERATED FROM PYTHON SOURCE LINES 125-142
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/from_mxnet.rst.txt b/docs/_sources/how_to/compile_models/from_mxnet.rst.txt
index 7935cef7bd..0b3465b693 100644
--- a/docs/_sources/how_to/compile_models/from_mxnet.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_mxnet.rst.txt
@@ -56,13 +56,13 @@ https://mxnet.apache.org/versions/master/install/index.html
-.. GENERATED FROM PYTHON SOURCE LINES 49-52
+.. GENERATED FROM PYTHON SOURCE LINES 46-49
Download Resnet18 model from Gluon Model Zoo
---------------------------------------------
In this section, we download a pretrained imagenet model and classify an image.
-.. GENERATED FROM PYTHON SOURCE LINES 52-89
+.. GENERATED FROM PYTHON SOURCE LINES 49-86
.. code-block:: default
@@ -116,13 +116,13 @@ In this section, we download a pretrained imagenet model and classify an image.
.. code-block:: none
- Downloading /workspace/.mxnet/models/resnet18_v1-a0666292.zip3a93f354-eb6f-4d3c-b2d3-cef8189a36ea from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/resnet18_v1-a0666292.zip...
+ Downloading /workspace/.mxnet/models/resnet18_v1-a0666292.zip687939f5-a1bd-4e28-ac2e-8433c6aef54a from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/resnet18_v1-a0666292.zip...
x (1, 3, 224, 224)
-.. GENERATED FROM PYTHON SOURCE LINES 90-95
+.. GENERATED FROM PYTHON SOURCE LINES 87-92
Compile the Graph
-----------------
@@ -130,7 +130,7 @@ Now we would like to port the Gluon model to a portable computational graph.
It's as easy as several lines.
We support MXNet static graph(symbol) and HybridBlock in mxnet.gluon
-.. GENERATED FROM PYTHON SOURCE LINES 95-101
+.. GENERATED FROM PYTHON SOURCE LINES 92-98
.. code-block:: default
@@ -147,11 +147,11 @@ We support MXNet static graph(symbol) and HybridBlock in mxnet.gluon
-.. GENERATED FROM PYTHON SOURCE LINES 102-103
+.. GENERATED FROM PYTHON SOURCE LINES 99-100
now compile the graph
-.. GENERATED FROM PYTHON SOURCE LINES 103-107
+.. GENERATED FROM PYTHON SOURCE LINES 100-104
.. code-block:: default
@@ -166,13 +166,13 @@ now compile the graph
-.. GENERATED FROM PYTHON SOURCE LINES 108-111
+.. GENERATED FROM PYTHON SOURCE LINES 105-108
Execute the portable graph on TVM
---------------------------------
Now, we would like to reproduce the same forward computation using TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 111-125
+.. GENERATED FROM PYTHON SOURCE LINES 108-122
.. code-block:: default
@@ -203,14 +203,14 @@ Now, we would like to reproduce the same forward computation using TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 126-130
+.. GENERATED FROM PYTHON SOURCE LINES 123-127
Use MXNet symbol with pretrained weights
----------------------------------------
MXNet often use `arg_params` and `aux_params` to store network parameters
separately, here we show how to use these weights with existing API
-.. GENERATED FROM PYTHON SOURCE LINES 130-145
+.. GENERATED FROM PYTHON SOURCE LINES 127-142
.. code-block:: default
@@ -236,11 +236,11 @@ separately, here we show how to use these weights with existing API
-.. GENERATED FROM PYTHON SOURCE LINES 146-147
+.. GENERATED FROM PYTHON SOURCE LINES 143-144
for a normal mxnet model, we start from here
-.. GENERATED FROM PYTHON SOURCE LINES 147-151
+.. GENERATED FROM PYTHON SOURCE LINES 144-148
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/from_oneflow.rst.txt b/docs/_sources/how_to/compile_models/from_oneflow.rst.txt
index 6d13148126..c034e70a44 100644
--- a/docs/_sources/how_to/compile_models/from_oneflow.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_oneflow.rst.txt
@@ -95,12 +95,12 @@ Currently, TVM supports OneFlow 0.7.0. Other versions may be unstable.
-.. GENERATED FROM PYTHON SOURCE LINES 61-63
+.. GENERATED FROM PYTHON SOURCE LINES 58-60
Load a pretrained OneFlow model and save model
----------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 63-71
+.. GENERATED FROM PYTHON SOURCE LINES 60-68
.. code-block:: default
@@ -121,18 +121,18 @@ Load a pretrained OneFlow model and save model
.. code-block:: none
Downloading: "https://oneflow-public.oss-cn-beijing.aliyuncs.com/model_zoo/flowvision/classification/ResNet/resnet18.zip" to /workspace/.oneflow/flowvision_cache/resnet18.zip
-
0%| | 0.00/41.5M [00:00<?, ?B/s]
16%|#6 | 6.78M/41.5M [00:00<00:00, 71.1MB/s]
33%|###2 | 13.6M/41.5M [00:00<00:00, 54.2MB/s]
46%|####5 | 19.0M/41.5M [00:00<00:00, 44.3MB/s]
58%|#####7 | 24.0M/41.5M [00:00<00:00, 31.7MB/s]
77%|#######7 | 32.0M/41.5M [00:00<00:00, 41.1MB/s]
92%|#########2| 38.3M/41.5M [00:01<00:00, 30.5MB/s]
100%|##########| 41.5M/41.5M [00:01<00:00, 36.8MB/s]
+
0%| | 0.00/41.5M [00:00<?, ?B/s]
19%|#9 | 7.99M/41.5M [00:00<00:00, 55.4MB/s]
37%|###6 | 15.2M/41.5M [00:00<00:00, 65.2MB/s]
52%|#####2 | 21.6M/41.5M [00:00<00:00, 60.1MB/s]
66%|######6 | 27.5M/41.5M [00:00<00:00, 38.7MB/s]
81%|######## | 33.5M/41.5M [00:00<00:00, 44.7MB/s]
93%|#########2| 38.5M/41.5M [00:00<00:00, 45.8MB/s]
100%|##########| 41.5M/41.5M [00:00<00:00, 47.2MB/s]
-.. GENERATED FROM PYTHON SOURCE LINES 72-75
+.. GENERATED FROM PYTHON SOURCE LINES 69-72
Load a test image
-----------------
Classic cat example!
-.. GENERATED FROM PYTHON SOURCE LINES 75-95
+.. GENERATED FROM PYTHON SOURCE LINES 72-92
.. code-block:: default
@@ -163,13 +163,13 @@ Classic cat example!
-.. GENERATED FROM PYTHON SOURCE LINES 96-99
+.. GENERATED FROM PYTHON SOURCE LINES 93-96
Import the graph to Relay
-------------------------
Convert OneFlow graph to Relay graph. The input name can be arbitrary.
-.. GENERATED FROM PYTHON SOURCE LINES 99-114
+.. GENERATED FROM PYTHON SOURCE LINES 96-111
.. code-block:: default
@@ -195,13 +195,13 @@ Convert OneFlow graph to Relay graph. The input name can be arbitrary.
-.. GENERATED FROM PYTHON SOURCE LINES 115-118
+.. GENERATED FROM PYTHON SOURCE LINES 112-115
Relay Build
-----------
Compile the graph to llvm target with given input specification.
-.. GENERATED FROM PYTHON SOURCE LINES 118-123
+.. GENERATED FROM PYTHON SOURCE LINES 115-120
.. code-block:: default
@@ -217,13 +217,13 @@ Compile the graph to llvm target with given input specification.
-.. GENERATED FROM PYTHON SOURCE LINES 124-127
+.. GENERATED FROM PYTHON SOURCE LINES 121-124
Execute the portable graph on TVM
---------------------------------
Now we can try deploying the compiled model on target.
-.. GENERATED FROM PYTHON SOURCE LINES 127-135
+.. GENERATED FROM PYTHON SOURCE LINES 124-132
.. code-block:: default
@@ -249,13 +249,13 @@ Now we can try deploying the compiled model on target.
-.. GENERATED FROM PYTHON SOURCE LINES 136-139
+.. GENERATED FROM PYTHON SOURCE LINES 133-136
Look up synset name
-------------------
Look up prediction top 1 index in 1000 class synset.
-.. GENERATED FROM PYTHON SOURCE LINES 139-186
+.. GENERATED FROM PYTHON SOURCE LINES 136-183
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/from_onnx.rst.txt b/docs/_sources/how_to/compile_models/from_onnx.rst.txt
index 20ba2ebbb7..8edbea1f9f 100644
--- a/docs/_sources/how_to/compile_models/from_onnx.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_onnx.rst.txt
@@ -57,7 +57,7 @@ https://github.com/onnx/onnx
-.. GENERATED FROM PYTHON SOURCE LINES 48-53
+.. GENERATED FROM PYTHON SOURCE LINES 43-48
Load pretrained ONNX model
---------------------------------------------
@@ -65,7 +65,7 @@ The example super resolution model used here is exactly the same model in onnx t
http://pytorch.org/tutorials/advanced/super_resolution_with_caffe2.html
we skip the pytorch model construction part, and download the saved onnx model
-.. GENERATED FROM PYTHON SOURCE LINES 53-65
+.. GENERATED FROM PYTHON SOURCE LINES 48-60
.. code-block:: default
@@ -88,7 +88,7 @@ we skip the pytorch model construction part, and download the saved onnx model
-.. GENERATED FROM PYTHON SOURCE LINES 66-73
+.. GENERATED FROM PYTHON SOURCE LINES 61-68
Load a test image
---------------------------------------------
@@ -98,7 +98,7 @@ axis, a 672x672 image. Re-scale the cat image to fit this input shape then
convert to `YCbCr`. The super resolution model will then be applied to the
luminance (`Y`) channel.
-.. GENERATED FROM PYTHON SOURCE LINES 73-82
+.. GENERATED FROM PYTHON SOURCE LINES 68-77
.. code-block:: default
@@ -118,7 +118,7 @@ luminance (`Y`) channel.
-.. GENERATED FROM PYTHON SOURCE LINES 83-93
+.. GENERATED FROM PYTHON SOURCE LINES 78-88
Compile the model with relay
---------------------------------------------
@@ -131,7 +131,7 @@ Passing in the shape dictionary to the `relay.frontend.from_onnx` method
tells relay which ONNX parameters are inputs, and which are parameters, and
provides a static definition of the input size.
-.. GENERATED FROM PYTHON SOURCE LINES 93-104
+.. GENERATED FROM PYTHON SOURCE LINES 88-99
.. code-block:: default
@@ -162,12 +162,12 @@ provides a static definition of the input size.
-.. GENERATED FROM PYTHON SOURCE LINES 105-107
+.. GENERATED FROM PYTHON SOURCE LINES 100-102
Execute on TVM
---------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 107-110
+.. GENERATED FROM PYTHON SOURCE LINES 102-105
.. code-block:: default
@@ -181,7 +181,7 @@ Execute on TVM
-.. GENERATED FROM PYTHON SOURCE LINES 111-116
+.. GENERATED FROM PYTHON SOURCE LINES 106-111
Display results
---------------------------------------------
@@ -189,7 +189,7 @@ We put input and output image neck to neck. The luminance channel, `Y` is the ou
from the model. The chroma channels `Cb` and `Cr` are resized to match with a simple
bicubic algorithm. The image is then recombined and converted back to `RGB`.
-.. GENERATED FROM PYTHON SOURCE LINES 116-128
+.. GENERATED FROM PYTHON SOURCE LINES 111-123
.. code-block:: default
@@ -218,15 +218,15 @@ bicubic algorithm. The image is then recombined and converted back to `RGB`.
.. code-block:: none
- /workspace/gallery/how_to/compile_models/from_onnx.py:119: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
+ /workspace/gallery/how_to/compile_models/from_onnx.py:114: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
out_cb = img_cb.resize(out_y.size, Image.BICUBIC)
- /workspace/gallery/how_to/compile_models/from_onnx.py:120: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
+ /workspace/gallery/how_to/compile_models/from_onnx.py:115: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead.
out_cr = img_cr.resize(out_y.size, Image.BICUBIC)
-.. GENERATED FROM PYTHON SOURCE LINES 129-141
+.. GENERATED FROM PYTHON SOURCE LINES 124-136
Notes
---------------------------------------------
diff --git a/docs/_sources/how_to/compile_models/from_paddle.rst.txt b/docs/_sources/how_to/compile_models/from_paddle.rst.txt
index eadd7196ca..2bc821af67 100644
--- a/docs/_sources/how_to/compile_models/from_paddle.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_paddle.rst.txt
@@ -73,13 +73,13 @@ https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/inst
-.. GENERATED FROM PYTHON SOURCE LINES 47-50
+.. GENERATED FROM PYTHON SOURCE LINES 42-45
Load pretrained ResNet50 model
---------------------------------------------
We load a pretrained ResNet50 provided by PaddlePaddle.
-.. GENERATED FROM PYTHON SOURCE LINES 50-60
+.. GENERATED FROM PYTHON SOURCE LINES 45-55
.. code-block:: default
@@ -107,13 +107,13 @@ We load a pretrained ResNet50 provided by PaddlePaddle.
-.. GENERATED FROM PYTHON SOURCE LINES 61-64
+.. GENERATED FROM PYTHON SOURCE LINES 56-59
Load a test image
---------------------------------------------
A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 64-85
+.. GENERATED FROM PYTHON SOURCE LINES 59-80
.. code-block:: default
@@ -153,12 +153,12 @@ A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 86-88
+.. GENERATED FROM PYTHON SOURCE LINES 81-83
Compile the model with relay
---------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 88-98
+.. GENERATED FROM PYTHON SOURCE LINES 83-93
.. code-block:: default
@@ -179,12 +179,12 @@ Compile the model with relay
-.. GENERATED FROM PYTHON SOURCE LINES 99-101
+.. GENERATED FROM PYTHON SOURCE LINES 94-96
Execute on TVM
---------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 101-104
+.. GENERATED FROM PYTHON SOURCE LINES 96-99
.. code-block:: default
@@ -198,13 +198,13 @@ Execute on TVM
-.. GENERATED FROM PYTHON SOURCE LINES 105-108
+.. GENERATED FROM PYTHON SOURCE LINES 100-103
Look up synset name
---------------------------------------------
Look up prediction top 1 index in 1000 class synset.
-.. GENERATED FROM PYTHON SOURCE LINES 108-124
+.. GENERATED FROM PYTHON SOURCE LINES 103-119
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/from_pytorch.rst.txt b/docs/_sources/how_to/compile_models/from_pytorch.rst.txt
index 668b6f8b0e..e7e39acf3e 100644
--- a/docs/_sources/how_to/compile_models/from_pytorch.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_pytorch.rst.txt
@@ -47,12 +47,11 @@ with the proper TorchVision version.
Currently, TVM supports PyTorch 1.7 and 1.4. Other versions may
be unstable.
-.. GENERATED FROM PYTHON SOURCE LINES 43-56
+.. GENERATED FROM PYTHON SOURCE LINES 43-55
.. code-block:: default
-
import tvm
from tvm import relay
@@ -71,12 +70,12 @@ be unstable.
-.. GENERATED FROM PYTHON SOURCE LINES 62-64
+.. GENERATED FROM PYTHON SOURCE LINES 56-58
Load a pretrained PyTorch model
-------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 64-73
+.. GENERATED FROM PYTHON SOURCE LINES 58-67
.. code-block:: default
@@ -102,18 +101,18 @@ Load a pretrained PyTorch model
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=ResNet18_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet18_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Downloading: "https://download.pytorch.org/models/resnet18-f37072fd.pth" to /workspace/.cache/torch/hub/checkpoints/resnet18-f37072fd.pth
-
0%| | 0.00/44.7M [00:00<?, ?B/s]
18%|#7 | 7.99M/44.7M [00:00<00:01, 35.5MB/s]
33%|###3 | 14.9M/44.7M [00:00<00:00, 49.5MB/s]
46%|####5 | 20.4M/44.7M [00:00<00:00, 50.3MB/s]
57%|#####7 | 25.6M/44.7M [00:00<00:00, 45.8MB/s]
69%|######9 | 30.9M/44.7M [00:00<00:00, 48.5MB/s]
80%|#######9 | 35.7M/44.7M [00:00<00:00, 49.2MB/s]
91%|######### | 40.6M/44.7M [00:00<00:00, 38.7MB/s]
100%|##########| 44.7M/44.7M [00:01<00:00, 46.7MB/s]
+
0%| | 0.00/44.7M [00:00<?, ?B/s]
14%|#4 | 6.30M/44.7M [00:00<00:00, 66.0MB/s]
28%|##8 | 12.6M/44.7M [00:00<00:00, 61.6MB/s]
41%|####1 | 18.5M/44.7M [00:00<00:00, 43.8MB/s]
54%|#####4 | 24.2M/44.7M [00:00<00:00, 48.7MB/s]
65%|######5 | 29.2M/44.7M [00:00<00:00, 48.5MB/s]
76%|#######6 | 34.1M/44.7M [00:00<00:00, 47.0MB/s]
90%|########9 | 40.0M/44.7M [00:00<00:00, 50.3MB/s]
100%|##########| 44.7M/44.7M [00:00<00:00, 54.6MB/s]
-.. GENERATED FROM PYTHON SOURCE LINES 74-77
+.. GENERATED FROM PYTHON SOURCE LINES 68-71
Load a test image
-----------------
Classic cat example!
-.. GENERATED FROM PYTHON SOURCE LINES 77-97
+.. GENERATED FROM PYTHON SOURCE LINES 71-91
.. code-block:: default
@@ -144,13 +143,13 @@ Classic cat example!
-.. GENERATED FROM PYTHON SOURCE LINES 98-101
+.. GENERATED FROM PYTHON SOURCE LINES 92-95
Import the graph to Relay
-------------------------
Convert PyTorch graph to Relay graph. The input name can be arbitrary.
-.. GENERATED FROM PYTHON SOURCE LINES 101-105
+.. GENERATED FROM PYTHON SOURCE LINES 95-99
.. code-block:: default
@@ -165,13 +164,13 @@ Convert PyTorch graph to Relay graph. The input name can be arbitrary.
-.. GENERATED FROM PYTHON SOURCE LINES 106-109
+.. GENERATED FROM PYTHON SOURCE LINES 100-103
Relay Build
-----------
Compile the graph to llvm target with given input specification.
-.. GENERATED FROM PYTHON SOURCE LINES 109-114
+.. GENERATED FROM PYTHON SOURCE LINES 103-108
.. code-block:: default
@@ -187,13 +186,13 @@ Compile the graph to llvm target with given input specification.
-.. GENERATED FROM PYTHON SOURCE LINES 115-118
+.. GENERATED FROM PYTHON SOURCE LINES 109-112
Execute the portable graph on TVM
---------------------------------
Now we can try deploying the compiled model on target.
-.. GENERATED FROM PYTHON SOURCE LINES 118-129
+.. GENERATED FROM PYTHON SOURCE LINES 112-123
.. code-block:: default
@@ -215,13 +214,13 @@ Now we can try deploying the compiled model on target.
-.. GENERATED FROM PYTHON SOURCE LINES 130-133
+.. GENERATED FROM PYTHON SOURCE LINES 124-127
Look up synset name
-------------------
Look up prediction top 1 index in 1000 class synset.
-.. GENERATED FROM PYTHON SOURCE LINES 133-178
+.. GENERATED FROM PYTHON SOURCE LINES 127-172
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/from_tensorflow.rst.txt b/docs/_sources/how_to/compile_models/from_tensorflow.rst.txt
index 6df7d1c32b..ba83f3ca7c 100644
--- a/docs/_sources/how_to/compile_models/from_tensorflow.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_tensorflow.rst.txt
@@ -35,12 +35,11 @@ For us to begin with, tensorflow python module is required to be installed.
Please refer to https://www.tensorflow.org/install
-.. GENERATED FROM PYTHON SOURCE LINES 31-75
+.. GENERATED FROM PYTHON SOURCE LINES 31-74
.. code-block:: default
-
# tvm, relay
import tvm
from tvm import te
@@ -90,14 +89,14 @@ Please refer to https://www.tensorflow.org/install
-.. GENERATED FROM PYTHON SOURCE LINES 81-85
+.. GENERATED FROM PYTHON SOURCE LINES 75-79
Tutorials
---------
Please refer docs/frontend/tensorflow.md for more details for various models
from tensorflow.
-.. GENERATED FROM PYTHON SOURCE LINES 85-106
+.. GENERATED FROM PYTHON SOURCE LINES 79-100
.. code-block:: default
@@ -129,13 +128,13 @@ from tensorflow.
-.. GENERATED FROM PYTHON SOURCE LINES 107-110
+.. GENERATED FROM PYTHON SOURCE LINES 101-104
Download required files
-----------------------
Download files listed above.
-.. GENERATED FROM PYTHON SOURCE LINES 110-117
+.. GENERATED FROM PYTHON SOURCE LINES 104-111
.. code-block:: default
@@ -153,13 +152,13 @@ Download files listed above.
-.. GENERATED FROM PYTHON SOURCE LINES 118-121
+.. GENERATED FROM PYTHON SOURCE LINES 112-115
Import model
------------
Creates tensorflow graph definition from protobuf file.
-.. GENERATED FROM PYTHON SOURCE LINES 121-132
+.. GENERATED FROM PYTHON SOURCE LINES 115-126
.. code-block:: default
@@ -181,7 +180,7 @@ Creates tensorflow graph definition from protobuf file.
-.. GENERATED FROM PYTHON SOURCE LINES 133-141
+.. GENERATED FROM PYTHON SOURCE LINES 127-135
Decode image
------------
@@ -192,7 +191,7 @@ Decode image
Hence we supply decoded frame to TVM instead.
-.. GENERATED FROM PYTHON SOURCE LINES 141-148
+.. GENERATED FROM PYTHON SOURCE LINES 135-142
.. code-block:: default
@@ -210,7 +209,7 @@ Decode image
-.. GENERATED FROM PYTHON SOURCE LINES 149-156
+.. GENERATED FROM PYTHON SOURCE LINES 143-150
Import the graph to Relay
-------------------------
@@ -220,7 +219,7 @@ Results:
sym: relay expr for given tensorflow protobuf.
params: params converted from tensorflow params (tensor protobuf).
-.. GENERATED FROM PYTHON SOURCE LINES 156-161
+.. GENERATED FROM PYTHON SOURCE LINES 150-155
.. code-block:: default
@@ -246,7 +245,7 @@ Results:
-.. GENERATED FROM PYTHON SOURCE LINES 162-170
+.. GENERATED FROM PYTHON SOURCE LINES 156-164
Relay Build
-----------
@@ -257,7 +256,7 @@ Results:
params: final params after compilation.
lib: target library which can be deployed on target with TVM runtime.
-.. GENERATED FROM PYTHON SOURCE LINES 170-174
+.. GENERATED FROM PYTHON SOURCE LINES 164-168
.. code-block:: default
@@ -272,13 +271,13 @@ Results:
-.. GENERATED FROM PYTHON SOURCE LINES 175-178
+.. GENERATED FROM PYTHON SOURCE LINES 169-172
Execute the portable graph on TVM
---------------------------------
Now we can try deploying the compiled model on target.
-.. GENERATED FROM PYTHON SOURCE LINES 178-190
+.. GENERATED FROM PYTHON SOURCE LINES 172-184
.. code-block:: default
@@ -301,13 +300,13 @@ Now we can try deploying the compiled model on target.
-.. GENERATED FROM PYTHON SOURCE LINES 191-194
+.. GENERATED FROM PYTHON SOURCE LINES 185-188
Process the output
------------------
Process the model output to human readable text for InceptionV1.
-.. GENERATED FROM PYTHON SOURCE LINES 194-207
+.. GENERATED FROM PYTHON SOURCE LINES 188-201
.. code-block:: default
@@ -341,13 +340,13 @@ Process the model output to human readable text for InceptionV1.
-.. GENERATED FROM PYTHON SOURCE LINES 208-211
+.. GENERATED FROM PYTHON SOURCE LINES 202-205
Inference on tensorflow
-----------------------
Run the corresponding model on tensorflow
-.. GENERATED FROM PYTHON SOURCE LINES 211-264
+.. GENERATED FROM PYTHON SOURCE LINES 205-258
.. code-block:: default
@@ -425,7 +424,7 @@ Run the corresponding model on tensorflow
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 12.994 seconds)
+ **Total running time of the script:** ( 1 minutes 11.223 seconds)
.. _sphx_glr_download_how_to_compile_models_from_tensorflow.py:
diff --git a/docs/_sources/how_to/compile_models/from_tflite.rst.txt b/docs/_sources/how_to/compile_models/from_tflite.rst.txt
index 9c47b49365..a13bf64dca 100644
--- a/docs/_sources/how_to/compile_models/from_tflite.rst.txt
+++ b/docs/_sources/how_to/compile_models/from_tflite.rst.txt
@@ -63,12 +63,11 @@ Below you can find an example on how to compile TFLite model using TVM.
Utils for downloading and extracting zip files
----------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 58-75
+.. GENERATED FROM PYTHON SOURCE LINES 58-74
.. code-block:: default
-
import os
@@ -91,13 +90,13 @@ Utils for downloading and extracting zip files
-.. GENERATED FROM PYTHON SOURCE LINES 81-84
+.. GENERATED FROM PYTHON SOURCE LINES 75-78
Load pretrained TFLite model
----------------------------
Load mobilenet V1 TFLite model provided by Google
-.. GENERATED FROM PYTHON SOURCE LINES 84-107
+.. GENERATED FROM PYTHON SOURCE LINES 78-101
.. code-block:: default
@@ -131,13 +130,13 @@ Load mobilenet V1 TFLite model provided by Google
-.. GENERATED FROM PYTHON SOURCE LINES 108-111
+.. GENERATED FROM PYTHON SOURCE LINES 102-105
Load a test image
-----------------
A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 111-132
+.. GENERATED FROM PYTHON SOURCE LINES 105-126
.. code-block:: default
@@ -180,12 +179,12 @@ A single cat dominates the examples!
-.. GENERATED FROM PYTHON SOURCE LINES 133-135
+.. GENERATED FROM PYTHON SOURCE LINES 127-129
Compile the model with relay
----------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 135-153
+.. GENERATED FROM PYTHON SOURCE LINES 129-147
.. code-block:: default
@@ -214,12 +213,12 @@ Compile the model with relay
-.. GENERATED FROM PYTHON SOURCE LINES 154-156
+.. GENERATED FROM PYTHON SOURCE LINES 148-150
Execute on TVM
--------------
-.. GENERATED FROM PYTHON SOURCE LINES 156-172
+.. GENERATED FROM PYTHON SOURCE LINES 150-166
.. code-block:: default
@@ -246,12 +245,12 @@ Execute on TVM
-.. GENERATED FROM PYTHON SOURCE LINES 173-175
+.. GENERATED FROM PYTHON SOURCE LINES 167-169
Display results
---------------
-.. GENERATED FROM PYTHON SOURCE LINES 175-200
+.. GENERATED FROM PYTHON SOURCE LINES 169-194
.. code-block:: default
diff --git a/docs/_sources/how_to/compile_models/sg_execution_times.rst.txt b/docs/_sources/how_to/compile_models/sg_execution_times.rst.txt
index d3fbdf6f1a..0fb0106b86 100644
--- a/docs/_sources/how_to/compile_models/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/compile_models/sg_execution_times.rst.txt
@@ -5,26 +5,26 @@
Computation times
=================
-**05:46.044** total execution time for **how_to_compile_models** files:
+**05:43.454** total execution time for **how_to_compile_models** files:
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_tensorflow.py` (``from_tensorflow.py``) | 01:12.994 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_tensorflow.py` (``from_tensorflow.py``) | 01:11.223 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_darknet.py` (``from_darknet.py``) | 01:11.037 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_darknet.py` (``from_darknet.py``) | 01:10.483 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_paddle.py` (``from_paddle.py``) | 00:45.756 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_paddle.py` (``from_paddle.py``) | 00:46.264 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_oneflow.py` (``from_oneflow.py``) | 00:32.446 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_oneflow.py` (``from_oneflow.py``) | 00:32.276 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_mxnet.py` (``from_mxnet.py``) | 00:28.794 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_mxnet.py` (``from_mxnet.py``) | 00:28.972 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_coreml.py` (``from_coreml.py``) | 00:27.408 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_coreml.py` (``from_coreml.py``) | 00:26.833 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_tflite.py` (``from_tflite.py``) | 00:25.530 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_tflite.py` (``from_tflite.py``) | 00:25.147 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_pytorch.py` (``from_pytorch.py``) | 00:22.904 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_pytorch.py` (``from_pytorch.py``) | 00:22.571 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_keras.py` (``from_keras.py``) | 00:16.718 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_keras.py` (``from_keras.py``) | 00:17.283 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_compile_models_from_onnx.py` (``from_onnx.py``) | 00:02.458 | 0.0 MB |
+| :ref:`sphx_glr_how_to_compile_models_from_onnx.py` (``from_onnx.py``) | 00:02.402 | 0.0 MB |
+-----------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/deploy_models/deploy_model_on_adreno.rst.txt b/docs/_sources/how_to/deploy_models/deploy_model_on_adreno.rst.txt
index 3f7c5dcc4c..50f35096c5 100644
--- a/docs/_sources/how_to/deploy_models/deploy_model_on_adreno.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_model_on_adreno.rst.txt
@@ -127,12 +127,11 @@ Load a test image
-----------------
As an example we would use classical cat image from ImageNet
-.. GENERATED FROM PYTHON SOURCE LINES 122-149
+.. GENERATED FROM PYTHON SOURCE LINES 122-148
.. code-block:: default
-
from PIL import Image
from tvm.contrib.download import download_testdata
from matplotlib import pyplot as plt
@@ -170,13 +169,13 @@ As an example we would use classical cat image from ImageNet
-.. GENERATED FROM PYTHON SOURCE LINES 155-158
+.. GENERATED FROM PYTHON SOURCE LINES 149-152
Load pretrained Pytorch model
-----------------------------
Create a Relay graph from a Pytorch ResNet-18 model
-.. GENERATED FROM PYTHON SOURCE LINES 158-181
+.. GENERATED FROM PYTHON SOURCE LINES 152-175
.. code-block:: default
@@ -223,13 +222,13 @@ Create a Relay graph from a Pytorch ResNet-18 model
-.. GENERATED FROM PYTHON SOURCE LINES 182-185
+.. GENERATED FROM PYTHON SOURCE LINES 176-179
Precisions
----------
Since TVM support Mixed Precision, we need to register mixed_precision_conversion:
-.. GENERATED FROM PYTHON SOURCE LINES 185-210
+.. GENERATED FROM PYTHON SOURCE LINES 179-204
.. code-block:: default
@@ -265,11 +264,11 @@ Since TVM support Mixed Precision, we need to register mixed_precision_conversio
-.. GENERATED FROM PYTHON SOURCE LINES 211-212
+.. GENERATED FROM PYTHON SOURCE LINES 205-206
and also define the conversion function itself
-.. GENERATED FROM PYTHON SOURCE LINES 212-228
+.. GENERATED FROM PYTHON SOURCE LINES 206-222
.. code-block:: default
@@ -296,11 +295,11 @@ and also define the conversion function itself
-.. GENERATED FROM PYTHON SOURCE LINES 229-230
+.. GENERATED FROM PYTHON SOURCE LINES 223-224
Let's choose "float16_acc32" for example.
-.. GENERATED FROM PYTHON SOURCE LINES 230-236
+.. GENERATED FROM PYTHON SOURCE LINES 224-230
.. code-block:: default
@@ -542,13 +541,13 @@ Let's choose "float16_acc32" for example.
-.. GENERATED FROM PYTHON SOURCE LINES 237-240
+.. GENERATED FROM PYTHON SOURCE LINES 231-234
As you can see in the IR, the architecture now contains cast operations, which are
needed to convert to FP16 precision.
You can also use "float16" or "float32" precisions as other dtype options.
-.. GENERATED FROM PYTHON SOURCE LINES 242-250
+.. GENERATED FROM PYTHON SOURCE LINES 236-244
Compile the model with relay
----------------------------
@@ -559,7 +558,7 @@ If running it on the Android device, we need to
specify its instruction set. Set :code:`local_demo` to False if you want
to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 250-272
+.. GENERATED FROM PYTHON SOURCE LINES 244-266
.. code-block:: default
@@ -592,14 +591,14 @@ to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 273-277
+.. GENERATED FROM PYTHON SOURCE LINES 267-271
Deploy the Model Remotely by RPC
--------------------------------
Using RPC you can deploy the model from host
machine to the remote Adreno device
-.. GENERATED FROM PYTHON SOURCE LINES 277-308
+.. GENERATED FROM PYTHON SOURCE LINES 271-302
.. code-block:: default
@@ -641,13 +640,13 @@ machine to the remote Adreno device
-.. GENERATED FROM PYTHON SOURCE LINES 309-312
+.. GENERATED FROM PYTHON SOURCE LINES 303-306
Run inference
-------------
We now can set inputs, infer our model and get predictions as output
-.. GENERATED FROM PYTHON SOURCE LINES 312-316
+.. GENERATED FROM PYTHON SOURCE LINES 306-310
.. code-block:: default
@@ -662,14 +661,14 @@ We now can set inputs, infer our model and get predictions as output
-.. GENERATED FROM PYTHON SOURCE LINES 317-321
+.. GENERATED FROM PYTHON SOURCE LINES 311-315
Get predictions and performance statistic
-----------------------------------------
This piece of code displays the top-1 and top-5 predictions, as
well as provides information about the model's performance
-.. GENERATED FROM PYTHON SOURCE LINES 321-353
+.. GENERATED FROM PYTHON SOURCE LINES 315-347
.. code-block:: default
@@ -728,7 +727,7 @@ well as provides information about the model's performance
Evaluate inference time cost...
Execution time summary:
mean (ms) median (ms) max (ms) min (ms) std (ms)
- 2542.6274 2540.7672 2551.2042 2539.5983 3.3897
+ 2542.5656 2540.8822 2558.2286 2539.3097 5.3145
diff --git a/docs/_sources/how_to/deploy_models/deploy_model_on_android.rst.txt b/docs/_sources/how_to/deploy_models/deploy_model_on_android.rst.txt
index 7451ed56a2..bfbf83eb68 100644
--- a/docs/_sources/how_to/deploy_models/deploy_model_on_android.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_model_on_android.rst.txt
@@ -56,7 +56,7 @@ This is an example of using Relay to compile a keras model and deploy it on Andr
-.. GENERATED FROM PYTHON SOURCE LINES 48-90
+.. GENERATED FROM PYTHON SOURCE LINES 43-85
Setup Environment
-----------------
@@ -101,7 +101,7 @@ After building TVM successfully, Please set PYTHONPATH.
echo 'export PYTHONPATH=/workspace/python:/workspace/vta/python:${PYTHONPATH}' >> ~/.bashrc
source ~/.bashrc
-.. GENERATED FROM PYTHON SOURCE LINES 92-109
+.. GENERATED FROM PYTHON SOURCE LINES 87-104
Start RPC Tracker
-----------------
@@ -121,7 +121,7 @@ The expected output is
INFO:RPCTracker:bind to 0.0.0.0:9190
-.. GENERATED FROM PYTHON SOURCE LINES 111-191
+.. GENERATED FROM PYTHON SOURCE LINES 106-186
Register Android device to RPC Tracker
--------------------------------------
@@ -204,13 +204,13 @@ If you use OpenCL and Vulkan, please set :code:`test_opencl` and :code:`test_vul
python3 tests/android_rpc_test.py
-.. GENERATED FROM PYTHON SOURCE LINES 193-196
+.. GENERATED FROM PYTHON SOURCE LINES 188-191
Load pretrained keras model
---------------------------
We load a pretrained MobileNetV2(alpha=0.5) classification model provided by keras.
-.. GENERATED FROM PYTHON SOURCE LINES 196-211
+.. GENERATED FROM PYTHON SOURCE LINES 191-206
.. code-block:: default
@@ -236,12 +236,12 @@ We load a pretrained MobileNetV2(alpha=0.5) classification model provided by ker
-.. GENERATED FROM PYTHON SOURCE LINES 212-214
+.. GENERATED FROM PYTHON SOURCE LINES 207-209
In order to test our model, here we download an image of cat and
transform its format.
-.. GENERATED FROM PYTHON SOURCE LINES 214-231
+.. GENERATED FROM PYTHON SOURCE LINES 209-226
.. code-block:: default
@@ -269,12 +269,12 @@ transform its format.
-.. GENERATED FROM PYTHON SOURCE LINES 232-234
+.. GENERATED FROM PYTHON SOURCE LINES 227-229
synset is used to transform the label from number of ImageNet class to
the word human can understand.
-.. GENERATED FROM PYTHON SOURCE LINES 234-248
+.. GENERATED FROM PYTHON SOURCE LINES 229-243
.. code-block:: default
@@ -299,7 +299,7 @@ the word human can understand.
-.. GENERATED FROM PYTHON SOURCE LINES 249-255
+.. GENERATED FROM PYTHON SOURCE LINES 244-250
Compile the model with relay
----------------------------
@@ -308,7 +308,7 @@ set it as :code:`llvm`. If running it on the Android device, we need to
specify its instruction set. Set :code:`local_demo` to False if you want
to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 255-291
+.. GENERATED FROM PYTHON SOURCE LINES 250-286
.. code-block:: default
@@ -355,14 +355,14 @@ to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 292-296
+.. GENERATED FROM PYTHON SOURCE LINES 287-291
Deploy the Model Remotely by RPC
--------------------------------
With RPC, you can deploy the model remotely from your host machine
to the remote android device.
-.. GENERATED FROM PYTHON SOURCE LINES 296-324
+.. GENERATED FROM PYTHON SOURCE LINES 291-319
.. code-block:: default
@@ -401,12 +401,12 @@ to the remote android device.
-.. GENERATED FROM PYTHON SOURCE LINES 325-327
+.. GENERATED FROM PYTHON SOURCE LINES 320-322
Execute on TVM
--------------
-.. GENERATED FROM PYTHON SOURCE LINES 327-342
+.. GENERATED FROM PYTHON SOURCE LINES 322-337
.. code-block:: default
@@ -437,13 +437,13 @@ Execute on TVM
Evaluate inference time cost...
Execution time summary:
mean (ms) median (ms) max (ms) min (ms) std (ms)
- 16.1583 16.1299 16.3698 15.9405 0.1383
+ 15.7656 15.7392 15.9184 15.6519 0.0973
-.. GENERATED FROM PYTHON SOURCE LINES 343-366
+.. GENERATED FROM PYTHON SOURCE LINES 338-361
Sample Output
-------------
diff --git a/docs/_sources/how_to/deploy_models/deploy_model_on_nano.rst.txt b/docs/_sources/how_to/deploy_models/deploy_model_on_nano.rst.txt
index 775899c5db..58bc41b021 100644
--- a/docs/_sources/how_to/deploy_models/deploy_model_on_nano.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_model_on_nano.rst.txt
@@ -31,12 +31,11 @@ Deploy the Pretrained Model on Jetson Nano
This is an example of using Relay to compile a ResNet model and deploy
it on Jetson Nano.
-.. GENERATED FROM PYTHON SOURCE LINES 27-36
+.. GENERATED FROM PYTHON SOURCE LINES 27-35
.. code-block:: default
-
import tvm
from tvm import te
import tvm.relay as relay
@@ -51,7 +50,7 @@ it on Jetson Nano.
-.. GENERATED FROM PYTHON SOURCE LINES 43-85
+.. GENERATED FROM PYTHON SOURCE LINES 39-81
.. _build-tvm-runtime-on-jetson-nano:
@@ -96,7 +95,7 @@ directory is in :code:`~/tvm`):
To update the environment variables, execute :code:`source ~/.bashrc`.
-.. GENERATED FROM PYTHON SOURCE LINES 87-103
+.. GENERATED FROM PYTHON SOURCE LINES 83-99
Set Up RPC Server on Device
---------------------------
@@ -115,7 +114,7 @@ successfully on your device.
INFO:RPCServer:bind to 0.0.0.0:9091
-.. GENERATED FROM PYTHON SOURCE LINES 105-112
+.. GENERATED FROM PYTHON SOURCE LINES 101-108
Prepare the Pre-trained Model
-----------------------------
@@ -125,7 +124,7 @@ We will use pre-trained model from
`MXNet Gluon model zoo <https://mxnet.apache.org/api/python/gluon/model_zoo.html>`_.
You can found more details about this part at tutorial :ref:`tutorial-from-mxnet`.
-.. GENERATED FROM PYTHON SOURCE LINES 112-120
+.. GENERATED FROM PYTHON SOURCE LINES 108-116
.. code-block:: default
@@ -144,12 +143,12 @@ You can found more details about this part at tutorial :ref:`tutorial-from-mxnet
-.. GENERATED FROM PYTHON SOURCE LINES 121-123
+.. GENERATED FROM PYTHON SOURCE LINES 117-119
In order to test our model, here we download an image of cat and
transform its format.
-.. GENERATED FROM PYTHON SOURCE LINES 123-139
+.. GENERATED FROM PYTHON SOURCE LINES 119-135
.. code-block:: default
@@ -176,12 +175,12 @@ transform its format.
-.. GENERATED FROM PYTHON SOURCE LINES 140-142
+.. GENERATED FROM PYTHON SOURCE LINES 136-138
synset is used to transform the label from number of ImageNet class to
the word human can understand.
-.. GENERATED FROM PYTHON SOURCE LINES 142-155
+.. GENERATED FROM PYTHON SOURCE LINES 138-151
.. code-block:: default
@@ -205,12 +204,12 @@ the word human can understand.
-.. GENERATED FROM PYTHON SOURCE LINES 156-158
+.. GENERATED FROM PYTHON SOURCE LINES 152-154
Now we would like to port the Gluon model to a portable computational graph.
It's as easy as several lines.
-.. GENERATED FROM PYTHON SOURCE LINES 158-166
+.. GENERATED FROM PYTHON SOURCE LINES 154-162
.. code-block:: default
@@ -229,11 +228,11 @@ It's as easy as several lines.
-.. GENERATED FROM PYTHON SOURCE LINES 167-168
+.. GENERATED FROM PYTHON SOURCE LINES 163-164
Here are some basic data workload configurations.
-.. GENERATED FROM PYTHON SOURCE LINES 168-173
+.. GENERATED FROM PYTHON SOURCE LINES 164-169
.. code-block:: default
@@ -249,7 +248,7 @@ Here are some basic data workload configurations.
-.. GENERATED FROM PYTHON SOURCE LINES 174-183
+.. GENERATED FROM PYTHON SOURCE LINES 170-179
Compile The Graph
-----------------
@@ -261,14 +260,14 @@ apart from arguments :code:`net` and :code:`params` to specify the
deep learning workload. Actually, the option matters, different option
will lead to very different performance.
-.. GENERATED FROM PYTHON SOURCE LINES 185-189
+.. GENERATED FROM PYTHON SOURCE LINES 181-185
If we run the example on our x86 server for demonstration, we can simply
set it as :code:`llvm`. If running it on the Jetson Nano, we need to
set it as :code:`nvidia/jetson-nano`. Set :code:`local_demo` to False
if you want to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 189-215
+.. GENERATED FROM PYTHON SOURCE LINES 185-211
.. code-block:: default
@@ -312,14 +311,14 @@ if you want to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 216-220
+.. GENERATED FROM PYTHON SOURCE LINES 212-216
Deploy the Model Remotely by RPC
--------------------------------
With RPC, you can deploy the model remotely from your host machine
to the remote device.
-.. GENERATED FROM PYTHON SOURCE LINES 220-250
+.. GENERATED FROM PYTHON SOURCE LINES 216-246
.. code-block:: default
diff --git a/docs/_sources/how_to/deploy_models/deploy_model_on_rasp.rst.txt b/docs/_sources/how_to/deploy_models/deploy_model_on_rasp.rst.txt
index a9cec6394d..3c32a114e4 100644
--- a/docs/_sources/how_to/deploy_models/deploy_model_on_rasp.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_model_on_rasp.rst.txt
@@ -31,12 +31,11 @@ Deploy the Pretrained Model on Raspberry Pi
This is an example of using Relay to compile a ResNet model and deploy
it on Raspberry Pi.
-.. GENERATED FROM PYTHON SOURCE LINES 28-37
+.. GENERATED FROM PYTHON SOURCE LINES 28-36
.. code-block:: default
-
import tvm
from tvm import te
import tvm.relay as relay
@@ -51,7 +50,7 @@ it on Raspberry Pi.
-.. GENERATED FROM PYTHON SOURCE LINES 43-80
+.. GENERATED FROM PYTHON SOURCE LINES 37-74
.. _build-tvm-runtime-on-device:
@@ -91,7 +90,7 @@ directory is in :code:`~/tvm`):
To update the environment variables, execute :code:`source ~/.bashrc`.
-.. GENERATED FROM PYTHON SOURCE LINES 82-98
+.. GENERATED FROM PYTHON SOURCE LINES 76-92
Set Up RPC Server on Device
---------------------------
@@ -110,7 +109,7 @@ successfully on your device.
INFO:root:RPCServer: bind to 0.0.0.0:9090
-.. GENERATED FROM PYTHON SOURCE LINES 100-107
+.. GENERATED FROM PYTHON SOURCE LINES 94-101
Prepare the Pre-trained Model
-----------------------------
@@ -120,7 +119,7 @@ We will use pre-trained model from
`MXNet Gluon model zoo <https://mxnet.apache.org/api/python/gluon/model_zoo.html>`_.
You can found more details about this part at tutorial :ref:`tutorial-from-mxnet`.
-.. GENERATED FROM PYTHON SOURCE LINES 107-115
+.. GENERATED FROM PYTHON SOURCE LINES 101-109
.. code-block:: default
@@ -139,12 +138,12 @@ You can found more details about this part at tutorial :ref:`tutorial-from-mxnet
-.. GENERATED FROM PYTHON SOURCE LINES 116-118
+.. GENERATED FROM PYTHON SOURCE LINES 110-112
In order to test our model, here we download an image of cat and
transform its format.
-.. GENERATED FROM PYTHON SOURCE LINES 118-134
+.. GENERATED FROM PYTHON SOURCE LINES 112-128
.. code-block:: default
@@ -171,12 +170,12 @@ transform its format.
-.. GENERATED FROM PYTHON SOURCE LINES 135-137
+.. GENERATED FROM PYTHON SOURCE LINES 129-131
synset is used to transform the label from number of ImageNet class to
the word human can understand.
-.. GENERATED FROM PYTHON SOURCE LINES 137-150
+.. GENERATED FROM PYTHON SOURCE LINES 131-144
.. code-block:: default
@@ -200,12 +199,12 @@ the word human can understand.
-.. GENERATED FROM PYTHON SOURCE LINES 151-153
+.. GENERATED FROM PYTHON SOURCE LINES 145-147
Now we would like to port the Gluon model to a portable computational graph.
It's as easy as several lines.
-.. GENERATED FROM PYTHON SOURCE LINES 153-161
+.. GENERATED FROM PYTHON SOURCE LINES 147-155
.. code-block:: default
@@ -224,11 +223,11 @@ It's as easy as several lines.
-.. GENERATED FROM PYTHON SOURCE LINES 162-163
+.. GENERATED FROM PYTHON SOURCE LINES 156-157
Here are some basic data workload configurations.
-.. GENERATED FROM PYTHON SOURCE LINES 163-168
+.. GENERATED FROM PYTHON SOURCE LINES 157-162
.. code-block:: default
@@ -244,7 +243,7 @@ Here are some basic data workload configurations.
-.. GENERATED FROM PYTHON SOURCE LINES 169-178
+.. GENERATED FROM PYTHON SOURCE LINES 163-172
Compile The Graph
-----------------
@@ -256,14 +255,14 @@ apart from arguments :code:`net` and :code:`params` to specify the
deep learning workload. Actually, the option matters, different option
will lead to very different performance.
-.. GENERATED FROM PYTHON SOURCE LINES 180-184
+.. GENERATED FROM PYTHON SOURCE LINES 174-178
If we run the example on our x86 server for demonstration, we can simply
set it as :code:`llvm`. If running it on the Raspberry Pi, we need to
specify its instruction set. Set :code:`local_demo` to False if you want
to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 184-206
+.. GENERATED FROM PYTHON SOURCE LINES 178-200
.. code-block:: default
@@ -303,14 +302,14 @@ to run this tutorial with a real device.
-.. GENERATED FROM PYTHON SOURCE LINES 207-211
+.. GENERATED FROM PYTHON SOURCE LINES 201-205
Deploy the Model Remotely by RPC
--------------------------------
With RPC, you can deploy the model remotely from your host machine
to the remote device.
-.. GENERATED FROM PYTHON SOURCE LINES 211-237
+.. GENERATED FROM PYTHON SOURCE LINES 205-231
.. code-block:: default
diff --git a/docs/_sources/how_to/deploy_models/deploy_object_detection_pytorch.rst.txt b/docs/_sources/how_to/deploy_models/deploy_object_detection_pytorch.rst.txt
index 877e69c11f..39511b0378 100644
--- a/docs/_sources/how_to/deploy_models/deploy_object_detection_pytorch.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_object_detection_pytorch.rst.txt
@@ -46,12 +46,11 @@ with the proper TorchVision version.
Currently, TVM supports PyTorch 1.7 and 1.4. Other versions may
be unstable.
-.. GENERATED FROM PYTHON SOURCE LINES 42-57
+.. GENERATED FROM PYTHON SOURCE LINES 42-56
.. code-block:: default
-
import tvm
from tvm import relay
from tvm import relay
@@ -72,12 +71,12 @@ be unstable.
-.. GENERATED FROM PYTHON SOURCE LINES 63-65
+.. GENERATED FROM PYTHON SOURCE LINES 57-59
Load pre-trained maskrcnn from torchvision and do tracing
---------------------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 65-102
+.. GENERATED FROM PYTHON SOURCE LINES 59-96
.. code-block:: default
@@ -131,7 +130,7 @@ Load pre-trained maskrcnn from torchvision and do tracing
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=MaskRCNN_ResNet50_FPN_Weights.COCO_V1`. You can also use `weights=MaskRCNN_ResNet50_FPN_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Downloading: "https://download.pytorch.org/models/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth" to /workspace/.cache/torch/hub/checkpoints/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth
-
0%| | 0.00/170M [00:00<?, ?B/s]
4%|3 | 6.30M/170M [00:00<00:03, 51.8MB/s]
7%|6 | 11.2M/170M [00:00<00:04, 34.3MB/s]
11%|#1 | 18.7M/170M [00:00<00:03, 48.8MB/s]
14%|#4 | 24.0M/170M [00:00<00:03, 38.8MB/s]
18%|#7 | 30.3M/170M [00:00<00:03, 45.7MB/s]
21%|##1 | 36.3M/170M [00:00<00:02, 50.4MB/s]
26%|##5 | 44.1M/170M [00:00<00:02, 58.9MB/s]
30%|##9 | 50.2M/170M [00:01<00:02, 55.7MB/s]
33%|###2 | 56.0M/170M [00:01<00:02, 56.6MB/s]
38%|###7 | 64.0M/170M [00:01<00:01, 61.3MB/s]
42%|####2 | 72.0M/170M [00:01<00:01, 61.9MB/s]
47%|####7 | 80.0M/170M [00:01<00:01, 57.2MB/s]
50%|##### | 85.6M/170M [00:01<00:01, 56.0MB/s]
54%|#####3 | 91.1M/170M [00:01<00:01, 49.8MB/s]
57%|#####6 | 96.0M/170M [00:02<00:01, 43.8MB/s]
61%|######1 | 104M/170M [00:02<00:01, 47.8MB/s]
66%|######5 | 112M/170M [00:02<00:01, 54.3MB/s
]
71%|####### | 120M/170M [00:02<00:01, 51.3MB/s]
74%|#######4 | 126M/170M [00:02<00:01, 43.5MB/s]
77%|#######6 | 131M/170M [00:02<00:00, 42.4MB/s]
80%|######## | 136M/170M [00:02<00:00, 40.6MB/s]
85%|########4 | 144M/170M [00:03<00:00, 48.1MB/s]
89%|########9 | 152M/170M [00:03<00:00, 52.1MB/s]
94%|#########4| 160M/170M [00:03<00:00, 50.5MB/s]
98%|#########7| 166M/170M [00:03<00:00, 42.4MB/s]
100%|##########| 170M/170M [00:03<00:00, 48.9MB/s]
+
0%| | 0.00/170M [00:00<?, ?B/s]
5%|4 | 7.99M/170M [00:00<00:02, 61.7MB/s]
9%|9 | 16.0M/170M [00:00<00:02, 58.5MB/s]
13%|#3 | 22.3M/170M [00:00<00:03, 49.7MB/s]
16%|#5 | 27.1M/170M [00:00<00:03, 41.0MB/s]
21%|##1 | 35.7M/170M [00:00<00:02, 53.9MB/s]
24%|##4 | 41.4M/170M [00:00<00:03, 43.2MB/s]
28%|##8 | 48.0M/170M [00:01<00:03, 39.9MB/s]
33%|###2 | 56.0M/170M [00:01<00:02, 47.1MB/s]
38%|###7 | 64.0M/170M [00:01<00:02, 49.0MB/s]
42%|####2 | 72.0M/170M [00:01<00:01, 53.5MB/s]
47%|####7 | 80.0M/170M [00:01<00:01, 56.6MB/s]
52%|#####1 | 88.0M/170M [00:01<00:01, 51.6MB/s]
56%|#####6 | 95.5M/170M [00:01<00:01, 57.4MB/s]
60%|#####9 | 101M/170M [00:02<00:01, 55.3MB/s]
63%|######2 | 107M/170M [00:02<00:01, 53.5MB/s]
66%|######6 | 112M/170M [00:02<00:01, 53.9MB/s]
71%|####### | 120M/170M [00:02<00:00, 58.1MB/s]
75%|#######5 | 128M/170M [00:02<00:00, 56.8MB/s]
80%|######## | 136M/170M [00:02<00:00, 52.7MB/s]
85%|########4 | 144M/170M [00:02<00:00, 60.6MB/s]
89%|########8 | 150M/170M [00:02<00:00, 59.3MB/s]
92%|#########2| 156M/170M [00:03<00:00, 54.7MB/s]
95%|#########5| 162M/170M [00:03<00:00, 52.6MB/s]
99%|#########8| 168M/170M [00:03<00:00, 53.8MB/s]
100%|##########| 170M/170M [00:03<00:00, 52.9MB/s]
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/torch/nn/functional.py:3897: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
for i in range(dim)
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/torchvision/models/detection/anchor_utils.py:124: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
@@ -154,12 +153,12 @@ Load pre-trained maskrcnn from torchvision and do tracing
-.. GENERATED FROM PYTHON SOURCE LINES 103-105
+.. GENERATED FROM PYTHON SOURCE LINES 97-99
Download a test image and pre-process
-------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 105-116
+.. GENERATED FROM PYTHON SOURCE LINES 99-110
.. code-block:: default
@@ -181,12 +180,12 @@ Download a test image and pre-process
-.. GENERATED FROM PYTHON SOURCE LINES 117-119
+.. GENERATED FROM PYTHON SOURCE LINES 111-113
Import the graph to Relay
-------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 119-123
+.. GENERATED FROM PYTHON SOURCE LINES 113-117
.. code-block:: default
@@ -215,7 +214,7 @@ Import the graph to Relay
-.. GENERATED FROM PYTHON SOURCE LINES 124-130
+.. GENERATED FROM PYTHON SOURCE LINES 118-124
Compile with Relay VM
---------------------
@@ -224,7 +223,7 @@ highly recommended to build TVM with Intel MKL and Intel OpenMP to get
best performance, due to the existence of large dense operator in
torchvision rcnn models.
-.. GENERATED FROM PYTHON SOURCE LINES 130-139
+.. GENERATED FROM PYTHON SOURCE LINES 124-133
.. code-block:: default
@@ -244,12 +243,12 @@ torchvision rcnn models.
-.. GENERATED FROM PYTHON SOURCE LINES 140-142
+.. GENERATED FROM PYTHON SOURCE LINES 134-136
Inference with Relay VM
-----------------------
-.. GENERATED FROM PYTHON SOURCE LINES 142-147
+.. GENERATED FROM PYTHON SOURCE LINES 136-141
.. code-block:: default
@@ -265,12 +264,12 @@ Inference with Relay VM
-.. GENERATED FROM PYTHON SOURCE LINES 148-150
+.. GENERATED FROM PYTHON SOURCE LINES 142-144
Get boxes with score larger than 0.9
------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 150-160
+.. GENERATED FROM PYTHON SOURCE LINES 144-154
.. code-block:: default
@@ -300,7 +299,7 @@ Get boxes with score larger than 0.9
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 3 minutes 18.907 seconds)
+ **Total running time of the script:** ( 3 minutes 14.478 seconds)
.. _sphx_glr_download_how_to_deploy_models_deploy_object_detection_pytorch.py:
diff --git a/docs/_sources/how_to/deploy_models/deploy_prequantized.rst.txt b/docs/_sources/how_to/deploy_models/deploy_prequantized.rst.txt
index 2cf2158f06..5433290a6e 100644
--- a/docs/_sources/how_to/deploy_models/deploy_prequantized.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_prequantized.rst.txt
@@ -34,24 +34,11 @@ the quantization story in TVM can be found
Here, we demonstrate how to load and run models quantized by PyTorch, MXNet, and TFLite.
Once loaded, we can run compiled, quantized models on any hardware TVM supports.
-.. GENERATED FROM PYTHON SOURCE LINES 30-32
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 38-39
+.. GENERATED FROM PYTHON SOURCE LINES 33-34
First, necessary imports
-.. GENERATED FROM PYTHON SOURCE LINES 39-51
+.. GENERATED FROM PYTHON SOURCE LINES 34-46
.. code-block:: default
@@ -74,11 +61,11 @@ First, necessary imports
-.. GENERATED FROM PYTHON SOURCE LINES 52-53
+.. GENERATED FROM PYTHON SOURCE LINES 47-48
Helper functions to run the demo
-.. GENERATED FROM PYTHON SOURCE LINES 53-106
+.. GENERATED FROM PYTHON SOURCE LINES 48-101
.. code-block:: default
@@ -142,12 +129,12 @@ Helper functions to run the demo
-.. GENERATED FROM PYTHON SOURCE LINES 107-109
+.. GENERATED FROM PYTHON SOURCE LINES 102-104
A mapping from label to class name, to verify that the outputs from models below
are reasonable
-.. GENERATED FROM PYTHON SOURCE LINES 109-111
+.. GENERATED FROM PYTHON SOURCE LINES 104-106
.. code-block:: default
@@ -160,11 +147,11 @@ are reasonable
-.. GENERATED FROM PYTHON SOURCE LINES 112-113
+.. GENERATED FROM PYTHON SOURCE LINES 107-108
Everyone's favorite cat image for demonstration
-.. GENERATED FROM PYTHON SOURCE LINES 113-115
+.. GENERATED FROM PYTHON SOURCE LINES 108-110
.. code-block:: default
@@ -177,7 +164,7 @@ Everyone's favorite cat image for demonstration
-.. GENERATED FROM PYTHON SOURCE LINES 116-128
+.. GENERATED FROM PYTHON SOURCE LINES 111-123
Deploy a quantized PyTorch Model
--------------------------------
@@ -192,7 +179,7 @@ We use this function to quantize PyTorch models.
In short, this function takes a floating point model and converts it to uint8.
The model is per-channel quantized.
-.. GENERATED FROM PYTHON SOURCE LINES 128-139
+.. GENERATED FROM PYTHON SOURCE LINES 123-134
.. code-block:: default
@@ -214,14 +201,14 @@ The model is per-channel quantized.
-.. GENERATED FROM PYTHON SOURCE LINES 140-144
+.. GENERATED FROM PYTHON SOURCE LINES 135-139
Load quantization-ready, pretrained Mobilenet v2 model from torchvision
-----------------------------------------------------------------------
We choose mobilenet v2 because this model was trained with quantization aware
training. Other models require a full post training calibration.
-.. GENERATED FROM PYTHON SOURCE LINES 144-146
+.. GENERATED FROM PYTHON SOURCE LINES 139-141
.. code-block:: default
@@ -240,19 +227,19 @@ training. Other models require a full post training calibration.
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=MobileNet_V2_Weights.IMAGENET1K_V1`. You can also use `weights=MobileNet_V2_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Downloading: "https://download.pytorch.org/models/mobilenet_v2-b0353104.pth" to /workspace/.cache/torch/hub/checkpoints/mobilenet_v2-b0353104.pth
-
0%| | 0.00/13.6M [00:00<?, ?B/s]
59%|#####8 | 7.99M/13.6M [00:00<00:00, 62.0MB/s]
100%|##########| 13.6M/13.6M [00:00<00:00, 62.7MB/s]
+
0%| | 0.00/13.6M [00:00<?, ?B/s]
59%|#####8 | 7.99M/13.6M [00:00<00:00, 53.3MB/s]
100%|##########| 13.6M/13.6M [00:00<00:00, 58.2MB/s]
-.. GENERATED FROM PYTHON SOURCE LINES 147-151
+.. GENERATED FROM PYTHON SOURCE LINES 142-146
Quantize, trace and run the PyTorch Mobilenet v2 model
------------------------------------------------------
The details are out of scope for this tutorial. Please refer to the tutorials
on the PyTorch website to learn about quantization and jit.
-.. GENERATED FROM PYTHON SOURCE LINES 151-158
+.. GENERATED FROM PYTHON SOURCE LINES 146-153
.. code-block:: default
@@ -279,7 +266,7 @@ on the PyTorch website to learn about quantization and jit.
-.. GENERATED FROM PYTHON SOURCE LINES 159-170
+.. GENERATED FROM PYTHON SOURCE LINES 154-165
Convert quantized Mobilenet v2 to Relay-QNN using the PyTorch frontend
----------------------------------------------------------------------
@@ -293,7 +280,7 @@ represented.
You would see operators specific to quantization such as
qnn.quantize, qnn.dequantize, qnn.requantize, and qnn.conv2d etc.
-.. GENERATED FROM PYTHON SOURCE LINES 170-175
+.. GENERATED FROM PYTHON SOURCE LINES 165-170
.. code-block:: default
@@ -318,7 +305,7 @@ qnn.quantize, qnn.dequantize, qnn.requantize, and qnn.conv2d etc.
-.. GENERATED FROM PYTHON SOURCE LINES 176-184
+.. GENERATED FROM PYTHON SOURCE LINES 171-179
Compile and run the Relay module
--------------------------------
@@ -329,7 +316,7 @@ tutorials for more details.
Under the hood, quantization specific operators are lowered to a sequence of
standard Relay operators before compilation.
-.. GENERATED FROM PYTHON SOURCE LINES 184-187
+.. GENERATED FROM PYTHON SOURCE LINES 179-182
.. code-block:: default
@@ -343,13 +330,13 @@ standard Relay operators before compilation.
-.. GENERATED FROM PYTHON SOURCE LINES 188-191
+.. GENERATED FROM PYTHON SOURCE LINES 183-186
Compare the output labels
-------------------------
We should see identical labels printed.
-.. GENERATED FROM PYTHON SOURCE LINES 191-197
+.. GENERATED FROM PYTHON SOURCE LINES 186-192
.. code-block:: default
@@ -373,13 +360,13 @@ We should see identical labels printed.
-.. GENERATED FROM PYTHON SOURCE LINES 198-201
+.. GENERATED FROM PYTHON SOURCE LINES 193-196
However, due to the difference in numerics, in general the raw floating point
outputs are not expected to be identical. Here, we print how many floating point
output values are identical out of 1000 outputs from mobilenet v2.
-.. GENERATED FROM PYTHON SOURCE LINES 201-203
+.. GENERATED FROM PYTHON SOURCE LINES 196-198
.. code-block:: default
@@ -398,13 +385,13 @@ output values are identical out of 1000 outputs from mobilenet v2.
-.. GENERATED FROM PYTHON SOURCE LINES 204-207
+.. GENERATED FROM PYTHON SOURCE LINES 199-202
Measure performance
-------------------------
Here we give an example of how to measure performance of TVM compiled models.
-.. GENERATED FROM PYTHON SOURCE LINES 207-211
+.. GENERATED FROM PYTHON SOURCE LINES 202-206
.. code-block:: default
@@ -422,13 +409,13 @@ Here we give an example of how to measure performance of TVM compiled models.
Execution time summary:
mean (ms) median (ms) max (ms) min (ms) std (ms)
- 90.4863 90.4422 94.4846 90.0180 0.4514
+ 90.2670 90.1867 91.2879 90.0308 0.2280
-.. GENERATED FROM PYTHON SOURCE LINES 212-219
+.. GENERATED FROM PYTHON SOURCE LINES 207-214
.. note::
@@ -438,7 +425,7 @@ Here we give an example of how to measure performance of TVM compiled models.
* It includes several warm up runs
* The same method can be used to profile on remote devices (android etc.).
-.. GENERATED FROM PYTHON SOURCE LINES 222-237
+.. GENERATED FROM PYTHON SOURCE LINES 217-232
.. note::
@@ -456,13 +443,13 @@ Here we give an example of how to measure performance of TVM compiled models.
* Choose the best target for your hardware, such as "llvm -mcpu=skylake-avx512" or
"llvm -mcpu=cascadelake" (more CPUs with AVX512 would come in the future)
-.. GENERATED FROM PYTHON SOURCE LINES 240-243
+.. GENERATED FROM PYTHON SOURCE LINES 235-238
Deploy a quantized MXNet Model
------------------------------
TODO
-.. GENERATED FROM PYTHON SOURCE LINES 245-248
+.. GENERATED FROM PYTHON SOURCE LINES 240-243
Deploy a quantized TFLite Model
-------------------------------
@@ -471,7 +458,7 @@ TODO
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 6.293 seconds)
+ **Total running time of the script:** ( 1 minutes 6.224 seconds)
.. _sphx_glr_download_how_to_deploy_models_deploy_prequantized.py:
diff --git a/docs/_sources/how_to/deploy_models/deploy_prequantized_tflite.rst.txt b/docs/_sources/how_to/deploy_models/deploy_prequantized_tflite.rst.txt
index f5f6a1b2eb..8e9a79389d 100644
--- a/docs/_sources/how_to/deploy_models/deploy_prequantized_tflite.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_prequantized_tflite.rst.txt
@@ -47,25 +47,12 @@ To get started, Tensorflow and TFLite package needs to be installed as prerequis
Now please check if TFLite package is installed successfully, ``python -c "import tflite"``
-.. GENERATED FROM PYTHON SOURCE LINES 44-46
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 52-54
+.. GENERATED FROM PYTHON SOURCE LINES 47-49
Necessary imports
-----------------
-.. GENERATED FROM PYTHON SOURCE LINES 54-63
+.. GENERATED FROM PYTHON SOURCE LINES 49-58
.. code-block:: default
@@ -85,12 +72,12 @@ Necessary imports
-.. GENERATED FROM PYTHON SOURCE LINES 64-66
+.. GENERATED FROM PYTHON SOURCE LINES 59-61
Download pretrained Quantized TFLite model
------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 66-82
+.. GENERATED FROM PYTHON SOURCE LINES 61-77
.. code-block:: default
@@ -117,12 +104,12 @@ Download pretrained Quantized TFLite model
-.. GENERATED FROM PYTHON SOURCE LINES 83-85
+.. GENERATED FROM PYTHON SOURCE LINES 78-80
Utils for downloading and extracting zip files
----------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 85-100
+.. GENERATED FROM PYTHON SOURCE LINES 80-95
.. code-block:: default
@@ -148,17 +135,17 @@ Utils for downloading and extracting zip files
-.. GENERATED FROM PYTHON SOURCE LINES 101-103
+.. GENERATED FROM PYTHON SOURCE LINES 96-98
Load a test image
-----------------
-.. GENERATED FROM PYTHON SOURCE LINES 105-107
+.. GENERATED FROM PYTHON SOURCE LINES 100-102
Get a real image for e2e testing
--------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 107-122
+.. GENERATED FROM PYTHON SOURCE LINES 102-117
.. code-block:: default
@@ -184,16 +171,16 @@ Get a real image for e2e testing
-.. GENERATED FROM PYTHON SOURCE LINES 123-125
+.. GENERATED FROM PYTHON SOURCE LINES 118-120
Load a tflite model
-------------------
-.. GENERATED FROM PYTHON SOURCE LINES 127-128
+.. GENERATED FROM PYTHON SOURCE LINES 122-123
Now we can open mobilenet_v2_1.0_224.tflite
-.. GENERATED FROM PYTHON SOURCE LINES 128-141
+.. GENERATED FROM PYTHON SOURCE LINES 123-136
.. code-block:: default
@@ -217,11 +204,11 @@ Now we can open mobilenet_v2_1.0_224.tflite
-.. GENERATED FROM PYTHON SOURCE LINES 142-143
+.. GENERATED FROM PYTHON SOURCE LINES 137-138
Lets run TFLite pre-quantized model inference and get the TFLite prediction.
-.. GENERATED FROM PYTHON SOURCE LINES 143-174
+.. GENERATED FROM PYTHON SOURCE LINES 138-169
.. code-block:: default
@@ -263,11 +250,11 @@ Lets run TFLite pre-quantized model inference and get the TFLite prediction.
-.. GENERATED FROM PYTHON SOURCE LINES 175-176
+.. GENERATED FROM PYTHON SOURCE LINES 170-171
Lets run TVM compiled pre-quantized model inference and get the TVM prediction.
-.. GENERATED FROM PYTHON SOURCE LINES 176-187
+.. GENERATED FROM PYTHON SOURCE LINES 171-182
.. code-block:: default
@@ -289,16 +276,16 @@ Lets run TVM compiled pre-quantized model inference and get the TVM prediction.
-.. GENERATED FROM PYTHON SOURCE LINES 188-190
+.. GENERATED FROM PYTHON SOURCE LINES 183-185
TFLite inference
----------------
-.. GENERATED FROM PYTHON SOURCE LINES 192-193
+.. GENERATED FROM PYTHON SOURCE LINES 187-188
Run TFLite inference on the quantized model.
-.. GENERATED FROM PYTHON SOURCE LINES 193-196
+.. GENERATED FROM PYTHON SOURCE LINES 188-191
.. code-block:: default
@@ -312,19 +299,19 @@ Run TFLite inference on the quantized model.
-.. GENERATED FROM PYTHON SOURCE LINES 197-199
+.. GENERATED FROM PYTHON SOURCE LINES 192-194
TVM compilation and inference
-----------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 201-205
+.. GENERATED FROM PYTHON SOURCE LINES 196-200
We use the TFLite-Relay parser to convert the TFLite pre-quantized graph into Relay IR. Note that
frontend parser call for a pre-quantized model is exactly same as frontend parser call for a FP32
model. We encourage you to remove the comment from print(mod) and inspect the Relay module. You
will see many QNN operators, like, Requantize, Quantize and QNN Conv2D.
-.. GENERATED FROM PYTHON SOURCE LINES 205-211
+.. GENERATED FROM PYTHON SOURCE LINES 200-206
.. code-block:: default
@@ -341,12 +328,12 @@ will see many QNN operators, like, Requantize, Quantize and QNN Conv2D.
-.. GENERATED FROM PYTHON SOURCE LINES 212-214
+.. GENERATED FROM PYTHON SOURCE LINES 207-209
Lets now the compile the Relay module. We use the "llvm" target here. Please replace it with the
target platform that you are interested in.
-.. GENERATED FROM PYTHON SOURCE LINES 214-218
+.. GENERATED FROM PYTHON SOURCE LINES 209-213
.. code-block:: default
@@ -361,11 +348,11 @@ target platform that you are interested in.
-.. GENERATED FROM PYTHON SOURCE LINES 219-220
+.. GENERATED FROM PYTHON SOURCE LINES 214-215
Finally, lets call inference on the TVM compiled module.
-.. GENERATED FROM PYTHON SOURCE LINES 220-222
+.. GENERATED FROM PYTHON SOURCE LINES 215-217
.. code-block:: default
@@ -378,18 +365,18 @@ Finally, lets call inference on the TVM compiled module.
-.. GENERATED FROM PYTHON SOURCE LINES 223-225
+.. GENERATED FROM PYTHON SOURCE LINES 218-220
Accuracy comparison
-------------------
-.. GENERATED FROM PYTHON SOURCE LINES 227-230
+.. GENERATED FROM PYTHON SOURCE LINES 222-225
Print the top-5 labels for MXNet and TVM inference.
Checking the labels because the requantize implementation is different between
TFLite and Relay. This cause final output numbers to mismatch. So, testing accuracy via labels.
-.. GENERATED FROM PYTHON SOURCE LINES 230-235
+.. GENERATED FROM PYTHON SOURCE LINES 225-230
.. code-block:: default
@@ -412,13 +399,13 @@ TFLite and Relay. This cause final output numbers to mismatch. So, testing accur
-.. GENERATED FROM PYTHON SOURCE LINES 236-239
+.. GENERATED FROM PYTHON SOURCE LINES 231-234
Measure performance
-------------------
Here we give an example of how to measure performance of TVM compiled models.
-.. GENERATED FROM PYTHON SOURCE LINES 239-243
+.. GENERATED FROM PYTHON SOURCE LINES 234-238
.. code-block:: default
@@ -436,13 +423,13 @@ Here we give an example of how to measure performance of TVM compiled models.
Execution time summary:
mean (ms) median (ms) max (ms) min (ms) std (ms)
- 119.4080 119.3196 123.8374 118.4407 0.6434
+ 120.0178 120.0069 124.4209 118.8727 0.6342
-.. GENERATED FROM PYTHON SOURCE LINES 244-269
+.. GENERATED FROM PYTHON SOURCE LINES 239-264
.. note::
@@ -473,7 +460,7 @@ Here we give an example of how to measure performance of TVM compiled models.
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 2 minutes 23.553 seconds)
+ **Total running time of the script:** ( 2 minutes 22.371 seconds)
.. _sphx_glr_download_how_to_deploy_models_deploy_prequantized_tflite.py:
diff --git a/docs/_sources/how_to/deploy_models/deploy_quantized.rst.txt b/docs/_sources/how_to/deploy_models/deploy_quantized.rst.txt
index db0843468f..c2a8c0c908 100644
--- a/docs/_sources/how_to/deploy_models/deploy_quantized.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_quantized.rst.txt
@@ -60,14 +60,14 @@ Relay, quantize the Relay model and then perform the inference.
-.. GENERATED FROM PYTHON SOURCE LINES 51-55
+.. GENERATED FROM PYTHON SOURCE LINES 46-50
Prepare the Dataset
-------------------
We will demonstrate how to prepare the calibration dataset for quantization.
We first download the validation set of ImageNet and pre-process the dataset.
-.. GENERATED FROM PYTHON SOURCE LINES 55-86
+.. GENERATED FROM PYTHON SOURCE LINES 50-81
.. code-block:: default
@@ -109,13 +109,13 @@ We first download the validation set of ImageNet and pre-process the dataset.
-.. GENERATED FROM PYTHON SOURCE LINES 87-90
+.. GENERATED FROM PYTHON SOURCE LINES 82-85
The calibration dataset should be an iterable object. We define the
calibration dataset as a generator object in Python. In this tutorial, we
only use a few samples for calibration.
-.. GENERATED FROM PYTHON SOURCE LINES 90-104
+.. GENERATED FROM PYTHON SOURCE LINES 85-99
.. code-block:: default
@@ -140,13 +140,13 @@ only use a few samples for calibration.
-.. GENERATED FROM PYTHON SOURCE LINES 105-108
+.. GENERATED FROM PYTHON SOURCE LINES 100-103
Import the model
----------------
We use the Relay MxNet frontend to import a model from the Gluon model zoo.
-.. GENERATED FROM PYTHON SOURCE LINES 108-116
+.. GENERATED FROM PYTHON SOURCE LINES 103-111
.. code-block:: default
@@ -165,7 +165,7 @@ We use the Relay MxNet frontend to import a model from the Gluon model zoo.
-.. GENERATED FROM PYTHON SOURCE LINES 117-138
+.. GENERATED FROM PYTHON SOURCE LINES 112-133
Quantize the Model
------------------
@@ -189,7 +189,7 @@ distribution of activation before and after quantization.
Alternatively, we can also use pre-defined global scales. This saves the time
for calibration. But the accuracy might be impacted.
-.. GENERATED FROM PYTHON SOURCE LINES 138-150
+.. GENERATED FROM PYTHON SOURCE LINES 133-145
.. code-block:: default
@@ -212,13 +212,13 @@ for calibration. But the accuracy might be impacted.
-.. GENERATED FROM PYTHON SOURCE LINES 151-154
+.. GENERATED FROM PYTHON SOURCE LINES 146-149
Run Inference
-------------
We create a Relay VM to build and execute the model.
-.. GENERATED FROM PYTHON SOURCE LINES 154-172
+.. GENERATED FROM PYTHON SOURCE LINES 149-167
.. code-block:: default
@@ -257,7 +257,7 @@ We create a Relay VM to build and execute the model.
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 39.454 seconds)
+ **Total running time of the script:** ( 1 minutes 31.972 seconds)
.. _sphx_glr_download_how_to_deploy_models_deploy_quantized.py:
diff --git a/docs/_sources/how_to/deploy_models/deploy_sparse.rst.txt b/docs/_sources/how_to/deploy_models/deploy_sparse.rst.txt
index 64e29efc0f..4e76d5f5ad 100644
--- a/docs/_sources/how_to/deploy_models/deploy_sparse.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_sparse.rst.txt
@@ -76,27 +76,14 @@ When generating random sparse weights for an unpruned model, we do so with struc
sparsity. A fun exercise is comparing the real speed of PruneBert with the block
sparse speed using fake weights to see the benefit of structured sparsity.
-.. GENERATED FROM PYTHON SOURCE LINES 72-74
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 80-84
+.. GENERATED FROM PYTHON SOURCE LINES 75-79
Load Required Modules
---------------------
Other than TVM, scipy, the latest transformers, and
tensorflow 2.2+ are required.
-.. GENERATED FROM PYTHON SOURCE LINES 84-113
+.. GENERATED FROM PYTHON SOURCE LINES 79-108
.. code-block:: default
@@ -136,14 +123,14 @@ tensorflow 2.2+ are required.
-.. GENERATED FROM PYTHON SOURCE LINES 114-118
+.. GENERATED FROM PYTHON SOURCE LINES 109-113
Configure Settings
------------------
Let's start by defining some parameters that define the type of model
and sparsity to run.
-.. GENERATED FROM PYTHON SOURCE LINES 118-142
+.. GENERATED FROM PYTHON SOURCE LINES 113-137
.. code-block:: default
@@ -178,7 +165,7 @@ and sparsity to run.
-.. GENERATED FROM PYTHON SOURCE LINES 143-148
+.. GENERATED FROM PYTHON SOURCE LINES 138-143
Download and Convert Transformers Model
---------------------------------------
@@ -186,7 +173,7 @@ Now we'll grab a model from the transformers module, download it,
convert it into a TensorFlow graphdef in preperation for converting that graphdef into
a relay graph that we can optimize and deploy.
-.. GENERATED FROM PYTHON SOURCE LINES 148-184
+.. GENERATED FROM PYTHON SOURCE LINES 143-179
.. code-block:: default
@@ -233,7 +220,7 @@ a relay graph that we can optimize and deploy.
-.. GENERATED FROM PYTHON SOURCE LINES 185-191
+.. GENERATED FROM PYTHON SOURCE LINES 180-186
Convert to Relay Graph
----------------------
@@ -242,7 +229,7 @@ for relay conversion. Let's import it! In the following function we
save the imported graph in relay's json format so that we dont have
to reimport from tensorflow each time this script is run.
-.. GENERATED FROM PYTHON SOURCE LINES 191-224
+.. GENERATED FROM PYTHON SOURCE LINES 186-219
.. code-block:: default
@@ -286,7 +273,7 @@ to reimport from tensorflow each time this script is run.
-.. GENERATED FROM PYTHON SOURCE LINES 225-231
+.. GENERATED FROM PYTHON SOURCE LINES 220-226
Run the Dense Graph
-------------------
@@ -295,7 +282,7 @@ the weights are sparse, we won't see any speedup because we are using
regular dense matrix multiplications on these dense (but mostly zero)
tensors instead of sparse aware kernels.
-.. GENERATED FROM PYTHON SOURCE LINES 231-251
+.. GENERATED FROM PYTHON SOURCE LINES 226-246
.. code-block:: default
@@ -326,7 +313,7 @@ tensors instead of sparse aware kernels.
-.. GENERATED FROM PYTHON SOURCE LINES 252-273
+.. GENERATED FROM PYTHON SOURCE LINES 247-268
Run the Sparse Graph
--------------------
@@ -350,7 +337,7 @@ the rest of the tensor. Once the sparse weights are in BSR format,
`relay.dense` operations with `relay.sparse_dense` calls that can be
run faster.
-.. GENERATED FROM PYTHON SOURCE LINES 273-322
+.. GENERATED FROM PYTHON SOURCE LINES 268-317
.. code-block:: default
@@ -410,7 +397,7 @@ run faster.
-.. GENERATED FROM PYTHON SOURCE LINES 323-328
+.. GENERATED FROM PYTHON SOURCE LINES 318-323
Run All the Code!
-----------------
@@ -418,7 +405,7 @@ And that's it! Now we'll simply call all the needed function to benchmark
the model according to the set parameters. Note that to run this code
you'll need to uncomment the last line first.
-.. GENERATED FROM PYTHON SOURCE LINES 328-338
+.. GENERATED FROM PYTHON SOURCE LINES 323-333
.. code-block:: default
@@ -439,14 +426,14 @@ you'll need to uncomment the last line first.
-.. GENERATED FROM PYTHON SOURCE LINES 339-343
+.. GENERATED FROM PYTHON SOURCE LINES 334-338
Sample Output
-------------
For reference, below is the output of the script when run on an AMD CPU
and shows about a 2.5X speedup from using sparsity.
-.. GENERATED FROM PYTHON SOURCE LINES 343-369
+.. GENERATED FROM PYTHON SOURCE LINES 338-364
.. code-block:: default
diff --git a/docs/_sources/how_to/deploy_models/deploy_ssd_gluoncv.rst.txt b/docs/_sources/how_to/deploy_models/deploy_ssd_gluoncv.rst.txt
index ffcbe96f12..7a17265c28 100644
--- a/docs/_sources/how_to/deploy_models/deploy_ssd_gluoncv.rst.txt
+++ b/docs/_sources/how_to/deploy_models/deploy_ssd_gluoncv.rst.txt
@@ -67,7 +67,7 @@ We will use GluonCV pre-trained SSD model and convert it to Relay IR
-.. GENERATED FROM PYTHON SOURCE LINES 43-65
+.. GENERATED FROM PYTHON SOURCE LINES 38-60
Preliminary and Set parameters
------------------------------
@@ -92,7 +92,7 @@ Preliminary and Set parameters
:code:`opencl` followed by device argument according
to your device.
-.. GENERATED FROM PYTHON SOURCE LINES 65-78
+.. GENERATED FROM PYTHON SOURCE LINES 60-73
.. code-block:: default
@@ -116,11 +116,11 @@ Preliminary and Set parameters
-.. GENERATED FROM PYTHON SOURCE LINES 79-80
+.. GENERATED FROM PYTHON SOURCE LINES 74-75
Download and pre-process demo image
-.. GENERATED FROM PYTHON SOURCE LINES 80-88
+.. GENERATED FROM PYTHON SOURCE LINES 75-83
.. code-block:: default
@@ -139,11 +139,11 @@ Download and pre-process demo image
-.. GENERATED FROM PYTHON SOURCE LINES 89-90
+.. GENERATED FROM PYTHON SOURCE LINES 84-85
Convert and compile model for CPU.
-.. GENERATED FROM PYTHON SOURCE LINES 90-101
+.. GENERATED FROM PYTHON SOURCE LINES 85-96
.. code-block:: default
@@ -170,12 +170,12 @@ Convert and compile model for CPU.
data: None
input_sym_arg_type = in_param.infer_type()[0]
Downloading /workspace/.mxnet/models/ssd_512_resnet50_v1_voc-9c8b225a.zip from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/ssd_512_resnet50_v1_voc-9c8b225a.zip...
-
0%| | 0/132723 [00:00<?, ?KB/s]
3%|3 | 4005/132723 [00:00<00:03, 40020.17KB/s]
9%|8 | 11461/132723 [00:00<00:02, 60324.08KB/s]
15%|#4 | 19545/132723 [00:00<00:01, 69681.73KB/s]
21%|## | 27711/132723 [00:00<00:01, 74407.68KB/s]
27%|##6 | 35825/132723 [00:00<00:01, 76832.48KB/s]
33%|###3 | 44021/132723 [00:00<00:01, 78564.19KB/s]
39%|###9 | 52124/132723 [00:00<00:01, 79368.22KB/s]
45%|####5 | 60302/132723 [00:00<00:00, 80125.90KB/s]
52%|#####1 | 68499/132723 [00:00<00:00, 80700.87KB/s]
58%|#####7 | 76647/132723 [00:01<00:00, 80940.02KB/s]
64%|######3 | 84769/132723 [00:01<00:00, 81021.82KB/s]
70%|######9 | 92872/132723 [00:01<00:00, 81013.94KB/s]
76%|#######6 | 100993/132723 [00:01<00:00, 81071.94KB/s]
82%|########2 | 109114/132723 [00:01<00:00, 81110.91KB/s]
88%|########8 | 117226/132723 [00:01<00:00, 80971.01KB/s]
94%|########
#4| 125324/132723 [00:01<00:00, 80928.20KB/s]
100%|##########| 132723/132723 [00:01<00:00, 78365.76KB/s]
+
0%| | 0/132723 [00:00<?, ?KB/s]
2%|2 | 2881/132723 [00:00<00:04, 28807.62KB/s]
7%|7 | 9826/132723 [00:00<00:02, 52712.86KB/s]
14%|#3 | 18077/132723 [00:00<00:01, 66314.43KB/s]
20%|#9 | 26264/132723 [00:00<00:01, 72452.89KB/s]
26%|##6 | 34528/132723 [00:00<00:01, 76122.98KB/s]
32%|###2 | 42805/132723 [00:00<00:01, 78381.52KB/s]
38%|###8 | 51000/132723 [00:00<00:01, 79544.81KB/s]
45%|####4 | 59291/132723 [00:00<00:00, 80614.61KB/s]
51%|##### | 67608/132723 [00:00<00:00, 81412.23KB/s]
57%|#####7 | 75879/132723 [00:01<00:00, 81810.41KB/s]
63%|######3 | 84179/132723 [00:01<00:00, 82173.23KB/s]
70%|######9 | 92397/132723 [00:01<00:00, 79964.43KB/s]
76%|#######5 | 100407/132723 [00:01<00:00, 77234.24KB/s]
82%|########1 | 108729/132723 [00:01<00:00, 78970.67KB/s]
88%|########8 | 117085/132723 [00:01<00:00, 80314.13KB/s]
94%|#########
4| 125362/132723 [00:01<00:00, 81036.27KB/s]
100%|##########| 132723/132723 [00:01<00:00, 77547.03KB/s]
-.. GENERATED FROM PYTHON SOURCE LINES 102-107
+.. GENERATED FROM PYTHON SOURCE LINES 97-102
Create TVM runtime and do inference
.. note::
@@ -183,7 +183,7 @@ Create TVM runtime and do inference
Use target = "cuda -libs" to enable thrust based sort, if you
enabled thrust during cmake by -DUSE_THRUST=ON.
-.. GENERATED FROM PYTHON SOURCE LINES 107-127
+.. GENERATED FROM PYTHON SOURCE LINES 102-122
.. code-block:: default
@@ -214,11 +214,11 @@ Create TVM runtime and do inference
-.. GENERATED FROM PYTHON SOURCE LINES 128-129
+.. GENERATED FROM PYTHON SOURCE LINES 123-124
Display result
-.. GENERATED FROM PYTHON SOURCE LINES 129-138
+.. GENERATED FROM PYTHON SOURCE LINES 124-133
.. code-block:: default
@@ -246,7 +246,7 @@ Display result
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 3 minutes 8.931 seconds)
+ **Total running time of the script:** ( 3 minutes 6.833 seconds)
.. _sphx_glr_download_how_to_deploy_models_deploy_ssd_gluoncv.py:
diff --git a/docs/_sources/how_to/deploy_models/sg_execution_times.rst.txt b/docs/_sources/how_to/deploy_models/sg_execution_times.rst.txt
index ebaa9bc337..0aaedcf73e 100644
--- a/docs/_sources/how_to/deploy_models/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/deploy_models/sg_execution_times.rst.txt
@@ -5,26 +5,26 @@
Computation times
=================
-**13:54.854** total execution time for **how_to_deploy_models** files:
+**13:38.587** total execution time for **how_to_deploy_models** files:
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_object_detection_pytorch.py` (``deploy_object_detection_pytorch.py``) | 03:18.907 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_object_detection_pytorch.py` (``deploy_object_detection_pytorch.py``) | 03:14.478 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_ssd_gluoncv.py` (``deploy_ssd_gluoncv.py``) | 03:08.931 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_ssd_gluoncv.py` (``deploy_ssd_gluoncv.py``) | 03:06.833 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_prequantized_tflite.py` (``deploy_prequantized_tflite.py``) | 02:23.553 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_prequantized_tflite.py` (``deploy_prequantized_tflite.py``) | 02:22.371 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_quantized.py` (``deploy_quantized.py``) | 01:39.454 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_quantized.py` (``deploy_quantized.py``) | 01:31.972 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_prequantized.py` (``deploy_prequantized.py``) | 01:06.293 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_prequantized.py` (``deploy_prequantized.py``) | 01:06.224 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_adreno.py` (``deploy_model_on_adreno.py``) | 00:51.504 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_adreno.py` (``deploy_model_on_adreno.py``) | 00:51.491 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_android.py` (``deploy_model_on_android.py``) | 00:36.080 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_android.py` (``deploy_model_on_android.py``) | 00:35.123 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_nano.py` (``deploy_model_on_nano.py``) | 00:25.242 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_rasp.py` (``deploy_model_on_rasp.py``) | 00:24.882 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_model_on_rasp.py` (``deploy_model_on_rasp.py``) | 00:24.846 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_deploy_models_deploy_sparse.py` (``deploy_sparse.py``) | 00:00.007 | 0.0 MB |
+| :ref:`sphx_glr_how_to_deploy_models_deploy_sparse.py` (``deploy_sparse.py``) | 00:00.006 | 0.0 MB |
+------------------------------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/extend_tvm/bring_your_own_datatypes.rst.txt b/docs/_sources/how_to/extend_tvm/bring_your_own_datatypes.rst.txt
index e9d92be9b5..195b68bcf6 100644
--- a/docs/_sources/how_to/extend_tvm/bring_your_own_datatypes.rst.txt
+++ b/docs/_sources/how_to/extend_tvm/bring_your_own_datatypes.rst.txt
@@ -58,27 +58,14 @@ If you would like to try this with your own datatype library, first bring the li
ctypes.CDLL('my-datatype-lib.so', ctypes.RTLD_GLOBAL)
-.. GENERATED FROM PYTHON SOURCE LINES 54-56
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 62-66
+.. GENERATED FROM PYTHON SOURCE LINES 57-61
A Simple TVM Program
--------------------
We'll begin by writing a simple program in TVM; afterwards, we will re-write it to use custom datatypes.
-.. GENERATED FROM PYTHON SOURCE LINES 66-76
+.. GENERATED FROM PYTHON SOURCE LINES 61-71
.. code-block:: default
@@ -99,11 +86,11 @@ We'll begin by writing a simple program in TVM; afterwards, we will re-write it
-.. GENERATED FROM PYTHON SOURCE LINES 77-78
+.. GENERATED FROM PYTHON SOURCE LINES 72-73
Now, we create random inputs to feed into this program using numpy:
-.. GENERATED FROM PYTHON SOURCE LINES 78-88
+.. GENERATED FROM PYTHON SOURCE LINES 73-83
.. code-block:: default
@@ -131,11 +118,11 @@ Now, we create random inputs to feed into this program using numpy:
-.. GENERATED FROM PYTHON SOURCE LINES 89-90
+.. GENERATED FROM PYTHON SOURCE LINES 84-85
Finally, we're ready to run the program:
-.. GENERATED FROM PYTHON SOURCE LINES 90-94
+.. GENERATED FROM PYTHON SOURCE LINES 85-89
.. code-block:: default
@@ -156,7 +143,7 @@ Finally, we're ready to run the program:
-.. GENERATED FROM PYTHON SOURCE LINES 95-103
+.. GENERATED FROM PYTHON SOURCE LINES 90-98
Adding Custom Datatypes
-----------------------
@@ -167,7 +154,7 @@ We use the same input variables ``x`` and ``y`` as above, but before adding ``x
Note how we specify the custom datatype: we indicate it using the special ``custom[...]`` syntax.
Additionally, note the "32" after the datatype: this is the bitwidth of the custom datatype. This tells TVM that each instance of ``myfloat`` is 32 bits wide.
-.. GENERATED FROM PYTHON SOURCE LINES 103-114
+.. GENERATED FROM PYTHON SOURCE LINES 98-109
.. code-block:: default
@@ -189,13 +176,13 @@ Additionally, note the "32" after the datatype: this is the bitwidth of the cust
-.. GENERATED FROM PYTHON SOURCE LINES 115-118
+.. GENERATED FROM PYTHON SOURCE LINES 110-113
Trying to generate this program throws an error from TVM.
TVM does not know how to handle any custom datatype out of the box!
We first have to register the custom type with TVM, giving it a name and a type code:
-.. GENERATED FROM PYTHON SOURCE LINES 118-121
+.. GENERATED FROM PYTHON SOURCE LINES 113-116
.. code-block:: default
@@ -209,13 +196,13 @@ We first have to register the custom type with TVM, giving it a name and a type
-.. GENERATED FROM PYTHON SOURCE LINES 122-125
+.. GENERATED FROM PYTHON SOURCE LINES 117-120
Note that the type code, 150, is currently chosen manually by the user.
See ``TVMTypeCode::kCustomBegin`` in `include/tvm/runtime/c_runtime_api.h <https://github.com/apache/tvm/blob/main/include/tvm/runtime/data_type.h>`_.
Now we can generate our program again:
-.. GENERATED FROM PYTHON SOURCE LINES 125-134
+.. GENERATED FROM PYTHON SOURCE LINES 120-129
.. code-block:: default
@@ -235,11 +222,11 @@ Now we can generate our program again:
-.. GENERATED FROM PYTHON SOURCE LINES 135-136
+.. GENERATED FROM PYTHON SOURCE LINES 130-131
Now we have a Relay program that uses myfloat!
-.. GENERATED FROM PYTHON SOURCE LINES 136-138
+.. GENERATED FROM PYTHON SOURCE LINES 131-133
.. code-block:: default
@@ -263,11 +250,11 @@ Now we have a Relay program that uses myfloat!
-.. GENERATED FROM PYTHON SOURCE LINES 139-140
+.. GENERATED FROM PYTHON SOURCE LINES 134-135
Now that we can express our program without errors, let's try running it!
-.. GENERATED FROM PYTHON SOURCE LINES 140-148
+.. GENERATED FROM PYTHON SOURCE LINES 135-143
.. code-block:: default
@@ -292,7 +279,7 @@ Now that we can express our program without errors, let's try running it!
-.. GENERATED FROM PYTHON SOURCE LINES 149-158
+.. GENERATED FROM PYTHON SOURCE LINES 144-153
Now, trying to compile this program throws an error.
Let's dissect this error.
@@ -304,7 +291,7 @@ We have not told TVM how to lower ``Cast`` operations for our custom datatypes;
To fix this error, we simply need to specify a lowering function:
-.. GENERATED FROM PYTHON SOURCE LINES 158-171
+.. GENERATED FROM PYTHON SOURCE LINES 153-166
.. code-block:: default
@@ -328,7 +315,7 @@ To fix this error, we simply need to specify a lowering function:
-.. GENERATED FROM PYTHON SOURCE LINES 172-183
+.. GENERATED FROM PYTHON SOURCE LINES 167-178
The ``register_op(...)`` call takes a lowering function, and a number of parameters which specify exactly the operation which should be lowered with the provided lowering function.
In this case, the arguments we pass specify that this lowering function is for lowering a ``Cast`` from ``float`` to ``myfloat`` for target ``"llvm"``.
@@ -342,7 +329,7 @@ which does just this: given a dictionary, it replaces the given operation with a
It additionally removes usages of the custom datatype by storing the custom datatype in an opaque ``uint`` of the appropriate width; in our case, a ``uint32_t``.
For more information, see `the source code <https://github.com/apache/tvm/blob/main/python/tvm/target/datatype.py>`_.
-.. GENERATED FROM PYTHON SOURCE LINES 183-193
+.. GENERATED FROM PYTHON SOURCE LINES 178-188
.. code-block:: default
@@ -369,7 +356,7 @@ For more information, see `the source code <https://github.com/apache/tvm/blob/m
-.. GENERATED FROM PYTHON SOURCE LINES 194-200
+.. GENERATED FROM PYTHON SOURCE LINES 189-195
This new error tells us that the ``Add`` lowering function is not found, which is good news, as it's no longer complaining about the ``Cast``!
We know what to do from here: we just need to register the lowering functions for the other operations in our program.
@@ -378,7 +365,7 @@ Note that for ``Add``, ``create_lower_func`` takes in a dict where the key is an
For ``Cast`` operations, we require a 2-tuple to specify the ``src_bit_length`` and the ``dest_bit_length``,
while for all other operations, the bit length is the same between the operands so we only require one integer to specify ``bit_length``.
-.. GENERATED FROM PYTHON SOURCE LINES 200-226
+.. GENERATED FROM PYTHON SOURCE LINES 195-221
.. code-block:: default
@@ -425,7 +412,7 @@ while for all other operations, the bit length is the same between the operands
-.. GENERATED FROM PYTHON SOURCE LINES 227-236
+.. GENERATED FROM PYTHON SOURCE LINES 222-231
Running Models With Custom Datatypes
------------------------------------
@@ -437,7 +424,7 @@ In this alpha state of the Bring Your Own Datatypes framework, we have not imple
First let us define two helper functions to get the mobilenet model and a cat image.
-.. GENERATED FROM PYTHON SOURCE LINES 236-263
+.. GENERATED FROM PYTHON SOURCE LINES 231-258
.. code-block:: default
@@ -476,16 +463,16 @@ First let us define two helper functions to get the mobilenet model and a cat im
.. code-block:: none
- Downloading /workspace/.mxnet/models/mobilenet0.25-9f83e440.zip3c5bc7c5-b100-4867-b3c8-6a9b79769f7e from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/mobilenet0.25-9f83e440.zip...
+ Downloading /workspace/.mxnet/models/mobilenet0.25-9f83e440.zip242db0d6-e593-4133-87dc-7201bd190935 from https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/models/mobilenet0.25-9f83e440.zip...
-.. GENERATED FROM PYTHON SOURCE LINES 264-265
+.. GENERATED FROM PYTHON SOURCE LINES 259-260
It's easy to execute MobileNet with native TVM:
-.. GENERATED FROM PYTHON SOURCE LINES 265-272
+.. GENERATED FROM PYTHON SOURCE LINES 260-267
.. code-block:: default
@@ -510,11 +497,11 @@ It's easy to execute MobileNet with native TVM:
-.. GENERATED FROM PYTHON SOURCE LINES 273-274
+.. GENERATED FROM PYTHON SOURCE LINES 268-269
Now, we would like to change the model to use myfloat internally. To do so, we need to convert the network. To do this, we first define a function which will help us convert tensors:
-.. GENERATED FROM PYTHON SOURCE LINES 274-284
+.. GENERATED FROM PYTHON SOURCE LINES 269-279
.. code-block:: default
@@ -535,11 +522,11 @@ Now, we would like to change the model to use myfloat internally. To do so, we n
-.. GENERATED FROM PYTHON SOURCE LINES 285-286
+.. GENERATED FROM PYTHON SOURCE LINES 280-281
Now, to actually convert the entire network, we have written `a pass in Relay <https://github.com/gussmith23/tvm/blob/ea174c01c54a2529e19ca71e125f5884e728da6e/python/tvm/relay/frontend/change_datatype.py#L21>`_ which simply converts all nodes within the model to use the new datatype.
-.. GENERATED FROM PYTHON SOURCE LINES 286-321
+.. GENERATED FROM PYTHON SOURCE LINES 281-316
.. code-block:: default
@@ -591,14 +578,14 @@ Now, to actually convert the entire network, we have written `a pass in Relay <h
-.. GENERATED FROM PYTHON SOURCE LINES 322-326
+.. GENERATED FROM PYTHON SOURCE LINES 317-321
When we attempt to run the model, we get a familiar error telling us that more functions need to be registered for myfloat.
Because this is a neural network, many more operations are required.
Here, we register all the needed functions:
-.. GENERATED FROM PYTHON SOURCE LINES 326-394
+.. GENERATED FROM PYTHON SOURCE LINES 321-389
.. code-block:: default
@@ -677,7 +664,7 @@ Here, we register all the needed functions:
-.. GENERATED FROM PYTHON SOURCE LINES 395-404
+.. GENERATED FROM PYTHON SOURCE LINES 390-399
Note we are making use of two new functions: ``register_min_func`` and ``create_min_lower_func``.
@@ -689,7 +676,7 @@ where the minimum representable custom datatype value is implemented using calls
Now we can finally run the model:
-.. GENERATED FROM PYTHON SOURCE LINES 404-415
+.. GENERATED FROM PYTHON SOURCE LINES 399-410
.. code-block:: default
diff --git a/docs/_sources/how_to/extend_tvm/low_level_custom_pass.rst.txt b/docs/_sources/how_to/extend_tvm/low_level_custom_pass.rst.txt
index 20fd4107e6..a18f9cf4fa 100644
--- a/docs/_sources/how_to/extend_tvm/low_level_custom_pass.rst.txt
+++ b/docs/_sources/how_to/extend_tvm/low_level_custom_pass.rst.txt
@@ -62,13 +62,13 @@ Before reading this tutorial, we assume readers have already known these topics
-.. GENERATED FROM PYTHON SOURCE LINES 54-57
+.. GENERATED FROM PYTHON SOURCE LINES 49-52
We first write a very simple vector add and build it with the default schedule. Then, we use
our customized lowering pass to manipulate the IR directly instead of using schedule primitives.
-.. GENERATED FROM PYTHON SOURCE LINES 57-67
+.. GENERATED FROM PYTHON SOURCE LINES 52-62
.. code-block:: default
@@ -106,7 +106,7 @@ our customized lowering pass to manipulate the IR directly instead of using sche
-.. GENERATED FROM PYTHON SOURCE LINES 68-73
+.. GENERATED FROM PYTHON SOURCE LINES 63-68
Writing a Pass
--------------
@@ -114,7 +114,7 @@ Essentially, an "IR transformation pass" is a function which maps a statement to
Thus, we define this vectorize function and implement it step by step.
-.. GENERATED FROM PYTHON SOURCE LINES 75-90
+.. GENERATED FROM PYTHON SOURCE LINES 70-85
TVM already provides two class for users to both analyze and transform IR.
@@ -132,7 +132,7 @@ return value of ``func`` will be ignored.
refreshed every recursion but the array values will be preserved.
-.. GENERATED FROM PYTHON SOURCE LINES 90-102
+.. GENERATED FROM PYTHON SOURCE LINES 85-97
.. code-block:: default
@@ -155,7 +155,7 @@ return value of ``func`` will be ignored.
-.. GENERATED FROM PYTHON SOURCE LINES 103-116
+.. GENERATED FROM PYTHON SOURCE LINES 98-111
IR Transformation
~~~~~~~~~~~~~~~~~
@@ -171,7 +171,7 @@ this value.
function will be skipped.
-.. GENERATED FROM PYTHON SOURCE LINES 116-145
+.. GENERATED FROM PYTHON SOURCE LINES 111-140
.. code-block:: default
@@ -211,7 +211,7 @@ this value.
-.. GENERATED FROM PYTHON SOURCE LINES 146-165
+.. GENERATED FROM PYTHON SOURCE LINES 141-160
Glue to Lowering
----------------
@@ -233,7 +233,7 @@ called after each phase is done.
Thus, a good place to put this transformation pass is just after Phase 1.
-.. GENERATED FROM PYTHON SOURCE LINES 165-169
+.. GENERATED FROM PYTHON SOURCE LINES 160-164
.. code-block:: default
@@ -266,7 +266,7 @@ Thus, a good place to put this transformation pass is just after Phase 1.
-.. GENERATED FROM PYTHON SOURCE LINES 170-178
+.. GENERATED FROM PYTHON SOURCE LINES 165-173
Quick View
----------
diff --git a/docs/_sources/how_to/extend_tvm/sg_execution_times.rst.txt b/docs/_sources/how_to/extend_tvm/sg_execution_times.rst.txt
index b3bdf3d59d..7ddc2f34dc 100644
--- a/docs/_sources/how_to/extend_tvm/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/extend_tvm/sg_execution_times.rst.txt
@@ -5,14 +5,14 @@
Computation times
=================
-**00:47.914** total execution time for **how_to_extend_tvm** files:
+**00:47.521** total execution time for **how_to_extend_tvm** files:
+-------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_extend_tvm_bring_your_own_datatypes.py` (``bring_your_own_datatypes.py``) | 00:44.465 | 0.0 MB |
+| :ref:`sphx_glr_how_to_extend_tvm_bring_your_own_datatypes.py` (``bring_your_own_datatypes.py``) | 00:43.975 | 0.0 MB |
+-------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_extend_tvm_use_pass_instrument.py` (``use_pass_instrument.py``) | 00:02.405 | 0.0 MB |
+| :ref:`sphx_glr_how_to_extend_tvm_use_pass_instrument.py` (``use_pass_instrument.py``) | 00:02.480 | 0.0 MB |
+-------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_extend_tvm_use_pass_infra.py` (``use_pass_infra.py``) | 00:01.036 | 0.0 MB |
+| :ref:`sphx_glr_how_to_extend_tvm_use_pass_infra.py` (``use_pass_infra.py``) | 00:01.059 | 0.0 MB |
+-------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_extend_tvm_low_level_custom_pass.py` (``low_level_custom_pass.py``) | 00:00.008 | 0.0 MB |
+| :ref:`sphx_glr_how_to_extend_tvm_low_level_custom_pass.py` (``low_level_custom_pass.py``) | 00:00.007 | 0.0 MB |
+-------------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/extend_tvm/use_pass_infra.rst.txt b/docs/_sources/how_to/extend_tvm/use_pass_infra.rst.txt
index bceb89a263..92db838106 100644
--- a/docs/_sources/how_to/extend_tvm/use_pass_infra.rst.txt
+++ b/docs/_sources/how_to/extend_tvm/use_pass_infra.rst.txt
@@ -63,7 +63,7 @@ The same approach can be used for tir as well.
-.. GENERATED FROM PYTHON SOURCE LINES 55-60
+.. GENERATED FROM PYTHON SOURCE LINES 50-55
Create An Example Relay Program
-------------------------------
@@ -71,7 +71,7 @@ First of all, we create a simple Relay program for the tutorial. This program
will be used by various optimizations of the examples in this tutorial.
Similarly, users can write a tir primitive function and apply the tir passes.
-.. GENERATED FROM PYTHON SOURCE LINES 60-78
+.. GENERATED FROM PYTHON SOURCE LINES 55-73
.. code-block:: default
@@ -100,7 +100,7 @@ Similarly, users can write a tir primitive function and apply the tir passes.
-.. GENERATED FROM PYTHON SOURCE LINES 79-89
+.. GENERATED FROM PYTHON SOURCE LINES 74-84
Optimize the Program
--------------------
@@ -113,7 +113,7 @@ examples for each of them.
Manually Apply Optimization Passes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.. GENERATED FROM PYTHON SOURCE LINES 89-106
+.. GENERATED FROM PYTHON SOURCE LINES 84-101
.. code-block:: default
@@ -155,12 +155,12 @@ Manually Apply Optimization Passes
-.. GENERATED FROM PYTHON SOURCE LINES 107-109
+.. GENERATED FROM PYTHON SOURCE LINES 102-104
More optimizations can be applied in the similar manner. For instance, we can
eliminate the common expressions that used by `z` and `z1`.
-.. GENERATED FROM PYTHON SOURCE LINES 109-112
+.. GENERATED FROM PYTHON SOURCE LINES 104-107
.. code-block:: default
@@ -187,13 +187,13 @@ eliminate the common expressions that used by `z` and `z1`.
-.. GENERATED FROM PYTHON SOURCE LINES 113-116
+.. GENERATED FROM PYTHON SOURCE LINES 108-111
Some optimizations, such as fusion, are parametric as well. For example,
opt level 0 will not allow operators to be fused together. Users can pass the
`fuse_opt_level` to enable this.
-.. GENERATED FROM PYTHON SOURCE LINES 116-122
+.. GENERATED FROM PYTHON SOURCE LINES 111-117
.. code-block:: default
@@ -235,7 +235,7 @@ opt level 0 will not allow operators to be fused together. Users can pass the
-.. GENERATED FROM PYTHON SOURCE LINES 123-142
+.. GENERATED FROM PYTHON SOURCE LINES 118-137
Use Sequential to Apply a Sequence of Passes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -257,7 +257,7 @@ For example, `torch.nn.sequential` is used to contain a sequence of PyTorch
layers. Instead, the :py:class:`tvm.transform.Sequential` in our pass infra works on the optimizing
pass.
-.. GENERATED FROM PYTHON SOURCE LINES 142-157
+.. GENERATED FROM PYTHON SOURCE LINES 137-152
.. code-block:: default
@@ -300,7 +300,7 @@ pass.
-.. GENERATED FROM PYTHON SOURCE LINES 158-165
+.. GENERATED FROM PYTHON SOURCE LINES 153-160
From the transformed Relay program, we can see that there are still two
identical addition operations. This is because ``EliminateCommonSubexpr``
@@ -310,7 +310,7 @@ optimization level less or equal to 2 will be executed by default under
however, provides a configuration interface
for users to customize the optimization level that they want to execute.
-.. GENERATED FROM PYTHON SOURCE LINES 165-170
+.. GENERATED FROM PYTHON SOURCE LINES 160-165
.. code-block:: default
@@ -342,7 +342,7 @@ for users to customize the optimization level that they want to execute.
-.. GENERATED FROM PYTHON SOURCE LINES 171-178
+.. GENERATED FROM PYTHON SOURCE LINES 166-173
Now we can see that only one of the two identical additions is kept.
@@ -352,7 +352,7 @@ general purpose compilers, such as Clang and GCC. For example, we can disable
EliminateCommonSubexpr as following. The printed module will again show two
identical addition operations.
-.. GENERATED FROM PYTHON SOURCE LINES 178-183
+.. GENERATED FROM PYTHON SOURCE LINES 173-178
.. code-block:: default
@@ -385,7 +385,7 @@ identical addition operations.
-.. GENERATED FROM PYTHON SOURCE LINES 184-194
+.. GENERATED FROM PYTHON SOURCE LINES 179-189
Implement a Pass Using Python Decorator
------------------------------------------
@@ -398,7 +398,7 @@ with a multiple of `c`. Later on, each function in a given module will be
visited and each constant in the function will be replaced when we invoke the
customized pass.
-.. GENERATED FROM PYTHON SOURCE LINES 194-221
+.. GENERATED FROM PYTHON SOURCE LINES 189-216
.. code-block:: default
@@ -454,7 +454,7 @@ customized pass.
-.. GENERATED FROM PYTHON SOURCE LINES 222-228
+.. GENERATED FROM PYTHON SOURCE LINES 217-223
Debug a Pass
------------
@@ -463,7 +463,7 @@ after a certain pass is done through a special pass (``PrintIR``) to dump the IR
whole module. A slightly modified version of the sequential pass example
could be like the following to enable IR dumping for ``FoldConstant`` optimization.
-.. GENERATED FROM PYTHON SOURCE LINES 228-240
+.. GENERATED FROM PYTHON SOURCE LINES 223-235
.. code-block:: default
@@ -486,7 +486,7 @@ could be like the following to enable IR dumping for ``FoldConstant`` optimizati
-.. GENERATED FROM PYTHON SOURCE LINES 241-252
+.. GENERATED FROM PYTHON SOURCE LINES 236-247
By inserting the ``PrintIR`` pass after ``FoldConstant``, the pass infra will
dump out the module IR when ``FoldConstant`` is done. Users can plug in this
@@ -500,7 +500,7 @@ for more details.
Here we use :py::func`tvm.instrument.pass_instrument` decorator to implement
a PassInsturment class printing IR before execution of each passes:
-.. GENERATED FROM PYTHON SOURCE LINES 252-271
+.. GENERATED FROM PYTHON SOURCE LINES 247-266
.. code-block:: default
@@ -662,7 +662,7 @@ a PassInsturment class printing IR before execution of each passes:
-.. GENERATED FROM PYTHON SOURCE LINES 272-280
+.. GENERATED FROM PYTHON SOURCE LINES 267-275
Summary
-------
diff --git a/docs/_sources/how_to/extend_tvm/use_pass_instrument.rst.txt b/docs/_sources/how_to/extend_tvm/use_pass_instrument.rst.txt
index 2aab4bc64e..3e8208bee3 100644
--- a/docs/_sources/how_to/extend_tvm/use_pass_instrument.rst.txt
+++ b/docs/_sources/how_to/extend_tvm/use_pass_instrument.rst.txt
@@ -62,13 +62,13 @@ passes. Please also refer to the :ref:`pass-infra`.
-.. GENERATED FROM PYTHON SOURCE LINES 54-57
+.. GENERATED FROM PYTHON SOURCE LINES 49-52
Create An Example Relay Program
-------------------------------
We use pre-defined resnet-18 network in Relay.
-.. GENERATED FROM PYTHON SOURCE LINES 57-66
+.. GENERATED FROM PYTHON SOURCE LINES 52-61
.. code-block:: default
@@ -189,7 +189,7 @@ We use pre-defined resnet-18 network in Relay.
-.. GENERATED FROM PYTHON SOURCE LINES 67-72
+.. GENERATED FROM PYTHON SOURCE LINES 62-67
Create PassContext With Instruments
-----------------------------------
@@ -197,7 +197,7 @@ To run all passes with an instrument, pass it via the ``instruments`` argument t
the ``PassContext`` constructor. A built-in ``PassTimingInstrument`` is used to
profile the execution time of each passes.
-.. GENERATED FROM PYTHON SOURCE LINES 72-82
+.. GENERATED FROM PYTHON SOURCE LINES 67-77
.. code-block:: default
@@ -220,16 +220,16 @@ profile the execution time of each passes.
.. code-block:: none
Printing results of timing profile...
- InferType: 7255us [7255us] (46.32%; 46.32%)
- FoldScaleAxis: 8408us [6us] (53.68%; 53.68%)
- FoldConstant: 8402us [1699us] (53.64%; 99.92%)
- InferType: 6703us [6703us] (42.79%; 79.78%)
+ InferType: 7496us [7496us] (47.19%; 47.19%)
+ FoldScaleAxis: 8388us [8us] (52.81%; 52.81%)
+ FoldConstant: 8380us [1697us] (52.76%; 99.90%)
+ InferType: 6683us [6683us] (42.07%; 79.75%)
-.. GENERATED FROM PYTHON SOURCE LINES 83-91
+.. GENERATED FROM PYTHON SOURCE LINES 78-86
Use Current PassContext With Instruments
----------------------------------------
@@ -240,7 +240,7 @@ if any instrument already exists. Then it switches to new instruments
and calls ``enter_pass_ctx`` method of new instruments.
Refer to following sections and :py:func:`tvm.instrument.pass_instrument` for these methods.
-.. GENERATED FROM PYTHON SOURCE LINES 91-100
+.. GENERATED FROM PYTHON SOURCE LINES 86-95
.. code-block:: default
@@ -262,23 +262,23 @@ Refer to following sections and :py:func:`tvm.instrument.pass_instrument` for th
.. code-block:: none
Printing results of timing profile...
- InferType: 6703us [6703us] (44.94%; 44.94%)
- FoldScaleAxis: 8212us [5us] (55.06%; 55.06%)
- FoldConstant: 8206us [1665us] (55.02%; 99.94%)
- InferType: 6541us [6541us] (43.86%; 79.71%)
+ InferType: 6755us [6755us] (45.08%; 45.08%)
+ FoldScaleAxis: 8231us [5us] (54.92%; 54.92%)
+ FoldConstant: 8226us [1677us] (54.89%; 99.94%)
+ InferType: 6549us [6549us] (43.70%; 79.61%)
-.. GENERATED FROM PYTHON SOURCE LINES 101-105
+.. GENERATED FROM PYTHON SOURCE LINES 96-100
Register empty list to clear existing instruments.
Note that ``exit_pass_ctx`` of ``PassTimingInstrument`` is called.
Profiles are cleared so nothing is printed.
-.. GENERATED FROM PYTHON SOURCE LINES 105-111
+.. GENERATED FROM PYTHON SOURCE LINES 100-106
.. code-block:: default
@@ -295,7 +295,7 @@ Profiles are cleared so nothing is printed.
-.. GENERATED FROM PYTHON SOURCE LINES 112-120
+.. GENERATED FROM PYTHON SOURCE LINES 107-115
Create Customized Instrument Class
----------------------------------
@@ -306,7 +306,7 @@ Let's create an instrument class which calculates the change in number of
occurrences of each operator caused by each pass. We can look at ``op.name`` to
find the name of each operator. And we do this before and after passes to calculate the difference.
-.. GENERATED FROM PYTHON SOURCE LINES 120-196
+.. GENERATED FROM PYTHON SOURCE LINES 115-191
.. code-block:: default
@@ -393,7 +393,7 @@ find the name of each operator. And we do this before and after passes to calcul
-.. GENERATED FROM PYTHON SOURCE LINES 197-205
+.. GENERATED FROM PYTHON SOURCE LINES 192-200
Apply Passes and Multiple Instrument Classes
--------------------------------------------
@@ -404,7 +404,7 @@ So for instrument classes like ``PassTimingInstrument``, it is inevitable to
count-up the execution time of other instrument classes to the final
profile result.
-.. GENERATED FROM PYTHON SOURCE LINES 205-226
+.. GENERATED FROM PYTHON SOURCE LINES 200-221
.. code-block:: default
@@ -436,11 +436,11 @@ profile result.
-.. GENERATED FROM PYTHON SOURCE LINES 227-228
+.. GENERATED FROM PYTHON SOURCE LINES 222-223
We can see how many CallNode increase/decrease per op type.
-.. GENERATED FROM PYTHON SOURCE LINES 228-234
+.. GENERATED FROM PYTHON SOURCE LINES 223-229
.. code-block:: default
@@ -467,7 +467,7 @@ We can see how many CallNode increase/decrease per op type.
-.. GENERATED FROM PYTHON SOURCE LINES 235-240
+.. GENERATED FROM PYTHON SOURCE LINES 230-235
Exception Handling
------------------
@@ -475,7 +475,7 @@ Let's see what happens if an exception occurs in a method of a ``PassInstrument`
Define ``PassInstrument`` classes which raise exceptions in enter/exit ``PassContext``:
-.. GENERATED FROM PYTHON SOURCE LINES 240-280
+.. GENERATED FROM PYTHON SOURCE LINES 235-275
.. code-block:: default
@@ -526,7 +526,7 @@ Define ``PassInstrument`` classes which raise exceptions in enter/exit ``PassCon
-.. GENERATED FROM PYTHON SOURCE LINES 281-286
+.. GENERATED FROM PYTHON SOURCE LINES 276-281
If an exception occurs in ``enter_pass_ctx``, ``PassContext`` will disable the pass
instrumentation. And it will run the ``exit_pass_ctx`` of each ``PassInstrument``
@@ -534,7 +534,7 @@ which successfully finished ``enter_pass_ctx``.
In following example, we can see ``exit_pass_ctx`` of `PassFine_0` is executed after exception.
-.. GENERATED FROM PYTHON SOURCE LINES 286-299
+.. GENERATED FROM PYTHON SOURCE LINES 281-294
.. code-block:: default
@@ -567,12 +567,12 @@ In following example, we can see ``exit_pass_ctx`` of `PassFine_0` is executed a
-.. GENERATED FROM PYTHON SOURCE LINES 300-302
+.. GENERATED FROM PYTHON SOURCE LINES 295-297
Exceptions in ``PassInstrument`` instances cause all instruments of the current ``PassContext``
to be cleared, so nothing is printed when ``override_instruments`` is called.
-.. GENERATED FROM PYTHON SOURCE LINES 302-304
+.. GENERATED FROM PYTHON SOURCE LINES 297-299
.. code-block:: default
@@ -585,13 +585,13 @@ to be cleared, so nothing is printed when ``override_instruments`` is called.
-.. GENERATED FROM PYTHON SOURCE LINES 305-308
+.. GENERATED FROM PYTHON SOURCE LINES 300-303
If an exception occurs in ``exit_pass_ctx``, then the pass instrument is disabled.
Then exception is propagated. That means ``PassInstrument`` instances registered
after the one throwing the exception do not execute ``exit_pass_ctx``.
-.. GENERATED FROM PYTHON SOURCE LINES 308-322
+.. GENERATED FROM PYTHON SOURCE LINES 303-317
.. code-block:: default
@@ -636,7 +636,7 @@ after the one throwing the exception do not execute ``exit_pass_ctx``.
-.. GENERATED FROM PYTHON SOURCE LINES 323-328
+.. GENERATED FROM PYTHON SOURCE LINES 318-323
Exceptions occurred in ``should_run``, ``run_before_pass``, ``run_after_pass``
are not handled explicitly -- we rely on the context manager (the ``with`` syntax)
@@ -644,7 +644,7 @@ to exit ``PassContext`` safely.
We use ``run_before_pass`` as an example:
-.. GENERATED FROM PYTHON SOURCE LINES 328-349
+.. GENERATED FROM PYTHON SOURCE LINES 323-344
.. code-block:: default
@@ -693,13 +693,13 @@ We use ``run_before_pass`` as an example:
-.. GENERATED FROM PYTHON SOURCE LINES 350-353
+.. GENERATED FROM PYTHON SOURCE LINES 345-348
Also note that pass instrumentation is not disable. So if we call
``override_instruments``, the ``exit_pass_ctx`` of old registered ``PassInstrument``
is called.
-.. GENERATED FROM PYTHON SOURCE LINES 353-355
+.. GENERATED FROM PYTHON SOURCE LINES 348-350
.. code-block:: default
@@ -720,12 +720,12 @@ is called.
-.. GENERATED FROM PYTHON SOURCE LINES 356-358
+.. GENERATED FROM PYTHON SOURCE LINES 351-353
If we don't wrap pass execution with ``with`` syntax, ``exit_pass_ctx`` is not
called. Let try this with current ``PassContext``:
-.. GENERATED FROM PYTHON SOURCE LINES 358-367
+.. GENERATED FROM PYTHON SOURCE LINES 353-362
.. code-block:: default
@@ -753,12 +753,12 @@ called. Let try this with current ``PassContext``:
-.. GENERATED FROM PYTHON SOURCE LINES 368-370
+.. GENERATED FROM PYTHON SOURCE LINES 363-365
Then call passes. ``exit_pass_ctx`` is not executed after the exception,
as expectation.
-.. GENERATED FROM PYTHON SOURCE LINES 370-376
+.. GENERATED FROM PYTHON SOURCE LINES 365-371
.. code-block:: default
@@ -786,11 +786,11 @@ as expectation.
-.. GENERATED FROM PYTHON SOURCE LINES 377-378
+.. GENERATED FROM PYTHON SOURCE LINES 372-373
Clear instruments.
-.. GENERATED FROM PYTHON SOURCE LINES 378-379
+.. GENERATED FROM PYTHON SOURCE LINES 373-374
.. code-block:: default
diff --git a/docs/_sources/how_to/optimize_operators/opt_conv_cuda.rst.txt b/docs/_sources/how_to/optimize_operators/opt_conv_cuda.rst.txt
index c67e021c8d..4d5a9e2583 100644
--- a/docs/_sources/how_to/optimize_operators/opt_conv_cuda.rst.txt
+++ b/docs/_sources/how_to/optimize_operators/opt_conv_cuda.rst.txt
@@ -35,20 +35,7 @@ example, we use a different layout to store the data in order to achieve better
data locality. The buffer layout is HWCN, which stands for height, width,
channel, batch.
-.. GENERATED FROM PYTHON SOURCE LINES 32-34
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 41-49
+.. GENERATED FROM PYTHON SOURCE LINES 34-42
Preparation and Algorithm
-------------------------
@@ -59,7 +46,7 @@ of size 3 x 3. We use stride size 1 and padding size 1 for the
convolution. The following code defines the convolution algorithm in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 49-91
+.. GENERATED FROM PYTHON SOURCE LINES 42-84
.. code-block:: default
@@ -112,7 +99,7 @@ convolution. The following code defines the convolution algorithm in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 92-113
+.. GENERATED FROM PYTHON SOURCE LINES 88-109
Memory Hierarchy
----------------
@@ -136,7 +123,7 @@ WL. BL is a local cache of output B, which is also stored in the thread local
registers.
-.. GENERATED FROM PYTHON SOURCE LINES 113-123
+.. GENERATED FROM PYTHON SOURCE LINES 109-119
.. code-block:: default
@@ -157,7 +144,7 @@ registers.
-.. GENERATED FROM PYTHON SOURCE LINES 124-140
+.. GENERATED FROM PYTHON SOURCE LINES 120-136
Blocking
--------
@@ -176,7 +163,7 @@ shared memory.
:width: 317px
-.. GENERATED FROM PYTHON SOURCE LINES 140-168
+.. GENERATED FROM PYTHON SOURCE LINES 136-164
.. code-block:: default
@@ -215,7 +202,7 @@ shared memory.
-.. GENERATED FROM PYTHON SOURCE LINES 169-182
+.. GENERATED FROM PYTHON SOURCE LINES 165-178
Virtual Thread Split
--------------------
@@ -231,7 +218,7 @@ each thread computes 4 strided grids, where size of each grid is 4 x 4.
:width: 268px
-.. GENERATED FROM PYTHON SOURCE LINES 182-194
+.. GENERATED FROM PYTHON SOURCE LINES 178-190
.. code-block:: default
@@ -254,7 +241,7 @@ each thread computes 4 strided grids, where size of each grid is 4 x 4.
-.. GENERATED FROM PYTHON SOURCE LINES 195-203
+.. GENERATED FROM PYTHON SOURCE LINES 191-199
Cooperative Fetching
--------------------
@@ -265,7 +252,7 @@ transfer per thread, the following code lets threads in the same thread block
coopertively fetch dependent data from global memory.
-.. GENERATED FROM PYTHON SOURCE LINES 203-239
+.. GENERATED FROM PYTHON SOURCE LINES 199-235
.. code-block:: default
@@ -312,7 +299,7 @@ coopertively fetch dependent data from global memory.
-.. GENERATED FROM PYTHON SOURCE LINES 240-246
+.. GENERATED FROM PYTHON SOURCE LINES 236-242
Generate CUDA Kernel
--------------------
@@ -321,7 +308,7 @@ Finally we use TVM to generate and compile the CUDA kernel, and evaluate the
latency of convolution.
-.. GENERATED FROM PYTHON SOURCE LINES 246-257
+.. GENERATED FROM PYTHON SOURCE LINES 242-253
.. code-block:: default
@@ -344,7 +331,7 @@ latency of convolution.
.. code-block:: none
- Convolution: 54.198528 ms
+ Convolution: 45.772991 ms
diff --git a/docs/_sources/how_to/optimize_operators/opt_conv_tensorcore.rst.txt b/docs/_sources/how_to/optimize_operators/opt_conv_tensorcore.rst.txt
index 62b6d545d0..c94734b2c1 100644
--- a/docs/_sources/how_to/optimize_operators/opt_conv_tensorcore.rst.txt
+++ b/docs/_sources/how_to/optimize_operators/opt_conv_tensorcore.rst.txt
@@ -58,12 +58,11 @@ The batch size is 256. Convolution filters contain 512 filters of size 3 x 3.
We use stride size 1 and padding size 1 for the convolution. In the example, we use
NHWCnc memory layout.The following code defines the convolution algorithm in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 53-146
+.. GENERATED FROM PYTHON SOURCE LINES 53-145
.. code-block:: default
-
import tvm
from tvm import te
import numpy as np
@@ -162,7 +161,7 @@ NHWCnc memory layout.The following code defines the convolution algorithm in TVM
-.. GENERATED FROM PYTHON SOURCE LINES 153-159
+.. GENERATED FROM PYTHON SOURCE LINES 149-155
Memory Scope
------------
@@ -171,7 +170,7 @@ To support TensorCores, we add another three special memory scope: :code:`wmma.m
:code:`wmma.matrix_b` and :code:`wmma.accumulator`. On hardware, all fragments scope
stores at the on-chip registers level, the same place with local memory.
-.. GENERATED FROM PYTHON SOURCE LINES 159-167
+.. GENERATED FROM PYTHON SOURCE LINES 155-163
.. code-block:: default
@@ -190,7 +189,7 @@ stores at the on-chip registers level, the same place with local memory.
-.. GENERATED FROM PYTHON SOURCE LINES 168-177
+.. GENERATED FROM PYTHON SOURCE LINES 164-173
Define Tensor Intrinsic
-----------------------
@@ -202,7 +201,7 @@ There are four basic operation in TensorCore: :code:`fill_fragment`, :code:`load
:code:`mma_sync` and :code:`store_matrix`. Since :code:`fill_fragment` and :code:`mma_sync`
are both used in matrix multiplication, so we can just write following three intrinsics.
-.. GENERATED FROM PYTHON SOURCE LINES 177-298
+.. GENERATED FROM PYTHON SOURCE LINES 173-294
.. code-block:: default
@@ -334,7 +333,7 @@ are both used in matrix multiplication, so we can just write following three int
-.. GENERATED FROM PYTHON SOURCE LINES 299-320
+.. GENERATED FROM PYTHON SOURCE LINES 295-316
Scheduling the Computation
--------------------------
@@ -358,7 +357,7 @@ one time.
TensorCore intrinsics directly or indirectly. Also note that it is not the unique solution.
The only thing we should do is to make sure all threads in a warp can call TensorCore at the same time.
-.. GENERATED FROM PYTHON SOURCE LINES 320-383
+.. GENERATED FROM PYTHON SOURCE LINES 316-379
.. code-block:: default
@@ -532,14 +531,14 @@ one time.
-.. GENERATED FROM PYTHON SOURCE LINES 384-388
+.. GENERATED FROM PYTHON SOURCE LINES 380-384
Lowering Computation to Intrinsics
----------------------------------
The last phase is to lower the computation loops down to TensorCore hardware intrinsics
by mapping the 2D convolution to tensor intrinsics
-.. GENERATED FROM PYTHON SOURCE LINES 388-395
+.. GENERATED FROM PYTHON SOURCE LINES 384-391
.. code-block:: default
@@ -628,7 +627,7 @@ by mapping the 2D convolution to tensor intrinsics
-.. GENERATED FROM PYTHON SOURCE LINES 396-401
+.. GENERATED FROM PYTHON SOURCE LINES 392-397
Generate CUDA Kernel
--------------------
@@ -636,7 +635,7 @@ Finally we use TVM to generate and compile the CUDA kernel, and evaluate the lat
Since TensorCores are only supported in NVIDIA GPU with Compute Capability 7.0 or higher, it may not
be able to run on our build server
-.. GENERATED FROM PYTHON SOURCE LINES 401-414
+.. GENERATED FROM PYTHON SOURCE LINES 397-410
.. code-block:: default
@@ -661,12 +660,12 @@ be able to run on our build server
.. code-block:: none
- conv2d with tensor core: 13.356647 ms
+ conv2d with tensor core: 7.971837 ms
-.. GENERATED FROM PYTHON SOURCE LINES 415-419
+.. GENERATED FROM PYTHON SOURCE LINES 411-415
Summary
-------
diff --git a/docs/_sources/how_to/optimize_operators/opt_gemm.rst.txt b/docs/_sources/how_to/optimize_operators/opt_gemm.rst.txt
index c324a2f408..cb0697793a 100644
--- a/docs/_sources/how_to/optimize_operators/opt_gemm.rst.txt
+++ b/docs/_sources/how_to/optimize_operators/opt_gemm.rst.txt
@@ -53,20 +53,7 @@ abstraction automatically, but some of them cannot be simply applied due to TVM
All the experiment results mentioned below, are executed on 2015's 15' MacBook equipped with
Intel i7-4770HQ CPU. The cache line size should be 64 bytes for all the x86 CPUs.
-.. GENERATED FROM PYTHON SOURCE LINES 50-52
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 58-63
+.. GENERATED FROM PYTHON SOURCE LINES 53-58
Preparation and Baseline
------------------------
@@ -74,7 +61,7 @@ In this tutorial, we will demo how to use TVM to optimize matrix multiplication.
Before actually demonstrating, we first define these variables.
Then we write a baseline implementation, the simplest way to write a matrix multiplication in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 63-124
+.. GENERATED FROM PYTHON SOURCE LINES 58-119
.. code-block:: default
@@ -147,18 +134,18 @@ Then we write a baseline implementation, the simplest way to write a matrix mult
.. code-block:: none
- Numpy running time: 0.018993
- Baseline: 3.421387
+ Numpy running time: 0.018301
+ Baseline: 3.438381
-.. GENERATED FROM PYTHON SOURCE LINES 125-127
+.. GENERATED FROM PYTHON SOURCE LINES 120-122
In TVM, we can always inspect lower level IR to debug or optimize our schedule.
Here is the generated IR using our baseline schedule.
-.. GENERATED FROM PYTHON SOURCE LINES 127-130
+.. GENERATED FROM PYTHON SOURCE LINES 122-125
.. code-block:: default
@@ -196,7 +183,7 @@ Here is the generated IR using our baseline schedule.
-.. GENERATED FROM PYTHON SOURCE LINES 131-137
+.. GENERATED FROM PYTHON SOURCE LINES 126-132
Blocking
--------
@@ -205,7 +192,7 @@ block by block. The memory access inside the block is a small neighbourhood whic
memory locality. In this tutorial, I picked up 32 as the blocking factor. So the block will
fill 32 * 32 * sizeof(float) which is 4KB in the cache whose total size is 32KB (L1 data cache)
-.. GENERATED FROM PYTHON SOURCE LINES 137-162
+.. GENERATED FROM PYTHON SOURCE LINES 132-157
.. code-block:: default
@@ -242,16 +229,16 @@ fill 32 * 32 * sizeof(float) which is 4KB in the cache whose total size is 32KB
.. code-block:: none
- Opt1: 0.293226
+ Opt1: 0.295741
-.. GENERATED FROM PYTHON SOURCE LINES 163-164
+.. GENERATED FROM PYTHON SOURCE LINES 158-159
Here is the generated IR after blocking.
-.. GENERATED FROM PYTHON SOURCE LINES 164-167
+.. GENERATED FROM PYTHON SOURCE LINES 159-162
.. code-block:: default
@@ -300,7 +287,7 @@ Here is the generated IR after blocking.
-.. GENERATED FROM PYTHON SOURCE LINES 168-176
+.. GENERATED FROM PYTHON SOURCE LINES 163-171
Vectorization
-------------
@@ -311,7 +298,7 @@ vastly.
In this tutorial, we chose to vectorize the inner loop row data since it is cache friendly.
-.. GENERATED FROM PYTHON SOURCE LINES 176-197
+.. GENERATED FROM PYTHON SOURCE LINES 171-192
.. code-block:: default
@@ -344,16 +331,16 @@ In this tutorial, we chose to vectorize the inner loop row data since it is cach
.. code-block:: none
- Opt2: 0.334759
+ Opt2: 0.324069
-.. GENERATED FROM PYTHON SOURCE LINES 198-199
+.. GENERATED FROM PYTHON SOURCE LINES 193-194
Here is the generated IR after vectorization.
-.. GENERATED FROM PYTHON SOURCE LINES 199-202
+.. GENERATED FROM PYTHON SOURCE LINES 194-197
.. code-block:: default
@@ -398,7 +385,7 @@ Here is the generated IR after vectorization.
-.. GENERATED FROM PYTHON SOURCE LINES 203-209
+.. GENERATED FROM PYTHON SOURCE LINES 198-204
Loop Permutation
----------------
@@ -407,7 +394,7 @@ Next we will look at the access pattern of A. In current schedule, A is accessed
which is not cache friendly. If we change the nested loop order of ki and inner axes mi,
the access pattern for A matrix is more cache friendly.
-.. GENERATED FROM PYTHON SOURCE LINES 209-229
+.. GENERATED FROM PYTHON SOURCE LINES 204-224
.. code-block:: default
@@ -439,16 +426,16 @@ the access pattern for A matrix is more cache friendly.
.. code-block:: none
- Opt3: 0.117820
+ Opt3: 0.115874
-.. GENERATED FROM PYTHON SOURCE LINES 230-231
+.. GENERATED FROM PYTHON SOURCE LINES 225-226
Here is the generated IR after loop permutation.
-.. GENERATED FROM PYTHON SOURCE LINES 231-234
+.. GENERATED FROM PYTHON SOURCE LINES 226-229
.. code-block:: default
@@ -493,7 +480,7 @@ Here is the generated IR after loop permutation.
-.. GENERATED FROM PYTHON SOURCE LINES 235-245
+.. GENERATED FROM PYTHON SOURCE LINES 230-240
Array Packing
-------------
@@ -506,7 +493,7 @@ dimensional memory.
NOTE: This figure is a general illustration of how array packing works.
-.. GENERATED FROM PYTHON SOURCE LINES 248-255
+.. GENERATED FROM PYTHON SOURCE LINES 243-250
We can use array packing to address the access pattern for B. Observe the array access pattern of
B after flattening which is not sequential as we iterate over the K dimension. We can reorder B
@@ -516,7 +503,7 @@ bigN (N/bn) and littleN (bn) --- and the new dimensions [N/bn][K][bn] match the
from outer to inner loops (no, ko, ki, ni) resulting in a sequential access pattern for B after
flattening.
-.. GENERATED FROM PYTHON SOURCE LINES 255-290
+.. GENERATED FROM PYTHON SOURCE LINES 250-285
.. code-block:: default
@@ -563,16 +550,16 @@ flattening.
.. code-block:: none
- Opt4: 0.109543
+ Opt4: 0.109565
-.. GENERATED FROM PYTHON SOURCE LINES 291-292
+.. GENERATED FROM PYTHON SOURCE LINES 286-287
Here is the generated IR after array packing.
-.. GENERATED FROM PYTHON SOURCE LINES 292-295
+.. GENERATED FROM PYTHON SOURCE LINES 287-290
.. code-block:: default
@@ -624,7 +611,7 @@ Here is the generated IR after array packing.
-.. GENERATED FROM PYTHON SOURCE LINES 296-302
+.. GENERATED FROM PYTHON SOURCE LINES 291-297
Write cache for blocks
----------------------
@@ -633,7 +620,7 @@ is not sequential. So we can use a sequential cache array to hold the block resu
write to C when all the block results are ready.
-.. GENERATED FROM PYTHON SOURCE LINES 302-341
+.. GENERATED FROM PYTHON SOURCE LINES 297-336
.. code-block:: default
@@ -684,16 +671,16 @@ write to C when all the block results are ready.
.. code-block:: none
- Opt5: 0.111292
+ Opt5: 0.111225
-.. GENERATED FROM PYTHON SOURCE LINES 342-343
+.. GENERATED FROM PYTHON SOURCE LINES 337-338
Here is the generated IR after blocking.
-.. GENERATED FROM PYTHON SOURCE LINES 343-346
+.. GENERATED FROM PYTHON SOURCE LINES 338-341
.. code-block:: default
@@ -755,13 +742,13 @@ Here is the generated IR after blocking.
-.. GENERATED FROM PYTHON SOURCE LINES 347-350
+.. GENERATED FROM PYTHON SOURCE LINES 342-345
Parallel
--------
Furthermore, we can also utilize multi-core processors to do the thread-level parallelization.
-.. GENERATED FROM PYTHON SOURCE LINES 350-385
+.. GENERATED FROM PYTHON SOURCE LINES 345-380
.. code-block:: default
@@ -808,16 +795,16 @@ Furthermore, we can also utilize multi-core processors to do the thread-level pa
.. code-block:: none
- Opt6: 0.147642
+ Opt6: 0.146444
-.. GENERATED FROM PYTHON SOURCE LINES 386-387
+.. GENERATED FROM PYTHON SOURCE LINES 381-382
Here is the generated IR after parallelization.
-.. GENERATED FROM PYTHON SOURCE LINES 387-390
+.. GENERATED FROM PYTHON SOURCE LINES 382-385
.. code-block:: default
@@ -879,7 +866,7 @@ Here is the generated IR after parallelization.
-.. GENERATED FROM PYTHON SOURCE LINES 393-400
+.. GENERATED FROM PYTHON SOURCE LINES 388-395
Summary
-------
diff --git a/docs/_sources/how_to/optimize_operators/sg_execution_times.rst.txt b/docs/_sources/how_to/optimize_operators/sg_execution_times.rst.txt
index 32945eb8a6..96b007dc43 100644
--- a/docs/_sources/how_to/optimize_operators/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/optimize_operators/sg_execution_times.rst.txt
@@ -5,12 +5,12 @@
Computation times
=================
-**00:35.184** total execution time for **how_to_optimize_operators** files:
+**00:34.805** total execution time for **how_to_optimize_operators** files:
+-----------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_optimize_operators_opt_gemm.py` (``opt_gemm.py``) | 00:32.361 | 0.0 MB |
+| :ref:`sphx_glr_how_to_optimize_operators_opt_gemm.py` (``opt_gemm.py``) | 00:32.147 | 0.0 MB |
+-----------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_optimize_operators_opt_conv_tensorcore.py` (``opt_conv_tensorcore.py``) | 00:01.628 | 0.0 MB |
+| :ref:`sphx_glr_how_to_optimize_operators_opt_conv_tensorcore.py` (``opt_conv_tensorcore.py``) | 00:01.514 | 0.0 MB |
+-----------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_optimize_operators_opt_conv_cuda.py` (``opt_conv_cuda.py``) | 00:01.194 | 0.0 MB |
+| :ref:`sphx_glr_how_to_optimize_operators_opt_conv_cuda.py` (``opt_conv_cuda.py``) | 00:01.144 | 0.0 MB |
+-----------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/sg_execution_times.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/sg_execution_times.rst.txt
index 624fc08712..ff992a695b 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/sg_execution_times.rst.txt
@@ -5,18 +5,18 @@
Computation times
=================
-**08:52.823** total execution time for **how_to_tune_with_autoscheduler** files:
+**08:55.003** total execution time for **how_to_tune_with_autoscheduler** files:
+----------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_conv2d_layer_cuda.py` (``tune_conv2d_layer_cuda.py``) | 05:27.850 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_conv2d_layer_cuda.py` (``tune_conv2d_layer_cuda.py``) | 05:32.102 | 0.0 MB |
+----------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_x86.py` (``tune_network_x86.py``) | 01:31.963 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_x86.py` (``tune_network_x86.py``) | 01:31.233 | 0.0 MB |
+----------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_cuda.py` (``tune_network_cuda.py``) | 01:01.881 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_cuda.py` (``tune_network_cuda.py``) | 01:01.562 | 0.0 MB |
+----------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_sparse_x86.py` (``tune_sparse_x86.py``) | 00:27.550 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_sparse_x86.py` (``tune_sparse_x86.py``) | 00:27.142 | 0.0 MB |
+----------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_arm.py` (``tune_network_arm.py``) | 00:12.298 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_arm.py` (``tune_network_arm.py``) | 00:11.921 | 0.0 MB |
+----------------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_mali.py` (``tune_network_mali.py``) | 00:11.281 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autoscheduler_tune_network_mali.py` (``tune_network_mali.py``) | 00:11.043 | 0.0 MB |
+----------------------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/tune_conv2d_layer_cuda.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/tune_conv2d_layer_cuda.rst.txt
index a12383ff82..5ccb0db979 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/tune_conv2d_layer_cuda.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/tune_conv2d_layer_cuda.rst.txt
@@ -42,12 +42,11 @@ Note that this tutorial will not run on Windows or recent versions of macOS. To
get it to run, you will need to wrap the body of this tutorial in a :code:`if
__name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 39-48
+.. GENERATED FROM PYTHON SOURCE LINES 39-47
.. code-block:: default
-
import os
import numpy as np
@@ -62,7 +61,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 55-60
+.. GENERATED FROM PYTHON SOURCE LINES 51-56
Define the computation
^^^^^^^^^^^^^^^^^^^^^^
@@ -70,7 +69,7 @@ To begin with, let us define the computation of a convolution layer.
The function should return the list of input/output tensors.
From these tensors, the auto-scheduler can get the whole computational graph.
-.. GENERATED FROM PYTHON SOURCE LINES 60-72
+.. GENERATED FROM PYTHON SOURCE LINES 56-68
.. code-block:: default
@@ -93,13 +92,13 @@ From these tensors, the auto-scheduler can get the whole computational graph.
-.. GENERATED FROM PYTHON SOURCE LINES 73-76
+.. GENERATED FROM PYTHON SOURCE LINES 69-72
Create the search task
^^^^^^^^^^^^^^^^^^^^^^
We then create a search task for the last convolution layer in the resnet.
-.. GENERATED FROM PYTHON SOURCE LINES 76-89
+.. GENERATED FROM PYTHON SOURCE LINES 72-85
.. code-block:: default
@@ -137,7 +136,7 @@ We then create a search task for the last convolution layer in the resnet.
-.. GENERATED FROM PYTHON SOURCE LINES 90-107
+.. GENERATED FROM PYTHON SOURCE LINES 86-103
Next, we set parameters for the auto-scheduler. These parameters
mainly specify how we do the measurement during the search.
@@ -157,7 +156,7 @@ mainly specify how we do the measurement during the search.
* see :any:`auto_scheduler.TuningOptions`,
:any:`auto_scheduler.LocalRPCMeasureContext` for more parameters.
-.. GENERATED FROM PYTHON SOURCE LINES 107-117
+.. GENERATED FROM PYTHON SOURCE LINES 103-113
.. code-block:: default
@@ -184,7 +183,7 @@ mainly specify how we do the measurement during the search.
-.. GENERATED FROM PYTHON SOURCE LINES 118-124
+.. GENERATED FROM PYTHON SOURCE LINES 114-120
Run the search
^^^^^^^^^^^^^^
@@ -193,7 +192,7 @@ We can kick off the search and let the auto-scheduler do its magic.
After some measurement trials, we can load the best schedule from the log
file and apply it.
-.. GENERATED FROM PYTHON SOURCE LINES 124-133
+.. GENERATED FROM PYTHON SOURCE LINES 120-129
.. code-block:: default
@@ -213,13 +212,13 @@ file and apply it.
-.. GENERATED FROM PYTHON SOURCE LINES 134-137
+.. GENERATED FROM PYTHON SOURCE LINES 130-133
We can lower the schedule to see the IR after auto-scheduling.
The auto-scheduler correctly performs optimizations including multi-level tiling,
cooperative fetching, unrolling and operator fusion.
-.. GENERATED FROM PYTHON SOURCE LINES 137-141
+.. GENERATED FROM PYTHON SOURCE LINES 133-137
.. code-block:: default
@@ -729,13 +728,13 @@ cooperative fetching, unrolling and operator fusion.
-.. GENERATED FROM PYTHON SOURCE LINES 142-145
+.. GENERATED FROM PYTHON SOURCE LINES 138-141
Check correctness and evaluate performance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We build the binary and check its correctness and performance.
-.. GENERATED FROM PYTHON SOURCE LINES 145-172
+.. GENERATED FROM PYTHON SOURCE LINES 141-168
.. code-block:: default
@@ -774,12 +773,12 @@ We build the binary and check its correctness and performance.
.. code-block:: none
- Execution time of this operator: 0.360 ms
+ Execution time of this operator: 0.350 ms
-.. GENERATED FROM PYTHON SOURCE LINES 173-178
+.. GENERATED FROM PYTHON SOURCE LINES 169-174
Using the record file
^^^^^^^^^^^^^^^^^^^^^
@@ -787,13 +786,13 @@ During the search, all measurement records are dumped into the record
file "conv2d.json". The measurement records can be used to re-apply search results,
resume the search, and perform other analyses.
-.. GENERATED FROM PYTHON SOURCE LINES 180-183
+.. GENERATED FROM PYTHON SOURCE LINES 176-179
Here is an example where we load the best schedule from a file,
print the equivalent python schedule API and CUDA source code.
They can be used for debugging and learning the behavior of the auto-scheduler.
-.. GENERATED FROM PYTHON SOURCE LINES 183-190
+.. GENERATED FROM PYTHON SOURCE LINES 179-186
.. code-block:: default
@@ -1328,14 +1327,14 @@ They can be used for debugging and learning the behavior of the auto-scheduler.
-.. GENERATED FROM PYTHON SOURCE LINES 191-195
+.. GENERATED FROM PYTHON SOURCE LINES 187-191
A more complicated example is to resume the search.
In this case, we need to create the search policy and cost model by ourselves
and resume the status of search policy and cost model with the log file.
In the example below we resume the status and do more 5 trials.
-.. GENERATED FROM PYTHON SOURCE LINES 195-217
+.. GENERATED FROM PYTHON SOURCE LINES 191-213
.. code-block:: default
@@ -1381,7 +1380,7 @@ In the example below we resume the status and do more 5 trials.
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 5 minutes 27.850 seconds)
+ **Total running time of the script:** ( 5 minutes 32.102 seconds)
.. _sphx_glr_download_how_to_tune_with_autoscheduler_tune_conv2d_layer_cuda.py:
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_arm.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_arm.rst.txt
index 73388c1ccd..c68809670c 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_arm.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_arm.rst.txt
@@ -73,7 +73,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 66-78
+.. GENERATED FROM PYTHON SOURCE LINES 61-73
Define a Network
----------------
@@ -88,7 +88,7 @@ We also implemented more optimizations for NHWC layout with the auto-scheduler.
So it is recommended to convert your models to NHWC layout to use the auto-scheduler.
You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout conversion in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 78-155
+.. GENERATED FROM PYTHON SOURCE LINES 73-150
.. code-block:: default
@@ -176,7 +176,7 @@ You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout co
-.. GENERATED FROM PYTHON SOURCE LINES 156-180
+.. GENERATED FROM PYTHON SOURCE LINES 151-175
Start RPC Tracker
-----------------
@@ -203,7 +203,7 @@ The expected output is
INFO:RPCTracker:bind to 0.0.0.0:9190
-.. GENERATED FROM PYTHON SOURCE LINES 182-224
+.. GENERATED FROM PYTHON SOURCE LINES 177-219
Register Devices to RPC Tracker
-----------------------------------
@@ -248,7 +248,7 @@ the output can be
You can register multiple devices to the tracker to accelerate the measurement in tuning.
-.. GENERATED FROM PYTHON SOURCE LINES 226-232
+.. GENERATED FROM PYTHON SOURCE LINES 221-227
Set Tuning Options
------------------
@@ -257,7 +257,7 @@ as example with a 64bit OS (Ubuntu 20.04). In your setting, you should modify th
and device_key accordingly.
set :code:`use_ndk` to True if you use android phone.
-.. GENERATED FROM PYTHON SOURCE LINES 232-259
+.. GENERATED FROM PYTHON SOURCE LINES 227-254
.. code-block:: default
@@ -295,7 +295,7 @@ set :code:`use_ndk` to True if you use android phone.
-.. GENERATED FROM PYTHON SOURCE LINES 260-269
+.. GENERATED FROM PYTHON SOURCE LINES 255-264
Extract Search Tasks
--------------------
@@ -307,7 +307,7 @@ as :code:`sum(latency[t] * weight[t])`, where :code:`latency[t]` is the
latency of a task and :code:`weight[t]` is the weight of the task.
The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 269-283
+.. GENERATED FROM PYTHON SOURCE LINES 264-278
.. code-block:: default
@@ -561,7 +561,7 @@ The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 284-303
+.. GENERATED FROM PYTHON SOURCE LINES 279-298
Tuning and Evaluation
---------------------
@@ -583,7 +583,7 @@ After auto-tuning, we can compile the network with the best schedules we found.
All measurement records are dumped into the log file during auto-tuning,
so we can read the log file and load the best schedules.
-.. GENERATED FROM PYTHON SOURCE LINES 303-368
+.. GENERATED FROM PYTHON SOURCE LINES 298-363
.. code-block:: default
@@ -659,7 +659,7 @@ so we can read the log file and load the best schedules.
-.. GENERATED FROM PYTHON SOURCE LINES 369-420
+.. GENERATED FROM PYTHON SOURCE LINES 364-415
.. note:: Explaining the printed information during tuning
@@ -713,7 +713,7 @@ so we can read the log file and load the best schedules.
errors are isolated from the main process.
-.. GENERATED FROM PYTHON SOURCE LINES 422-428
+.. GENERATED FROM PYTHON SOURCE LINES 417-423
.. note:: Terminate the tuning earlier
@@ -722,7 +722,7 @@ so we can read the log file and load the best schedules.
you should be able to do the compilation (the secion below).
-.. GENERATED FROM PYTHON SOURCE LINES 430-446
+.. GENERATED FROM PYTHON SOURCE LINES 425-441
Other Tips
----------
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_cuda.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_cuda.rst.txt
index b9bf7a6963..508b48caf9 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_cuda.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_cuda.rst.txt
@@ -70,7 +70,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 61-73
+.. GENERATED FROM PYTHON SOURCE LINES 56-68
Define a Network
----------------
@@ -85,7 +85,7 @@ We also implemented more optimizations for NHWC layout with the auto-scheduler.
So it is recommended to convert your models to NHWC layout to use the auto-scheduler.
You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout conversion in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 73-147
+.. GENERATED FROM PYTHON SOURCE LINES 68-142
.. code-block:: default
@@ -170,7 +170,7 @@ You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout co
-.. GENERATED FROM PYTHON SOURCE LINES 148-157
+.. GENERATED FROM PYTHON SOURCE LINES 143-152
Extract Search Tasks
--------------------
@@ -182,7 +182,7 @@ as :code:`sum(latency[t] * weight[t])`, where :code:`latency[t]` is the
latency of a task and :code:`weight[t]` is the weight of the task.
The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 157-167
+.. GENERATED FROM PYTHON SOURCE LINES 152-162
.. code-block:: default
@@ -482,7 +482,7 @@ The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 168-190
+.. GENERATED FROM PYTHON SOURCE LINES 163-185
Begin Tuning
------------
@@ -507,7 +507,7 @@ Now, we set some options for tuning and launch the search tasks
:any:`auto_scheduler.LocalRPCMeasureContext` for more parameters.
-.. GENERATED FROM PYTHON SOURCE LINES 190-212
+.. GENERATED FROM PYTHON SOURCE LINES 185-207
.. code-block:: default
@@ -540,7 +540,7 @@ Now, we set some options for tuning and launch the search tasks
-.. GENERATED FROM PYTHON SOURCE LINES 213-266
+.. GENERATED FROM PYTHON SOURCE LINES 208-261
.. note:: Explain the printed information during tuning
@@ -596,7 +596,7 @@ Now, we set some options for tuning and launch the search tasks
errors are isolated from the main process.
-.. GENERATED FROM PYTHON SOURCE LINES 268-274
+.. GENERATED FROM PYTHON SOURCE LINES 263-269
.. note:: Terminate the tuning earlier
@@ -605,7 +605,7 @@ Now, we set some options for tuning and launch the search tasks
you should be able to do the compilation (the secion below).
-.. GENERATED FROM PYTHON SOURCE LINES 277-282
+.. GENERATED FROM PYTHON SOURCE LINES 272-277
Compile and Evaluate
--------------------
@@ -613,7 +613,7 @@ After auto-tuning, we can compile the network with the best schedules we found.
All measurement records are dumped into the log file during auto-tuning,
so we can read the log file and load the best schedules.
-.. GENERATED FROM PYTHON SOURCE LINES 282-300
+.. GENERATED FROM PYTHON SOURCE LINES 277-295
.. code-block:: default
@@ -647,13 +647,13 @@ so we can read the log file and load the best schedules.
Evaluate inference time cost...
Execution time summary:
mean (ms) median (ms) max (ms) min (ms) std (ms)
- 7.8785 7.8872 7.8886 7.8596 0.0134
+ 7.8534 7.8517 7.8578 7.8508 0.0031
-.. GENERATED FROM PYTHON SOURCE LINES 301-317
+.. GENERATED FROM PYTHON SOURCE LINES 296-312
Other Tips
----------
@@ -675,7 +675,7 @@ Other Tips
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 1.881 seconds)
+ **Total running time of the script:** ( 1 minutes 1.562 seconds)
.. _sphx_glr_download_how_to_tune_with_autoscheduler_tune_network_cuda.py:
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_mali.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_mali.rst.txt
index 9fd5d7973a..43b2d55b27 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_mali.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_mali.rst.txt
@@ -71,7 +71,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 62-74
+.. GENERATED FROM PYTHON SOURCE LINES 57-69
Define a Network
----------------
@@ -86,7 +86,7 @@ We also implemented more optimizations for NHWC layout with the auto-scheduler.
So it is recommended to convert your models to NHWC layout to use the auto-scheduler.
You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout conversion in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 74-153
+.. GENERATED FROM PYTHON SOURCE LINES 69-148
.. code-block:: default
@@ -176,7 +176,7 @@ You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout co
-.. GENERATED FROM PYTHON SOURCE LINES 154-159
+.. GENERATED FROM PYTHON SOURCE LINES 149-154
Start an RPC Tracker and Register Devices to the Tracker
--------------------------------------------------------
@@ -184,7 +184,7 @@ Please refer to the "Start RPC Tracker" and "Register Devices to RPC Tracker" se
in this :ref:`tutorial <tutorials-autotvm-start-rpc-tracker>` to start an RPC tracker
and register devices to the tracker.
-.. GENERATED FROM PYTHON SOURCE LINES 159-164
+.. GENERATED FROM PYTHON SOURCE LINES 154-159
.. code-block:: default
@@ -200,7 +200,7 @@ and register devices to the tracker.
-.. GENERATED FROM PYTHON SOURCE LINES 165-174
+.. GENERATED FROM PYTHON SOURCE LINES 160-169
Extract Search Tasks
--------------------
@@ -212,7 +212,7 @@ as :code:`sum(latency[t] * weight[t])`, where :code:`latency[t]` is the
latency of a task and :code:`weight[t]` is the weight of the task.
The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 174-183
+.. GENERATED FROM PYTHON SOURCE LINES 169-178
.. code-block:: default
@@ -430,7 +430,7 @@ The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 184-210
+.. GENERATED FROM PYTHON SOURCE LINES 179-205
.. note:: How to get the hardware parameters from remote device
@@ -459,7 +459,7 @@ The task scheduler will just optimize this objective.
)
-.. GENERATED FROM PYTHON SOURCE LINES 212-228
+.. GENERATED FROM PYTHON SOURCE LINES 207-223
Tuning and Evaluate
-------------------
@@ -478,7 +478,7 @@ Now, we set some options for tuning, launch the search tasks and evaluate the en
:any:`auto_scheduler.LocalRunner` for more parameters.
-.. GENERATED FROM PYTHON SOURCE LINES 228-281
+.. GENERATED FROM PYTHON SOURCE LINES 223-276
.. code-block:: default
@@ -542,7 +542,7 @@ Now, we set some options for tuning, launch the search tasks and evaluate the en
-.. GENERATED FROM PYTHON SOURCE LINES 282-340
+.. GENERATED FROM PYTHON SOURCE LINES 277-335
.. note:: Explain the printed information during tuning
@@ -603,7 +603,7 @@ Now, we set some options for tuning, launch the search tasks and evaluate the en
errors are isolated from the main process.
-.. GENERATED FROM PYTHON SOURCE LINES 342-348
+.. GENERATED FROM PYTHON SOURCE LINES 337-343
.. note:: Terminate the tuning earlier
@@ -612,7 +612,7 @@ Now, we set some options for tuning, launch the search tasks and evaluate the en
you should be able to do the compilation (the secion below).
-.. GENERATED FROM PYTHON SOURCE LINES 350-366
+.. GENERATED FROM PYTHON SOURCE LINES 345-361
Other Tips
----------
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_x86.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_x86.rst.txt
index 018ed9a65b..57629205a1 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/tune_network_x86.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/tune_network_x86.rst.txt
@@ -71,7 +71,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 63-75
+.. GENERATED FROM PYTHON SOURCE LINES 58-70
Define a Network
----------------
@@ -86,7 +86,7 @@ We also implemented more optimizations for NHWC layout with the auto-scheduler.
So it is recommended to convert your models to NHWC layout to use the auto-scheduler.
You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout conversion in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 75-163
+.. GENERATED FROM PYTHON SOURCE LINES 70-158
.. code-block:: default
@@ -185,7 +185,7 @@ You can use :ref:`ConvertLayout <convert-layout-usage>` pass to do the layout co
-.. GENERATED FROM PYTHON SOURCE LINES 164-173
+.. GENERATED FROM PYTHON SOURCE LINES 159-168
Extract Search Tasks
--------------------
@@ -197,7 +197,7 @@ as :code:`sum(latency[t] * weight[t])`, where :code:`latency[t]` is the
latency of a task and :code:`weight[t]` is the weight of the task.
The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 173-190
+.. GENERATED FROM PYTHON SOURCE LINES 168-185
.. code-block:: default
@@ -490,7 +490,7 @@ The task scheduler will just optimize this objective.
-.. GENERATED FROM PYTHON SOURCE LINES 191-207
+.. GENERATED FROM PYTHON SOURCE LINES 186-202
Begin Tuning
------------
@@ -509,7 +509,7 @@ Now, we set some options for tuning and launch the search tasks
:any:`auto_scheduler.LocalRunner` for more parameters.
-.. GENERATED FROM PYTHON SOURCE LINES 207-241
+.. GENERATED FROM PYTHON SOURCE LINES 202-236
.. code-block:: default
@@ -554,7 +554,7 @@ Now, we set some options for tuning and launch the search tasks
-.. GENERATED FROM PYTHON SOURCE LINES 242-300
+.. GENERATED FROM PYTHON SOURCE LINES 237-295
.. note:: Explain the printed information during tuning
@@ -615,7 +615,7 @@ Now, we set some options for tuning and launch the search tasks
errors are isolated from the main process.
-.. GENERATED FROM PYTHON SOURCE LINES 302-308
+.. GENERATED FROM PYTHON SOURCE LINES 297-303
.. note:: Terminate the tuning earlier
@@ -624,7 +624,7 @@ Now, we set some options for tuning and launch the search tasks
you should be able to do the compilation (the secion below).
-.. GENERATED FROM PYTHON SOURCE LINES 311-316
+.. GENERATED FROM PYTHON SOURCE LINES 306-311
Compile and Evaluate
--------------------
@@ -632,7 +632,7 @@ After auto-tuning, we can compile the network with the best schedules we found.
All measurement records are dumped into the log file during auto-tuning,
so we can read the log file and load the best schedules.
-.. GENERATED FROM PYTHON SOURCE LINES 316-334
+.. GENERATED FROM PYTHON SOURCE LINES 311-329
.. code-block:: default
@@ -666,13 +666,13 @@ so we can read the log file and load the best schedules.
Evaluate inference time cost...
Execution time summary:
mean (ms) median (ms) max (ms) min (ms) std (ms)
- 754.0642 755.3784 757.0148 749.7994 3.0888
+ 752.2724 751.9923 755.0893 749.7358 2.1945
-.. GENERATED FROM PYTHON SOURCE LINES 335-351
+.. GENERATED FROM PYTHON SOURCE LINES 330-346
Other Tips
----------
@@ -694,7 +694,7 @@ Other Tips
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 31.963 seconds)
+ **Total running time of the script:** ( 1 minutes 31.233 seconds)
.. _sphx_glr_download_how_to_tune_with_autoscheduler_tune_network_x86.py:
diff --git a/docs/_sources/how_to/tune_with_autoscheduler/tune_sparse_x86.rst.txt b/docs/_sources/how_to/tune_with_autoscheduler/tune_sparse_x86.rst.txt
index 7cc4e9b2f8..83205724e3 100644
--- a/docs/_sources/how_to/tune_with_autoscheduler/tune_sparse_x86.rst.txt
+++ b/docs/_sources/how_to/tune_with_autoscheduler/tune_sparse_x86.rst.txt
@@ -64,7 +64,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 55-60
+.. GENERATED FROM PYTHON SOURCE LINES 50-55
Define the computation
^^^^^^^^^^^^^^^^^^^^^^
@@ -72,7 +72,7 @@ To begin with, let us define the computation of a sparse matmul with several rel
The function should return the list of input/output tensors.
From these tensors, the auto-scheduler can get the whole computational graph.
-.. GENERATED FROM PYTHON SOURCE LINES 60-77
+.. GENERATED FROM PYTHON SOURCE LINES 55-72
.. code-block:: default
@@ -100,7 +100,7 @@ From these tensors, the auto-scheduler can get the whole computational graph.
-.. GENERATED FROM PYTHON SOURCE LINES 78-87
+.. GENERATED FROM PYTHON SOURCE LINES 73-82
Special step for sparse workload
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -112,7 +112,7 @@ To solve this problem, we register these as special buffers, and load them when
measuring.
See the `tvm.auto_scheduler.measure.py` for more details.
-.. GENERATED FROM PYTHON SOURCE LINES 87-106
+.. GENERATED FROM PYTHON SOURCE LINES 82-101
.. code-block:: default
@@ -142,7 +142,7 @@ See the `tvm.auto_scheduler.measure.py` for more details.
-.. GENERATED FROM PYTHON SOURCE LINES 107-114
+.. GENERATED FROM PYTHON SOURCE LINES 102-109
Create the search task
^^^^^^^^^^^^^^^^^^^^^^
@@ -152,7 +152,7 @@ If your machine supports avx instructions, you can
- replace "llvm" below with "llvm -mcpu=core-avx2" to enable AVX2
- replace "llvm" below with "llvm -mcpu=skylake-avx512" to enable AVX-512
-.. GENERATED FROM PYTHON SOURCE LINES 114-142
+.. GENERATED FROM PYTHON SOURCE LINES 109-137
.. code-block:: default
@@ -208,7 +208,7 @@ If your machine supports avx instructions, you can
-.. GENERATED FROM PYTHON SOURCE LINES 143-153
+.. GENERATED FROM PYTHON SOURCE LINES 138-148
Write the custom sketch for sparse dense op
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -221,7 +221,7 @@ CustomSketchRule consists of two parts: the condition function and the apply fun
- apply function: describe how to generate the initial sketch. You can implement it using
auto-scheduler provided loop state APIs.
-.. GENERATED FROM PYTHON SOURCE LINES 153-208
+.. GENERATED FROM PYTHON SOURCE LINES 148-203
.. code-block:: default
@@ -287,7 +287,7 @@ CustomSketchRule consists of two parts: the condition function and the apply fun
-.. GENERATED FROM PYTHON SOURCE LINES 209-221
+.. GENERATED FROM PYTHON SOURCE LINES 204-216
Next, we set parameters for the auto-scheduler with the custom sketch plugged in.
@@ -302,7 +302,7 @@ Next, we set parameters for the auto-scheduler with the custom sketch plugged in
* Here, we need to create a :code:`auto_scheduler.SketchPolicy` object, and add the custom sketch
rule as a `init_search_callbacks`.
-.. GENERATED FROM PYTHON SOURCE LINES 221-237
+.. GENERATED FROM PYTHON SOURCE LINES 216-232
.. code-block:: default
@@ -329,7 +329,7 @@ Next, we set parameters for the auto-scheduler with the custom sketch plugged in
-.. GENERATED FROM PYTHON SOURCE LINES 238-244
+.. GENERATED FROM PYTHON SOURCE LINES 233-239
Run the search
^^^^^^^^^^^^^^
@@ -338,7 +338,7 @@ We can kick off the search and let the auto-scheduler do its magic.
After some measurement trials, we can load the best schedule from the log
file and apply it.
-.. GENERATED FROM PYTHON SOURCE LINES 244-253
+.. GENERATED FROM PYTHON SOURCE LINES 239-248
.. code-block:: default
@@ -358,13 +358,13 @@ file and apply it.
-.. GENERATED FROM PYTHON SOURCE LINES 254-257
+.. GENERATED FROM PYTHON SOURCE LINES 249-252
We can lower the schedule to see the IR after auto-scheduling.
The auto-scheduler correctly performs optimizations including multi-level tiling,
layout transformation, parallelization, vectorization, unrolling, and operator fusion.
-.. GENERATED FROM PYTHON SOURCE LINES 257-261
+.. GENERATED FROM PYTHON SOURCE LINES 252-256
.. code-block:: default
@@ -390,77 +390,77 @@ layout transformation, parallelization, vectorization, unrolling, and operator f
placeholder_4: Buffer(placeholder_14: Pointer(float32), float32, [128, 512], []),
compute: Buffer(compute_2: Pointer(float32), float32, [128, 512], [])}
buffer_map = {placeholder_5: placeholder, placeholder_6: placeholder_1, placeholder_7: placeholder_2, placeholder_8: placeholder_3, placeholder_9: placeholder_4, compute_1: compute} {
- for (i0.outer.i1.outer.fused: int32, 0, 16) "parallel" {
- allocate(compute_3: Pointer(global float32), float32, [4096]), storage_scope = global {
- for (i.outer.inner: int32, 0, 8) {
- for (nb_j.inner: int32, 0, 2) {
- for (i.inner.init: int32, 0, 16) {
- let cse_var_1: int32 = (((i.outer.inner*512) + (i.inner.init*32)) + (nb_j.inner*16))
- {
- compute_4: Buffer(compute_3, float32, [4096], [])[cse_var_1] = 0f32
- compute_4[(cse_var_1 + 1)] = 0f32
- compute_4[(cse_var_1 + 2)] = 0f32
- compute_4[(cse_var_1 + 3)] = 0f32
- compute_4[(cse_var_1 + 4)] = 0f32
- compute_4[(cse_var_1 + 5)] = 0f32
- compute_4[(cse_var_1 + 6)] = 0f32
- compute_4[(cse_var_1 + 7)] = 0f32
- compute_4[(cse_var_1 + 8)] = 0f32
- compute_4[(cse_var_1 + 9)] = 0f32
- compute_4[(cse_var_1 + 10)] = 0f32
- compute_4[(cse_var_1 + 11)] = 0f32
- compute_4[(cse_var_1 + 12)] = 0f32
- compute_4[(cse_var_1 + 13)] = 0f32
- compute_4[(cse_var_1 + 14)] = 0f32
- compute_4[(cse_var_1 + 15)] = 0f32
- }
+ for (i0.outer.i1.outer.fused: int32, 0, 64) "parallel" {
+ allocate(compute_3: Pointer(global float32), float32, [1024]), storage_scope = global {
+ for (nb_j.inner: int32, 0, 2) {
+ for (i.inner.init: int32, 0, 32) {
+ let cse_var_1: int32 = ((i.inner.init*32) + (nb_j.inner*16))
+ {
+ compute_4: Buffer(compute_3, float32, [1024], [])[cse_var_1] = 0f32
+ compute_4[(cse_var_1 + 1)] = 0f32
+ compute_4[(cse_var_1 + 2)] = 0f32
+ compute_4[(cse_var_1 + 3)] = 0f32
+ compute_4[(cse_var_1 + 4)] = 0f32
+ compute_4[(cse_var_1 + 5)] = 0f32
+ compute_4[(cse_var_1 + 6)] = 0f32
+ compute_4[(cse_var_1 + 7)] = 0f32
+ compute_4[(cse_var_1 + 8)] = 0f32
+ compute_4[(cse_var_1 + 9)] = 0f32
+ compute_4[(cse_var_1 + 10)] = 0f32
+ compute_4[(cse_var_1 + 11)] = 0f32
+ compute_4[(cse_var_1 + 12)] = 0f32
+ compute_4[(cse_var_1 + 13)] = 0f32
+ compute_4[(cse_var_1 + 14)] = 0f32
+ compute_4[(cse_var_1 + 15)] = 0f32
}
- for (elem_idx: int32, 0, let cse_var_2: int32 = ((i0.outer.i1.outer.fused*2) + nb_j.inner) in (placeholder_15: Buffer(placeholder_13, int32, [33], [])[(cse_var_2 + 1)] - placeholder_15[cse_var_2])) {
- for (i.inner: int32, 0, 16) {
- let cse_var_21: int32 = (elem_idx*16)
- let cse_var_20: int32 = ((i0.outer.i1.outer.fused*2) + nb_j.inner)
- let cse_var_19: int32 = ((i.outer.inner*4096) + (i.inner*256))
- let cse_var_18: int32 = (((i.outer.inner*512) + (i.inner*32)) + (nb_j.inner*16))
- let cse_var_17: int32 = (cse_var_18 + 9)
- let cse_var_16: int32 = (cse_var_18 + 8)
- let cse_var_15: int32 = (cse_var_18 + 7)
- let cse_var_14: int32 = (cse_var_18 + 6)
- let cse_var_13: int32 = (cse_var_18 + 5)
- let cse_var_12: int32 = (cse_var_18 + 4)
- let cse_var_11: int32 = (cse_var_18 + 3)
- let cse_var_10: int32 = (cse_var_18 + 2)
- let cse_var_9: int32 = (cse_var_18 + 15)
- let cse_var_8: int32 = (cse_var_18 + 14)
- let cse_var_7: int32 = (cse_var_18 + 13)
- let cse_var_6: int32 = (cse_var_18 + 12)
- let cse_var_5: int32 = (cse_var_18 + 11)
- let cse_var_4: int32 = (cse_var_18 + 10)
- let cse_var_3: int32 = (cse_var_18 + 1)
- {
- compute_4[cse_var_18] = (compute_4[cse_var_18] + (placeholder_16: Buffer(placeholder_11, float32, [78656], [])[((placeholder_15[cse_var_20]*16) + cse_var_21)]*max(placeholder_17: Buffer(placeholder_10, float32, [32768], [])[(cse_var_19 + placeholder_18: Buffer(placeholder_12, int32, [4916], [])[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_3] = (compute_4[cse_var_3] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 1)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_10] = (compute_4[cse_var_10] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 2)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_11] = (compute_4[cse_var_11] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 3)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_12] = (compute_4[cse_var_12] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 4)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_13] = (compute_4[cse_var_13] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 5)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_14] = (compute_4[cse_var_14] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 6)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_15] = (compute_4[cse_var_15] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 7)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_16] = (compute_4[cse_var_16] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 8)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_17] = (compute_4[cse_var_17] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 9)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_4] = (compute_4[cse_var_4] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 10)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_5] = (compute_4[cse_var_5] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 11)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_6] = (compute_4[cse_var_6] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 12)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_7] = (compute_4[cse_var_7] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 13)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_8] = (compute_4[cse_var_8] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 14)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- compute_4[cse_var_9] = (compute_4[cse_var_9] + (placeholder_16[(((placeholder_15[cse_var_20]*16) + cse_var_21) + 15)]*max(placeholder_17[(cse_var_19 + placeholder_18[(placeholder_15[cse_var_20] + elem_idx)])], 0f32)))
- }
+ }
+ for (elem_idx: int32, 0, let cse_var_2: int32 = ((floormod(i0.outer.i1.outer.fused, 16)*2) + nb_j.inner) in (placeholder_15: Buffer(placeholder_13, int32, [33], [])[(cse_var_2 + 1)] - placeholder_15[cse_var_2])) {
+ for (i.inner: int32, 0, 32) {
+ let cse_var_21: int32 = (elem_idx*16)
+ let cse_var_20: int32 = ((i.inner*32) + (nb_j.inner*16))
+ let cse_var_19: int32 = ((floormod(i0.outer.i1.outer.fused, 16)*2) + nb_j.inner)
+ let cse_var_18: int32 = ((floordiv(i0.outer.i1.outer.fused, 16)*8192) + (i.inner*256))
+ let cse_var_17: int32 = (cse_var_20 + 9)
+ let cse_var_16: int32 = (cse_var_20 + 8)
+ let cse_var_15: int32 = (cse_var_20 + 7)
+ let cse_var_14: int32 = (cse_var_20 + 6)
+ let cse_var_13: int32 = (cse_var_20 + 5)
+ let cse_var_12: int32 = (cse_var_20 + 4)
+ let cse_var_11: int32 = (cse_var_20 + 3)
+ let cse_var_10: int32 = (cse_var_20 + 2)
+ let cse_var_9: int32 = (cse_var_20 + 15)
+ let cse_var_8: int32 = (cse_var_20 + 14)
+ let cse_var_7: int32 = (cse_var_20 + 13)
+ let cse_var_6: int32 = (cse_var_20 + 12)
+ let cse_var_5: int32 = (cse_var_20 + 11)
+ let cse_var_4: int32 = (cse_var_20 + 10)
+ let cse_var_3: int32 = (cse_var_20 + 1)
+ {
+ compute_4[cse_var_20] = (compute_4[cse_var_20] + (placeholder_16: Buffer(placeholder_11, float32, [78656], [])[((placeholder_15[cse_var_19]*16) + cse_var_21)]*max(placeholder_17: Buffer(placeholder_10, float32, [32768], [])[(cse_var_18 + placeholder_18: Buffer(placeholder_12, int32, [4916], [])[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_3] = (compute_4[cse_var_3] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 1)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_10] = (compute_4[cse_var_10] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 2)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_11] = (compute_4[cse_var_11] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 3)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_12] = (compute_4[cse_var_12] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 4)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_13] = (compute_4[cse_var_13] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 5)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_14] = (compute_4[cse_var_14] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 6)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_15] = (compute_4[cse_var_15] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 7)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_16] = (compute_4[cse_var_16] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 8)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_17] = (compute_4[cse_var_17] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 9)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_4] = (compute_4[cse_var_4] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 10)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_5] = (compute_4[cse_var_5] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 11)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_6] = (compute_4[cse_var_6] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 12)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_7] = (compute_4[cse_var_7] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 13)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_8] = (compute_4[cse_var_8] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 14)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
+ compute_4[cse_var_9] = (compute_4[cse_var_9] + (placeholder_16[(((placeholder_15[cse_var_19]*16) + cse_var_21) + 15)]*max(placeholder_17[(cse_var_18 + placeholder_18[(placeholder_15[cse_var_19] + elem_idx)])], 0f32)))
}
}
}
}
- for (i0.inner: int32, 0, 128) {
- let cse_var_22: int32 = ((i0.inner*512) + (i0.outer.i1.outer.fused*32))
- compute_5: Buffer(compute_2, float32, [65536], [])[ramp(cse_var_22, 1, 32)] = max((compute_4[ramp((i0.inner*32), 1, 32)] + placeholder_19: Buffer(placeholder_14, float32, [65536], [])[ramp(cse_var_22, 1, 32)]), broadcast(0f32, 32))
+ for (i0.inner: int32, 0, 32) {
+ for (i1.inner: int32, 0, 32) {
+ let cse_var_22: int32 = ((((floordiv(i0.outer.i1.outer.fused, 16)*16384) + (i0.inner*512)) + (floormod(i0.outer.i1.outer.fused, 16)*32)) + i1.inner)
+ compute_5: Buffer(compute_2, float32, [65536], [])[cse_var_22] = max((compute_4[((i0.inner*32) + i1.inner)] + placeholder_19: Buffer(placeholder_14, float32, [65536], [])[cse_var_22]), 0f32)
+ }
}
}
}
@@ -471,13 +471,13 @@ layout transformation, parallelization, vectorization, unrolling, and operator f
-.. GENERATED FROM PYTHON SOURCE LINES 262-265
+.. GENERATED FROM PYTHON SOURCE LINES 257-260
Check correctness and evaluate performance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We build the binary and check its correctness and performance.
-.. GENERATED FROM PYTHON SOURCE LINES 265-292
+.. GENERATED FROM PYTHON SOURCE LINES 260-287
.. code-block:: default
@@ -516,12 +516,12 @@ We build the binary and check its correctness and performance.
.. code-block:: none
- Execution time of this operator: 1.735 ms
+ Execution time of this operator: 1.767 ms
-.. GENERATED FROM PYTHON SOURCE LINES 293-331
+.. GENERATED FROM PYTHON SOURCE LINES 288-326
.. note:: Tuning result example
diff --git a/docs/_sources/how_to/tune_with_autotvm/sg_execution_times.rst.txt b/docs/_sources/how_to/tune_with_autotvm/sg_execution_times.rst.txt
index 0496971fd6..f5319fdff7 100644
--- a/docs/_sources/how_to/tune_with_autotvm/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/tune_with_autotvm/sg_execution_times.rst.txt
@@ -5,16 +5,16 @@
Computation times
=================
-**00:30.036** total execution time for **how_to_tune_with_autotvm** files:
+**00:26.361** total execution time for **how_to_tune_with_autotvm** files:
+--------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_conv2d_cuda.py` (``tune_conv2d_cuda.py``) | 00:30.000 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_conv2d_cuda.py` (``tune_conv2d_cuda.py``) | 00:26.328 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_x86.py` (``tune_relay_x86.py``) | 00:00.021 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_x86.py` (``tune_relay_x86.py``) | 00:00.019 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_cuda.py` (``tune_relay_cuda.py``) | 00:00.005 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_arm.py` (``tune_relay_arm.py``) | 00:00.005 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_arm.py` (``tune_relay_arm.py``) | 00:00.004 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_mobile_gpu.py` (``tune_relay_mobile_gpu.py``) | 00:00.005 | 0.0 MB |
+| :ref:`sphx_glr_how_to_tune_with_autotvm_tune_relay_mobile_gpu.py` (``tune_relay_mobile_gpu.py``) | 00:00.004 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/tune_with_autotvm/tune_conv2d_cuda.rst.txt b/docs/_sources/how_to/tune_with_autotvm/tune_conv2d_cuda.rst.txt
index 2336b8c8c1..50c3fba9d7 100644
--- a/docs/_sources/how_to/tune_with_autotvm/tune_conv2d_cuda.rst.txt
+++ b/docs/_sources/how_to/tune_with_autotvm/tune_conv2d_cuda.rst.txt
@@ -55,12 +55,11 @@ as FFI of tvm. In the root directory of tvm, execute
Now return to python code. Import packages.
-.. GENERATED FROM PYTHON SOURCE LINES 50-63
+.. GENERATED FROM PYTHON SOURCE LINES 50-62
.. code-block:: default
-
import logging
import sys
import numpy as np
@@ -79,7 +78,7 @@ Now return to python code. Import packages.
-.. GENERATED FROM PYTHON SOURCE LINES 70-92
+.. GENERATED FROM PYTHON SOURCE LINES 66-88
Step 1: Define the search space
--------------------------------
@@ -104,7 +103,7 @@ It is worth noting that the search space for a conv2d operator
can be very large (at the level of 10^9 for some input shapes)
-.. GENERATED FROM PYTHON SOURCE LINES 92-182
+.. GENERATED FROM PYTHON SOURCE LINES 88-178
.. code-block:: default
@@ -205,7 +204,7 @@ can be very large (at the level of 10^9 for some input shapes)
-.. GENERATED FROM PYTHON SOURCE LINES 183-190
+.. GENERATED FROM PYTHON SOURCE LINES 179-186
Step 2: Search through the space
---------------------------------
@@ -215,7 +214,7 @@ for our case. Here we only do 20 trials for demonstration.
In practice, making 1000 trials usually can find some good kernels
for this template
-.. GENERATED FROM PYTHON SOURCE LINES 190-219
+.. GENERATED FROM PYTHON SOURCE LINES 186-215
.. code-block:: default
@@ -269,7 +268,132 @@ for this template
waiting for device...
device available
Get devices for measurement successfully!
- No: 1 GFLOPS: 0.00/0.00 result: Traceback (most recent call last):
+ No: 1 GFLOPS: 113.46/113.46 result: MeasureResult(costs=(0.002040405125,), error_no=MeasureErrorNo.NO_ERROR, all_cost=2.7114951610565186, timestamp=1673549977.4905112) [('tile_f', [-1, 2, 1, 1]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 8, 4]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 1]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,3758261
+ No: 2 GFLOPS: 192.03/192.03 result: MeasureResult(costs=(0.0012055587710843375,), error_no=MeasureErrorNo.NO_ERROR, all_cost=1.971130132675171, timestamp=1673549978.2174156) [('tile_f', [-1, 1, 16, 2]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 4, 1]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2720385
+ No: 3 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
+ File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
+ func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
+ File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
+ func = build(s, args, target_host=task.target_host, runtime=runtime)
+ File "/workspace/python/tvm/driver/build_module.py", line 227, in build
+ input_mod = lower(inputs, args, name=name, binds=binds)
+ File "/workspace/python/tvm/driver/build_module.py", line 134, in lower
+ return ffi.lower_schedule(inp, args, name, binds, simple_mode)
+ File "tvm/_ffi/_cython/./packed_func.pxi", line 331, in tvm._ffi._cy3.core.PackedFuncBase.__call__
+ File "tvm/_ffi/_cython/./packed_func.pxi", line 276, in tvm._ffi._cy3.core.FuncCall
+ File "tvm/_ffi/_cython/./base.pxi", line 181, in tvm._ffi._cy3.core.CHECK_CALL
+ tvm._ffi.base.TVMError: Traceback (most recent call last):
+ 24: TVMFuncCall
+ at ../src/runtime/c_runtime_api.cc:477
+ 23: tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
+ at ../include/tvm/runtime/packed_func.h:1217
+ 22: Call
+ at ../include/tvm/runtime/packed_func.h:1213
+ 21: operator()
+ at ../include/tvm/runtime/packed_func.h:1730
+ 20: unpack_call<tvm::IRModule, 5, tvm::<lambda(tvm::te::Schedule, const tvm::runtime::Array<tvm::runtime::ObjectRef>&, const tvm::runtime::String&, const tvm::runtime::Map<tvm::te::Tensor, tvm::tir::Buffer>&, bool)> >
+ at ../include/tvm/runtime/packed_func.h:1670
+ 19: run<>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 18: run<tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 17: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 16: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 15: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 14: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1645
+ 13: operator()
+ at ../src/driver/driver_api.cc:395
+ 12: tvm::LowerSchedule(tvm::te::Schedule, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unordered_map<tvm::te::Tensor, tvm::tir::Buffer, std::hash<tvm::te::Tensor>, std::equal_to<tvm::te::Tensor>, std::allocator<std::pair<tvm::te::Tensor const, tvm::tir::Buffer> > > const&, tvm::GlobalVarSupply, bool)
+ at ../src/driver/driver_api.cc:381
+ 11: tvm::LowerWithPassList(tvm::IRModule, tvm::runtime::Array<tvm::transform::Pass, void>)
+ at ../src/driver/driver_api.cc:276
+ 10: tvm::transform::Pass::operator()(tvm::IRModule) const
+ at ../src/ir/transform.cc:258
+ 9: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/ir/transform.cc:274
+ 8: tvm::transform::SequentialNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/ir/transform.cc:454
+ 7: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/ir/transform.cc:274
+ 6: tvm::tir::transform::PrimFuncPassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/tir/ir/transform.cc:100
+ 5: tvm::runtime::TypedPackedFunc<tvm::tir::PrimFunc (tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext)>::operator()(tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext) const
+ at ../include/tvm/runtime/packed_func.h:1749
+ 4: tvm::tir::PrimFunc tvm::runtime::detail::typed_packed_call_dispatcher<tvm::tir::PrimFunc>::run<tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext>(tvm::runtime::PackedFunc const&, tvm::tir::PrimFunc&&, tvm::IRModule&&, tvm::transform::PassContext&&)
+ at ../include/tvm/runtime/packed_func.h:1693
+ 3: tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext>(tvm::tir::PrimFunc&&, tvm::IRModule&&, tvm::transform::PassContext&&) const
+ at ../include/tvm/runtime/packed_func.h:1617
+ 2: tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
+ at ../include/tvm/runtime/packed_func.h:1217
+ 1: Call
+ at ../include/tvm/runtime/packed_func.h:1213
+ 0: operator()
+ at ../src/runtime/c_runtime_api.cc:534
+ File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
+ File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
+ raise InstantiationError("Skipped because of invalid gpu kernel")
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel
+
+ Traceback (most recent call last):
+ 24: TVMFuncCall
+ at ../src/runtime/c_runtime_api.cc:477
+ 23: tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
+ at ../include/tvm/runtime/packed_func.h:1217
+ 22: Call
+ at ../include/tvm/runtime/packed_func.h:1213
+ 21: operator()
+ at ../include/tvm/runtime/packed_func.h:1730
+ 20: unpack_call<tvm::IRModule, 5, tvm::<lambda(tvm::te::Schedule, const tvm::runtime::Array<tvm::runtime::ObjectRef>&, const tvm::runtime::String&, const tvm::runtime::Map<tvm::te::Tensor, tvm::tir::Buffer>&, bool)> >
+ at ../include/tvm/runtime/packed_func.h:1670
+ 19: run<>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 18: run<tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 17: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 16: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 15: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1630
+ 14: run<tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_, tvm::runtime::TVMMovableArgValueWithContext_>
+ at ../include/tvm/runtime/packed_func.h:1645
+ 13: operator()
+ at ../src/driver/driver_api.cc:395
+ 12: tvm::LowerSchedule(tvm::te::Schedule, tvm::runtime::Array<tvm::runtime::ObjectRef, void> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unordered_map<tvm::te::Tensor, tvm::tir::Buffer, std::hash<tvm::te::Tensor>, std::equal_to<tvm::te::Tensor>, std::allocator<std::pair<tvm::te::Tensor const, tvm::tir::Buffer> > > const&, tvm::GlobalVarSupply, bool)
+ at ../src/driver/driver_api.cc:381
+ 11: tvm::LowerWithPassList(tvm::IRModule, tvm::runtime::Array<tvm::transform::Pass, void>)
+ at ../src/driver/driver_api.cc:276
+ 10: tvm::transform::Pass::operator()(tvm::IRModule) const
+ at ../src/ir/transform.cc:258
+ 9: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/ir/transform.cc:274
+ 8: tvm::transform::SequentialNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/ir/transform.cc:454
+ 7: tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/ir/transform.cc:274
+ 6: tvm::tir::transform::PrimFuncPassNode::operator()(tvm::IRModule, tvm::transform::PassContext const&) const
+ at ../src/tir/ir/transform.cc:100
+ 5: tvm::runtime::TypedPackedFunc<tvm::tir::PrimFunc (tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext)>::operator()(tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext) const
+ at ../include/tvm/runtime/packed_func.h:1749
+ 4: tvm::tir::PrimFunc tvm::runtime::detail::typed_packed_call_dispatcher<tvm::tir::PrimFunc>::run<tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext>(tvm::runtime::PackedFunc const&, tvm::tir::PrimFunc&&, tvm::IRModule&&, tvm::transform::PassContext&&)
+ at ../include/tvm/runtime/packed_func.h:1693
+ 3: tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<tvm::tir::PrimFunc, tvm::IRModule, tvm::transform::PassContext>(tvm::tir::PrimFunc&&, tvm::IRModule&&, tvm::transform::PassContext&&) const
+ at ../include/tvm/runtime/packed_func.h:1617
+ 2: tvm::runtime::PackedFuncObj::CallPacked(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const
+ at ../include/tvm/runtime/packed_func.h:1217
+ 1: Call
+ at ../include/tvm/runtime/packed_func.h:1213
+ 0: operator()
+ at ../src/runtime/c_runtime_api.cc:534
+ File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
+ File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
+ raise InstantiationError("Skipped because of invalid gpu kernel")
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 4, 64]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 64, 2]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 1)],None,9930347
+ No: 4 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -391,8 +515,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 32, 2, 4]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 128]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,5212353
- No: 2 GFLOPS: 0.00/0.00 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 8, 1]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 256, 2]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 1)],None,9744270
+ No: 5 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -514,8 +638,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 2, 16]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 2, 16]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 0), ('unroll_explicit', 1)],None,5933573
- No: 3 GFLOPS: 0.00/0.00 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 2, 16]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 256, 2]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 0), ('unroll_explicit', 0)],None,1034173
+ No: 6 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -637,8 +761,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 16, 4, 1]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 4, 128]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2698103
- No: 4 GFLOPS: 0.00/0.00 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 4, 128, 1]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 1, 64]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 0), ('unroll_explicit', 1)],None,6160711
+ No: 7 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -760,8 +884,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 128, 1, 1]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 8, 8]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2816887
- No: 5 GFLOPS: 0.00/0.00 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 2, 16]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 8, 64]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 1]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 1)],None,9077150
+ No: 8 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -883,10 +1007,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 64, 2, 4]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 16, 8]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 1)],None,9596954
- No: 6 GFLOPS: 32.92/32.92 result: MeasureResult(costs=(0.0070322024210526315,), error_no=MeasureErrorNo.NO_ERROR, all_cost=2.8089404106140137, timestamp=1673527189.1834989) [('tile_f', [-1, 8, 4, 2]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 4, 4]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,4723475
- No: 7 GFLOPS: 52.67/52.67 result: MeasureResult(costs=(0.004394959130434782,), error_no=MeasureErrorNo.NO_ERROR, all_cost=1.5802834033966064, timestamp=1673527190.8827152) [('tile_f', [-1, 1, 16, 4]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 1, 4]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2974306
- No: 8 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 256, 2, 1]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 4, 32]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,7893838
+ No: 9 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1008,8 +1130,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 8, 32]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 1, 512]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2901557
- No: 9 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 16, 2]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 64, 8]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,8444128
+ No: 10 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1131,8 +1253,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 1, 16]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 256]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,8514824
- No: 10 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 16, 16, 2]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 512, 1]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 1)],None,10099629
+ No: 11 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1254,8 +1376,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 16, 32]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 2, 16]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,7868279
- No: 11 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 4, 8, 8]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 1, 128]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 1]), ('auto_unroll_max_step', 0), ('unroll_explicit', 0)],None,368656
+ No: 12 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1377,8 +1499,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 256, 1, 1]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 32]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,7890968
- No: 12 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 2, 256]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 64, 4]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,4931298
+ No: 13 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1500,8 +1622,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 2, 2, 128]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 32, 1]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 1]), ('auto_unroll_max_step', 0), ('unroll_explicit', 1)],None,5439054
- No: 13 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 16, 2]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 8, 8]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,3399308
+ No: 14 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1623,8 +1745,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 64, 1, 2]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 128, 2]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 0), ('unroll_explicit', 1)],None,6451121
- No: 14 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 4, 4, 4]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 1, 512]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,4837257
+ No: 15 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1746,8 +1868,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 1, 4]), ('tile_y', [-1, 1, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 32]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2857463
- No: 15 GFLOPS: 0.00/52.67 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 8, 4, 8]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 32, 2]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 0), ('unroll_explicit', 1)],None,6443072
+ No: 16 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1869,11 +1991,9 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 1, 2, 64]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 16]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,8451064
- No: 16 GFLOPS: 6.61/52.67 result: MeasureResult(costs=(0.03504660025,), error_no=MeasureErrorNo.NO_ERROR, all_cost=2.2085013389587402, timestamp=1673527193.5304637) [('tile_f', [-1, 1, 2, 64]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 8, 1]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,4270184
- No: 17 GFLOPS: 286.54/286.54 result: MeasureResult(costs=(0.0008079133714285714,), error_no=MeasureErrorNo.NO_ERROR, all_cost=1.4872074127197266, timestamp=1673527197.7835398) [('tile_f', [-1, 2, 4, 2]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 2]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,5075473
- No: 18 GFLOPS: 7.34/286.54 result: MeasureResult(costs=(0.03153664,), error_no=MeasureErrorNo.NO_ERROR, all_cost=4.024663209915161, timestamp=1673527198.626702) [('tile_f', [-1, 8, 4, 2]), ('tile_y', [-1, 1, 1, 7]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 8, 1]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2337135
- No: 19 GFLOPS: 0.00/286.54 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 4, 8, 8]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 8, 4]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 1)],None,8017396
+ No: 17 GFLOPS: 44.20/192.03 result: MeasureResult(costs=(0.0052372528,), error_no=MeasureErrorNo.NO_ERROR, all_cost=1.3321595191955566, timestamp=1673549983.6704915) [('tile_f', [-1, 8, 64, 1]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 1]), ('tile_rc', [-1, 1, 2]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,4682088
+ No: 18 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -1995,8 +2115,8 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 2, 4, 64]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 1, 512]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 1]), ('auto_unroll_max_step', 0), ('unroll_explicit', 1)],None,5614168
- No: 20 GFLOPS: 0.00/286.54 result: Traceback (most recent call last):
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 4, 64, 1]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 7, 1]), ('tile_rc', [-1, 1, 128]), ('tile_ry', [-1, 1, 1]), ('tile_rx', [-1, 1, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,1917127
+ No: 19 GFLOPS: 0.00/192.03 result: Traceback (most recent call last):
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 592, in __call__
func, arg_info = _build_func_common(measure_input, self.runtime, **kwargs)
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 544, in _build_func_common
@@ -2118,17 +2238,18 @@ for this template
File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in tvm._ffi._cy3.core.tvm_callback
File "/workspace/python/tvm/autotvm/measure/measure_methods.py", line 875, in verify_pass
raise InstantiationError("Skipped because of invalid gpu kernel")
- tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 4, 4, 1]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 128]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 1)],None,10439901
+ tvm.autotvm.task.space.InstantiationError: Skipped because of invalid gpu kernel [('tile_f', [-1, 2, 8, 1]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 7, 1, 1]), ('tile_rc', [-1, 1, 256]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 0), ('unroll_explicit', 0)],None,1733188
+ No: 20 GFLOPS: 1.84/192.03 result: MeasureResult(costs=(0.12584999825,), error_no=MeasureErrorNo.NO_ERROR, all_cost=2.7848405838012695, timestamp=1673549985.7247705) [('tile_f', [-1, 1, 1, 1]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 16, 8]), ('tile_ry', [-1, 3, 1]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,3209580
-.. GENERATED FROM PYTHON SOURCE LINES 220-222
+.. GENERATED FROM PYTHON SOURCE LINES 216-218
Finally we can inspect the best config from log file, check correctness,
and measure running time.
-.. GENERATED FROM PYTHON SOURCE LINES 222-252
+.. GENERATED FROM PYTHON SOURCE LINES 218-248
.. code-block:: default
@@ -2173,9 +2294,9 @@ and measure running time.
Finish loading 20 records
Best config:
- [('tile_f', [-1, 2, 4, 2]), ('tile_y', [-1, 1, 7, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 2, 2]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 1, 3]), ('auto_unroll_max_step', 1500), ('unroll_explicit', 0)],None,5075473
+ [('tile_f', [-1, 1, 16, 2]), ('tile_y', [-1, 7, 1, 1]), ('tile_x', [-1, 1, 1, 7]), ('tile_rc', [-1, 4, 1]), ('tile_ry', [-1, 1, 3]), ('tile_rx', [-1, 3, 1]), ('auto_unroll_max_step', 512), ('unroll_explicit', 0)],None,2720385
Finish loading 20 records
- Time cost of this operator: 0.000877
+ Time cost of this operator: 0.001556
diff --git a/docs/_sources/how_to/tune_with_autotvm/tune_relay_arm.rst.txt b/docs/_sources/how_to/tune_with_autotvm/tune_relay_arm.rst.txt
index 73498fa33b..5cf88f4fe8 100644
--- a/docs/_sources/how_to/tune_with_autotvm/tune_relay_arm.rst.txt
+++ b/docs/_sources/how_to/tune_with_autotvm/tune_relay_arm.rst.txt
@@ -92,7 +92,7 @@ Now return to python code. Import packages.
-.. GENERATED FROM PYTHON SOURCE LINES 82-87
+.. GENERATED FROM PYTHON SOURCE LINES 77-82
Define network
--------------
@@ -100,7 +100,7 @@ First we need to define the network in relay frontend API.
We can load some pre-defined network from :code:`relay.testing`.
We can also load models from MXNet, ONNX and TensorFlow.
-.. GENERATED FROM PYTHON SOURCE LINES 87-130
+.. GENERATED FROM PYTHON SOURCE LINES 82-125
.. code-block:: default
@@ -154,7 +154,7 @@ We can also load models from MXNet, ONNX and TensorFlow.
-.. GENERATED FROM PYTHON SOURCE LINES 131-155
+.. GENERATED FROM PYTHON SOURCE LINES 126-150
Start RPC Tracker
-----------------
@@ -181,7 +181,7 @@ The expected output is
INFO:RPCTracker:bind to 0.0.0.0:9190
-.. GENERATED FROM PYTHON SOURCE LINES 157-199
+.. GENERATED FROM PYTHON SOURCE LINES 152-194
Register Devices to RPC Tracker
-----------------------------------
@@ -226,7 +226,7 @@ the output can be
You can register multiple devices to the tracker to accelerate the measurement in tuning.
-.. GENERATED FROM PYTHON SOURCE LINES 201-206
+.. GENERATED FROM PYTHON SOURCE LINES 196-201
Set Tuning Options
------------------
@@ -234,7 +234,7 @@ Before tuning, we should apply some configurations. Here I use an RK3399 board
as example. In your setting, you should modify the target and device_key accordingly.
set :code:`use_android` to True if you use android phone.
-.. GENERATED FROM PYTHON SOURCE LINES 206-241
+.. GENERATED FROM PYTHON SOURCE LINES 201-236
.. code-block:: default
@@ -280,7 +280,7 @@ set :code:`use_android` to True if you use android phone.
-.. GENERATED FROM PYTHON SOURCE LINES 242-254
+.. GENERATED FROM PYTHON SOURCE LINES 237-249
.. note:: How to set tuning options
@@ -295,7 +295,7 @@ set :code:`use_android` to True if you use android phone.
optimization in general. For example, on ARM CPU A53 2.0GHz, we find it could boost 1.6x
performance of depthwise convolution on Mobilenet V1 model.
-.. GENERATED FROM PYTHON SOURCE LINES 257-263
+.. GENERATED FROM PYTHON SOURCE LINES 252-258
Begin Tuning
------------
@@ -304,7 +304,7 @@ Here, we provide a simple utility function to tune a list of tasks.
This function is just an initial implementation which tunes them in sequential order.
We will introduce a more sophisticated tuning scheduler in the future.
-.. GENERATED FROM PYTHON SOURCE LINES 263-321
+.. GENERATED FROM PYTHON SOURCE LINES 258-316
.. code-block:: default
@@ -373,11 +373,11 @@ We will introduce a more sophisticated tuning scheduler in the future.
-.. GENERATED FROM PYTHON SOURCE LINES 322-323
+.. GENERATED FROM PYTHON SOURCE LINES 317-318
Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 323-376
+.. GENERATED FROM PYTHON SOURCE LINES 318-371
.. code-block:: default
@@ -441,7 +441,7 @@ Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 377-404
+.. GENERATED FROM PYTHON SOURCE LINES 372-399
Sample Output
-------------
@@ -471,7 +471,7 @@ It takes about 2 hours on a 32T AMD Ryzen Threadripper.
Evaluate inference time cost...
Mean inference time (std dev): 162.59 ms (0.06 ms)
-.. GENERATED FROM PYTHON SOURCE LINES 406-422
+.. GENERATED FROM PYTHON SOURCE LINES 401-417
.. note:: **Experiencing Difficulties?**
diff --git a/docs/_sources/how_to/tune_with_autotvm/tune_relay_cuda.rst.txt b/docs/_sources/how_to/tune_with_autotvm/tune_relay_cuda.rst.txt
index 862e5ba774..e057da6185 100644
--- a/docs/_sources/how_to/tune_with_autotvm/tune_relay_cuda.rst.txt
+++ b/docs/_sources/how_to/tune_with_autotvm/tune_relay_cuda.rst.txt
@@ -66,12 +66,11 @@ as FFI of tvm. In the root directory of tvm, execute:
Now return to python code. Import packages.
-.. GENERATED FROM PYTHON SOURCE LINES 61-73
+.. GENERATED FROM PYTHON SOURCE LINES 61-72
.. code-block:: default
-
import os
import numpy as np
@@ -89,7 +88,7 @@ Now return to python code. Import packages.
-.. GENERATED FROM PYTHON SOURCE LINES 80-85
+.. GENERATED FROM PYTHON SOURCE LINES 76-81
Define Network
--------------
@@ -97,7 +96,7 @@ First we need to define the network in relay frontend API.
We can load some pre-defined network from :code:`tvm.relay.testing`.
We can also load models from MXNet, ONNX and TensorFlow.
-.. GENERATED FROM PYTHON SOURCE LINES 85-128
+.. GENERATED FROM PYTHON SOURCE LINES 81-124
.. code-block:: default
@@ -151,13 +150,13 @@ We can also load models from MXNet, ONNX and TensorFlow.
-.. GENERATED FROM PYTHON SOURCE LINES 129-132
+.. GENERATED FROM PYTHON SOURCE LINES 125-128
Set Tuning Options
------------------
Before tuning, we apply some configurations.
-.. GENERATED FROM PYTHON SOURCE LINES 132-152
+.. GENERATED FROM PYTHON SOURCE LINES 128-148
.. code-block:: default
@@ -195,7 +194,7 @@ Before tuning, we apply some configurations.
-.. GENERATED FROM PYTHON SOURCE LINES 153-163
+.. GENERATED FROM PYTHON SOURCE LINES 149-159
.. note:: How to set tuning options
@@ -208,7 +207,7 @@ Before tuning, we apply some configurations.
accelerate the tuning process. (see the 'Scale up measurement` section below).
-.. GENERATED FROM PYTHON SOURCE LINES 166-172
+.. GENERATED FROM PYTHON SOURCE LINES 162-168
Begin Tuning
------------
@@ -217,7 +216,7 @@ Here, we provide a simple utility function to tune a list of tasks.
This function is just an initial implementation which tunes them in sequential order.
We will introduce a more sophisticated tuning scheduler in the future.
-.. GENERATED FROM PYTHON SOURCE LINES 172-224
+.. GENERATED FROM PYTHON SOURCE LINES 168-220
.. code-block:: default
@@ -280,11 +279,11 @@ We will introduce a more sophisticated tuning scheduler in the future.
-.. GENERATED FROM PYTHON SOURCE LINES 225-226
+.. GENERATED FROM PYTHON SOURCE LINES 221-222
Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 226-262
+.. GENERATED FROM PYTHON SOURCE LINES 222-258
.. code-block:: default
@@ -331,7 +330,7 @@ Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 263-296
+.. GENERATED FROM PYTHON SOURCE LINES 259-292
Sample Output
-------------
@@ -367,7 +366,7 @@ The tuning target is NVIDIA 1080 Ti.
As a reference baseline, the time cost of MXNet + TensorRT on resnet-18 is 1.30ms. So we are a little faster.
-.. GENERATED FROM PYTHON SOURCE LINES 298-314
+.. GENERATED FROM PYTHON SOURCE LINES 294-310
.. note:: **Experiencing Difficulties?**
@@ -386,11 +385,11 @@ As a reference baseline, the time cost of MXNet + TensorRT on resnet-18 is 1.30m
Finally, always feel free to ask our community for help on https://discuss.tvm.apache.org
-.. GENERATED FROM PYTHON SOURCE LINES 317-318
+.. GENERATED FROM PYTHON SOURCE LINES 313-314
.. _tutorials-autotvm-scale-up-rpc-tracker:
-.. GENERATED FROM PYTHON SOURCE LINES 320-373
+.. GENERATED FROM PYTHON SOURCE LINES 316-369
Scale up measurement by using multiple devices
----------------------------------------------
@@ -446,7 +445,7 @@ For example, if we have four 1080ti, two titanx and one gfx900, the output can b
Finally, we need to change the tuning option to use RPCRunner. Use the code below
to replace the corresponding part above.
-.. GENERATED FROM PYTHON SOURCE LINES 373-392
+.. GENERATED FROM PYTHON SOURCE LINES 369-388
.. code-block:: default
diff --git a/docs/_sources/how_to/tune_with_autotvm/tune_relay_mobile_gpu.rst.txt b/docs/_sources/how_to/tune_with_autotvm/tune_relay_mobile_gpu.rst.txt
index 81346a3802..c98fbaa259 100644
--- a/docs/_sources/how_to/tune_with_autotvm/tune_relay_mobile_gpu.rst.txt
+++ b/docs/_sources/how_to/tune_with_autotvm/tune_relay_mobile_gpu.rst.txt
@@ -91,7 +91,7 @@ Now return to python code. Import packages.
-.. GENERATED FROM PYTHON SOURCE LINES 81-86
+.. GENERATED FROM PYTHON SOURCE LINES 76-81
Define network
--------------
@@ -99,7 +99,7 @@ First we need to define the network in relay frontend API.
We can load some pre-defined network from :code:`relay.testing`.
We can also load models from MXNet, ONNX and TensorFlow.
-.. GENERATED FROM PYTHON SOURCE LINES 86-129
+.. GENERATED FROM PYTHON SOURCE LINES 81-124
.. code-block:: default
@@ -153,11 +153,11 @@ We can also load models from MXNet, ONNX and TensorFlow.
-.. GENERATED FROM PYTHON SOURCE LINES 130-131
+.. GENERATED FROM PYTHON SOURCE LINES 125-126
.. _tutorials-autotvm-start-rpc-tracker:
-.. GENERATED FROM PYTHON SOURCE LINES 133-157
+.. GENERATED FROM PYTHON SOURCE LINES 128-152
Start RPC Tracker
-----------------
@@ -184,7 +184,7 @@ The expected output is
INFO:RPCTracker:bind to 0.0.0.0:9190
-.. GENERATED FROM PYTHON SOURCE LINES 159-201
+.. GENERATED FROM PYTHON SOURCE LINES 154-196
Register Devices to RPC Tracker
-----------------------------------
@@ -229,7 +229,7 @@ the output can be
You can register multiple devices to the tracker to accelerate the measurement in tuning.
-.. GENERATED FROM PYTHON SOURCE LINES 203-208
+.. GENERATED FROM PYTHON SOURCE LINES 198-203
Set Tuning Options
------------------
@@ -237,7 +237,7 @@ Before tuning, we should apply some configurations. Here I use an RK3399 board
as example. In your setting, you should modify the target and device_key accordingly.
set :code:`use_android` to True if you use android phone.
-.. GENERATED FROM PYTHON SOURCE LINES 208-242
+.. GENERATED FROM PYTHON SOURCE LINES 203-237
.. code-block:: default
@@ -282,7 +282,7 @@ set :code:`use_android` to True if you use android phone.
-.. GENERATED FROM PYTHON SOURCE LINES 243-251
+.. GENERATED FROM PYTHON SOURCE LINES 238-246
.. note:: How to set tuning options
@@ -293,7 +293,7 @@ set :code:`use_android` to True if you use android phone.
set timeout larger.
-.. GENERATED FROM PYTHON SOURCE LINES 254-260
+.. GENERATED FROM PYTHON SOURCE LINES 249-255
Begin Tuning
------------
@@ -302,7 +302,7 @@ Here, we provide a simple utility function to tune a list of tasks.
This function is just an initial implementation which tunes them in sequential order.
We will introduce a more sophisticated tuning scheduler in the future.
-.. GENERATED FROM PYTHON SOURCE LINES 260-312
+.. GENERATED FROM PYTHON SOURCE LINES 255-307
.. code-block:: default
@@ -365,11 +365,11 @@ We will introduce a more sophisticated tuning scheduler in the future.
-.. GENERATED FROM PYTHON SOURCE LINES 313-314
+.. GENERATED FROM PYTHON SOURCE LINES 308-309
Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 314-369
+.. GENERATED FROM PYTHON SOURCE LINES 309-364
.. code-block:: default
@@ -435,7 +435,7 @@ Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 370-402
+.. GENERATED FROM PYTHON SOURCE LINES 365-397
Sample Output
-------------
@@ -470,7 +470,7 @@ One sample output is listed below. It takes about 3 hours on a 32T AMD Ryzen Thr
Mean inference time (std dev): 128.05 ms (7.74 ms)
-.. GENERATED FROM PYTHON SOURCE LINES 404-420
+.. GENERATED FROM PYTHON SOURCE LINES 399-415
.. note:: **Experiencing Difficulties?**
diff --git a/docs/_sources/how_to/tune_with_autotvm/tune_relay_x86.rst.txt b/docs/_sources/how_to/tune_with_autotvm/tune_relay_x86.rst.txt
index a6ec2b99c4..85e36452c6 100644
--- a/docs/_sources/how_to/tune_with_autotvm/tune_relay_x86.rst.txt
+++ b/docs/_sources/how_to/tune_with_autotvm/tune_relay_x86.rst.txt
@@ -57,7 +57,7 @@ __name__ == "__main__":` block.
-.. GENERATED FROM PYTHON SOURCE LINES 48-56
+.. GENERATED FROM PYTHON SOURCE LINES 43-51
Define network
--------------
@@ -68,7 +68,7 @@ We can also load models from MXNet, ONNX and TensorFlow.
In this tutorial, we choose resnet-18 as tuning example.
-.. GENERATED FROM PYTHON SOURCE LINES 56-122
+.. GENERATED FROM PYTHON SOURCE LINES 51-117
.. code-block:: default
@@ -145,7 +145,7 @@ In this tutorial, we choose resnet-18 as tuning example.
-.. GENERATED FROM PYTHON SOURCE LINES 123-139
+.. GENERATED FROM PYTHON SOURCE LINES 118-134
Configure tensor tuning settings and create tasks
-------------------------------------------------
@@ -164,7 +164,7 @@ times and use the average of results. In addition, we need to flush the cache
for the weight tensors between repeated measurements. This can make the measured
latency of one operator closer to its actual latency during end-to-end inference.
-.. GENERATED FROM PYTHON SOURCE LINES 139-199
+.. GENERATED FROM PYTHON SOURCE LINES 134-194
.. code-block:: default
@@ -235,11 +235,11 @@ latency of one operator closer to its actual latency during end-to-end inference
-.. GENERATED FROM PYTHON SOURCE LINES 200-201
+.. GENERATED FROM PYTHON SOURCE LINES 195-196
Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 201-256
+.. GENERATED FROM PYTHON SOURCE LINES 196-251
.. code-block:: default
@@ -305,7 +305,7 @@ Finally, we launch tuning jobs and evaluate the end-to-end performance.
-.. GENERATED FROM PYTHON SOURCE LINES 257-305
+.. GENERATED FROM PYTHON SOURCE LINES 252-300
Sample Output
-------------
diff --git a/docs/_sources/how_to/work_with_microtvm/micro_aot.rst.txt b/docs/_sources/how_to/work_with_microtvm/micro_aot.rst.txt
index 7f2845ac66..180afb8e9a 100644
--- a/docs/_sources/how_to/work_with_microtvm/micro_aot.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/micro_aot.rst.txt
@@ -62,23 +62,23 @@ or on Zephyr platform on a microcontroller/board supported by Zephyr.
-.. GENERATED FROM PYTHON SOURCE LINES 53-55
+.. GENERATED FROM PYTHON SOURCE LINES 48-50
.. include:: ../../../../gallery/how_to/work_with_microtvm/install_zephyr.rst
-.. GENERATED FROM PYTHON SOURCE LINES 58-60
+.. GENERATED FROM PYTHON SOURCE LINES 53-55
.. include:: ../../../../gallery/how_to/work_with_microtvm/install_cmsis.rst
-.. GENERATED FROM PYTHON SOURCE LINES 63-66
+.. GENERATED FROM PYTHON SOURCE LINES 58-61
Import Python dependencies
-------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 66-75
+.. GENERATED FROM PYTHON SOURCE LINES 61-70
.. code-block:: default
@@ -98,7 +98,7 @@ Import Python dependencies
-.. GENERATED FROM PYTHON SOURCE LINES 76-86
+.. GENERATED FROM PYTHON SOURCE LINES 71-81
Import a TFLite model
---------------------
@@ -111,7 +111,7 @@ To test this model, we use samples from `KWS dataset provided by Google <https:/
you need to export `TVM_MICRO_USE_HW` environment variable.
-.. GENERATED FROM PYTHON SOURCE LINES 86-107
+.. GENERATED FROM PYTHON SOURCE LINES 81-102
.. code-block:: default
@@ -143,7 +143,7 @@ you need to export `TVM_MICRO_USE_HW` environment variable.
-.. GENERATED FROM PYTHON SOURCE LINES 108-118
+.. GENERATED FROM PYTHON SOURCE LINES 103-113
Defining the target
-------------------
@@ -156,7 +156,7 @@ board (E.g. nucleo_l4r5zi) and pass it to `tvm.target.target.micro` to create a
micro target.
-.. GENERATED FROM PYTHON SOURCE LINES 118-137
+.. GENERATED FROM PYTHON SOURCE LINES 113-132
.. code-block:: default
@@ -186,7 +186,7 @@ micro target.
-.. GENERATED FROM PYTHON SOURCE LINES 138-143
+.. GENERATED FROM PYTHON SOURCE LINES 133-138
Compile the model
-----------------
@@ -194,7 +194,7 @@ Compile the model
Now, we compile the model for the target:
-.. GENERATED FROM PYTHON SOURCE LINES 143-148
+.. GENERATED FROM PYTHON SOURCE LINES 138-143
.. code-block:: default
@@ -210,7 +210,7 @@ Now, we compile the model for the target:
-.. GENERATED FROM PYTHON SOURCE LINES 149-157
+.. GENERATED FROM PYTHON SOURCE LINES 144-152
Create a microTVM project
-------------------------
@@ -221,7 +221,7 @@ CRT and Zephyr microTVM template projects which are used for x86 CPU and Zephyr
respectively.
-.. GENERATED FROM PYTHON SOURCE LINES 157-177
+.. GENERATED FROM PYTHON SOURCE LINES 152-172
.. code-block:: default
@@ -252,7 +252,7 @@ respectively.
-.. GENERATED FROM PYTHON SOURCE LINES 178-186
+.. GENERATED FROM PYTHON SOURCE LINES 173-181
Build, flash and execute the model
----------------------------------
@@ -263,7 +263,7 @@ Next, we define the labels for the model output and execute the model with a
sample with expected value of 6 (label: left).
-.. GENERATED FROM PYTHON SOURCE LINES 186-210
+.. GENERATED FROM PYTHON SOURCE LINES 181-205
.. code-block:: default
diff --git a/docs/_sources/how_to/work_with_microtvm/micro_autotune.rst.txt b/docs/_sources/how_to/work_with_microtvm/micro_autotune.rst.txt
index d6f4d5b28a..84f85e7036 100644
--- a/docs/_sources/how_to/work_with_microtvm/micro_autotune.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/micro_autotune.rst.txt
@@ -56,23 +56,23 @@ This tutorial explains how to autotune a model using the C runtime.
-.. GENERATED FROM PYTHON SOURCE LINES 48-50
+.. GENERATED FROM PYTHON SOURCE LINES 43-45
.. include:: ../../../../gallery/how_to/work_with_microtvm/install_zephyr.rst
-.. GENERATED FROM PYTHON SOURCE LINES 53-55
+.. GENERATED FROM PYTHON SOURCE LINES 48-50
.. include:: ../../../../gallery/how_to/work_with_microtvm/install_cmsis.rst
-.. GENERATED FROM PYTHON SOURCE LINES 58-61
+.. GENERATED FROM PYTHON SOURCE LINES 53-56
Import Python dependencies
-------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 61-68
+.. GENERATED FROM PYTHON SOURCE LINES 56-63
.. code-block:: default
@@ -90,7 +90,7 @@ Import Python dependencies
-.. GENERATED FROM PYTHON SOURCE LINES 69-75
+.. GENERATED FROM PYTHON SOURCE LINES 64-70
Defining the model
###################
@@ -99,7 +99,7 @@ Defining the model
fill parameters with random numbers.
-.. GENERATED FROM PYTHON SOURCE LINES 75-100
+.. GENERATED FROM PYTHON SOURCE LINES 70-95
.. code-block:: default
@@ -135,7 +135,7 @@ Defining the model
-.. GENERATED FROM PYTHON SOURCE LINES 101-112
+.. GENERATED FROM PYTHON SOURCE LINES 96-107
Defining the target
######################
@@ -149,7 +149,7 @@ Defining the target
this tutorial.
-.. GENERATED FROM PYTHON SOURCE LINES 112-130
+.. GENERATED FROM PYTHON SOURCE LINES 107-125
.. code-block:: default
@@ -178,7 +178,7 @@ Defining the target
-.. GENERATED FROM PYTHON SOURCE LINES 131-140
+.. GENERATED FROM PYTHON SOURCE LINES 126-135
Extracting tuning tasks
########################
@@ -190,7 +190,7 @@ Extracting tuning tasks
transformation passes; we'll apply the same configuration later on during autotuning.
-.. GENERATED FROM PYTHON SOURCE LINES 140-146
+.. GENERATED FROM PYTHON SOURCE LINES 135-141
.. code-block:: default
@@ -207,7 +207,7 @@ Extracting tuning tasks
-.. GENERATED FROM PYTHON SOURCE LINES 147-157
+.. GENERATED FROM PYTHON SOURCE LINES 142-152
Configuring microTVM
#####################
@@ -220,7 +220,7 @@ Configuring microTVM
choose other options by choosing from `PLATFORM` list.
-.. GENERATED FROM PYTHON SOURCE LINES 157-195
+.. GENERATED FROM PYTHON SOURCE LINES 152-190
.. code-block:: default
@@ -269,14 +269,14 @@ Configuring microTVM
-.. GENERATED FROM PYTHON SOURCE LINES 196-200
+.. GENERATED FROM PYTHON SOURCE LINES 191-195
Run Autotuning
#########################
Now we can run autotuning separately on each extracted task on microTVM device.
-.. GENERATED FROM PYTHON SOURCE LINES 200-218
+.. GENERATED FROM PYTHON SOURCE LINES 195-213
.. code-block:: default
@@ -305,7 +305,7 @@ Run Autotuning
-.. GENERATED FROM PYTHON SOURCE LINES 219-225
+.. GENERATED FROM PYTHON SOURCE LINES 214-220
Timing the untuned program
###########################
@@ -314,7 +314,7 @@ Timing the untuned program
the tuned operator.
-.. GENERATED FROM PYTHON SOURCE LINES 225-264
+.. GENERATED FROM PYTHON SOURCE LINES 220-259
.. code-block:: default
@@ -368,21 +368,21 @@ Timing the untuned program
########## Build without Autotuning ##########
Node Name Ops Time(us) Time(%) Shape Inputs Outputs Measurements(us)
--------- --- -------- ------- ----- ------ ------- ----------------
- tvmgen_default_fused_nn_contrib_conv2d_NCHWc tvmgen_default_fused_nn_contrib_conv2d_NCHWc 311.0 98.48 (1, 2, 10, 10, 3) 2 1 [311.0]
- tvmgen_default_fused_layout_transform_1 tvmgen_default_fused_layout_transform_1 3.816 1.208 (1, 6, 10, 10) 1 1 [3.816]
- tvmgen_default_fused_layout_transform tvmgen_default_fused_layout_transform 0.985 0.312 (1, 1, 10, 10, 3) 1 1 [0.985]
- Total_time - 315.801 - - - - -
+ tvmgen_default_fused_nn_contrib_conv2d_NCHWc tvmgen_default_fused_nn_contrib_conv2d_NCHWc 309.6 98.712 (1, 2, 10, 10, 3) 2 1 [309.6]
+ tvmgen_default_fused_layout_transform_1 tvmgen_default_fused_layout_transform_1 3.07 0.979 (1, 6, 10, 10) 1 1 [3.07]
+ tvmgen_default_fused_layout_transform tvmgen_default_fused_layout_transform 0.968 0.309 (1, 1, 10, 10, 3) 1 1 [0.968]
+ Total_time - 313.638 - - - - -
-.. GENERATED FROM PYTHON SOURCE LINES 265-268
+.. GENERATED FROM PYTHON SOURCE LINES 260-263
Timing the tuned program
#########################
Once autotuning completes, you can time execution of the entire program using the Debug Runtime:
-.. GENERATED FROM PYTHON SOURCE LINES 268-307
+.. GENERATED FROM PYTHON SOURCE LINES 263-302
.. code-block:: default
@@ -436,10 +436,10 @@ Timing the tuned program
########## Build with Autotuning ##########
Node Name Ops Time(us) Time(%) Shape Inputs Outputs Measurements(us)
--------- --- -------- ------- ----- ------ ------- ----------------
- tvmgen_default_fused_nn_contrib_conv2d_NCHWc tvmgen_default_fused_nn_contrib_conv2d_NCHWc 102.9 97.462 (1, 6, 10, 10, 1) 2 1 [102.9]
- tvmgen_default_fused_layout_transform_1 tvmgen_default_fused_layout_transform_1 1.834 1.737 (1, 6, 10, 10) 1 1 [1.834]
- tvmgen_default_fused_layout_transform tvmgen_default_fused_layout_transform 0.846 0.801 (1, 3, 10, 10, 1) 1 1 [0.846]
- Total_time - 105.58 - - - - -
+ tvmgen_default_fused_nn_contrib_conv2d_NCHWc tvmgen_default_fused_nn_contrib_conv2d_NCHWc 100.3 97.342 (1, 6, 10, 10, 1) 2 1 [100.3]
+ tvmgen_default_fused_layout_transform_1 tvmgen_default_fused_layout_transform_1 1.786 1.733 (1, 6, 10, 10) 1 1 [1.786]
+ tvmgen_default_fused_layout_transform tvmgen_default_fused_layout_transform 0.953 0.925 (1, 1, 10, 10, 3) 1 1 [0.953]
+ Total_time - 103.039 - - - - -
diff --git a/docs/_sources/how_to/work_with_microtvm/micro_ethosu.rst.txt b/docs/_sources/how_to/work_with_microtvm/micro_ethosu.rst.txt
index 02dd95d3dd..29b00cf734 100644
--- a/docs/_sources/how_to/work_with_microtvm/micro_ethosu.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/micro_ethosu.rst.txt
@@ -43,20 +43,7 @@ It provides a programmer's view that is suitable for software development.
In this tutorial, we will be compiling a MobileNet v1 model and instructing
TVM to offload operators to the Ethos(TM)-U55 where possible.
-.. GENERATED FROM PYTHON SOURCE LINES 39-41
-
-.. code-block:: default
-
-
-
-
-
-
-
-
-
-
-.. GENERATED FROM PYTHON SOURCE LINES 47-75
+.. GENERATED FROM PYTHON SOURCE LINES 42-70
Obtaining TVM
-------------
@@ -87,7 +74,7 @@ Typing ``tvmc`` on the command line should display the following:
TVMC - TVM driver command-line interface
-.. GENERATED FROM PYTHON SOURCE LINES 77-107
+.. GENERATED FROM PYTHON SOURCE LINES 72-102
Installing additional python dependencies
-----------------------------------------
@@ -120,7 +107,7 @@ These packages can be installed by running the following from the command line:
pip install -r requirements.txt
-.. GENERATED FROM PYTHON SOURCE LINES 109-129
+.. GENERATED FROM PYTHON SOURCE LINES 104-124
Obtaining the Model
-------------------
@@ -143,7 +130,7 @@ For this tutorial we will be using the model in Tflite format.
tar xvf mobilenet_v1_1.0_224_quant.tar
-.. GENERATED FROM PYTHON SOURCE LINES 131-157
+.. GENERATED FROM PYTHON SOURCE LINES 126-152
Compiling the model for Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU with CMSIS-NN
------------------------------------------------------------------------------------
@@ -172,7 +159,7 @@ on our target device using the TVM runtime.
--output-format=mlf
-.. GENERATED FROM PYTHON SOURCE LINES 159-187
+.. GENERATED FROM PYTHON SOURCE LINES 154-182
.. note:: Explanation of tvmc compile arguments:
@@ -203,7 +190,7 @@ on our target device using the TVM runtime.
* ``--output-format=mlf`` : Output should be generated in the Model Library Format.
-.. GENERATED FROM PYTHON SOURCE LINES 189-196
+.. GENERATED FROM PYTHON SOURCE LINES 184-191
.. note:: If you don't want to make use of the microNPU and want to offload
operators to CMSIS-NN only:
@@ -213,7 +200,7 @@ on our target device using the TVM runtime.
* Remove the microNPU config parameter ``--target-ethos-u-accelerator_config=ethos-u55-256``
-.. GENERATED FROM PYTHON SOURCE LINES 198-205
+.. GENERATED FROM PYTHON SOURCE LINES 193-200
Extracting the generated code into the current directory
--------------------------------------------------------
@@ -223,7 +210,7 @@ Extracting the generated code into the current directory
tar xvf module.tar
-.. GENERATED FROM PYTHON SOURCE LINES 207-221
+.. GENERATED FROM PYTHON SOURCE LINES 202-216
Getting ImageNet labels
-----------------------
@@ -240,7 +227,7 @@ to include them in our C application later.
-o ./labels_mobilenet_quant_v1_224.txt
-.. GENERATED FROM PYTHON SOURCE LINES 223-241
+.. GENERATED FROM PYTHON SOURCE LINES 218-236
Getting the input image
-----------------------
@@ -261,7 +248,7 @@ in the next step to convert the image into an array of bytes in a C header file.
curl -sS https://s3.amazonaws.com/model-server/inputs/kitten.jpg -o ./kitten.jpg
-.. GENERATED FROM PYTHON SOURCE LINES 243-320
+.. GENERATED FROM PYTHON SOURCE LINES 238-315
Pre-processing the image
------------------------
@@ -341,7 +328,7 @@ Run the script from the command line:
python convert_image.py ./kitten.jpg
-.. GENERATED FROM PYTHON SOURCE LINES 322-367
+.. GENERATED FROM PYTHON SOURCE LINES 317-362
Pre-processing the labels
-------------------------
@@ -389,7 +376,7 @@ Run the script from the command line:
python convert_labels.py
-.. GENERATED FROM PYTHON SOURCE LINES 369-441
+.. GENERATED FROM PYTHON SOURCE LINES 364-436
Writing the demo application
----------------------------
@@ -464,14 +451,14 @@ In addition, you will need these header files from github in your ``./include``
`include files <https://github.com/apache/tvm/tree/main/apps/microtvm/ethosu/include>`_
-.. GENERATED FROM PYTHON SOURCE LINES 443-447
+.. GENERATED FROM PYTHON SOURCE LINES 438-442
.. note::
If you'd like to use FreeRTOS for task scheduling and queues, a sample application can be found here
`demo_freertos.c <https://github.com/apache/tvm/blob/main/apps/microtvm/ethosu/src/demo_freertos.c>`
-.. GENERATED FROM PYTHON SOURCE LINES 449-459
+.. GENERATED FROM PYTHON SOURCE LINES 444-454
Creating the linker script
--------------------------
@@ -484,7 +471,7 @@ placed in your working directory.
An example linker script for the FVP can be found here
`corstone300.ld <https://github.com/apache/tvm/blob/main/apps/microtvm/ethosu/corstone300.ld>`_
-.. GENERATED FROM PYTHON SOURCE LINES 461-468
+.. GENERATED FROM PYTHON SOURCE LINES 456-463
.. note::
@@ -494,7 +481,7 @@ An example linker script for the FVP can be found here
fit into the limited SRAM available. For this reason it's important that the
linker script places the ``ethosu_scratch`` section into DRAM (DDR).
-.. GENERATED FROM PYTHON SOURCE LINES 470-479
+.. GENERATED FROM PYTHON SOURCE LINES 465-474
.. note::
@@ -506,7 +493,7 @@ An example linker script for the FVP can be found here
``export PATH=/opt/arm/FVP_Corstone_SSE-300_Ethos-U55/models/Linux64_GCC-6.4:/opt/arm/cmake/bin:$PATH``
-.. GENERATED FROM PYTHON SOURCE LINES 481-489
+.. GENERATED FROM PYTHON SOURCE LINES 476-484
Building the demo application using make
----------------------------------------
@@ -517,7 +504,7 @@ in your working directory before running ``make`` on the command line:
An example Makefile can be found here:
`Makefile <https://github.com/apache/tvm/blob/main/apps/microtvm/ethosu/Makefile>`_
-.. GENERATED FROM PYTHON SOURCE LINES 491-496
+.. GENERATED FROM PYTHON SOURCE LINES 486-491
.. note::
@@ -525,7 +512,7 @@ An example Makefile can be found here:
``make FREERTOS_PATH=<FreeRTOS directory>``
-.. GENERATED FROM PYTHON SOURCE LINES 498-578
+.. GENERATED FROM PYTHON SOURCE LINES 493-573
Running the demo application
----------------------------
diff --git a/docs/_sources/how_to/work_with_microtvm/micro_pytorch.rst.txt b/docs/_sources/how_to/work_with_microtvm/micro_pytorch.rst.txt
index 6cbf8a36a5..c5bb0d7c12 100644
--- a/docs/_sources/how_to/work_with_microtvm/micro_pytorch.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/micro_pytorch.rst.txt
@@ -65,7 +65,7 @@ since the model would not fit on our current supported Zephyr boards.
-.. GENERATED FROM PYTHON SOURCE LINES 56-62
+.. GENERATED FROM PYTHON SOURCE LINES 51-57
Load a pre-trained PyTorch model
--------------------------------
@@ -74,7 +74,7 @@ To begin with, load pre-trained MobileNetV2 from torchvision. Then,
download a cat image and preprocess it to use as the model input.
-.. GENERATED FROM PYTHON SOURCE LINES 62-90
+.. GENERATED FROM PYTHON SOURCE LINES 57-85
.. code-block:: default
@@ -117,7 +117,7 @@ download a cat image and preprocess it to use as the model input.
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/torch/ao/quantization/utils.py:281: UserWarning: must run observer before calling calculate_qparams. Returning default values.
"must run observer before calling calculate_qparams. " +
Downloading: "https://download.pytorch.org/models/quantized/mobilenet_v2_qnnpack_37f702c5.pth" to /workspace/.cache/torch/hub/checkpoints/mobilenet_v2_qnnpack_37f702c5.pth
-
0%| | 0.00/3.42M [00:00<?, ?B/s]
61%|###### | 2.09M/3.42M [00:00<00:00, 14.9MB/s]
100%|##########| 3.42M/3.42M [00:00<00:00, 23.7MB/s]
+
0%| | 0.00/3.42M [00:00<?, ?B/s]
100%|##########| 3.42M/3.42M [00:00<00:00, 126MB/s]
/workspace/python/tvm/relay/frontend/pytorch_utils.py:47: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
return LooseVersion(torch_ver) > ver
/venv/apache-tvm-py3.7/lib/python3.7/site-packages/setuptools/_distutils/version.py:346: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
@@ -126,7 +126,7 @@ download a cat image and preprocess it to use as the model input.
-.. GENERATED FROM PYTHON SOURCE LINES 91-100
+.. GENERATED FROM PYTHON SOURCE LINES 86-95
Define Target, Runtime and Executor
-----------------------------------
@@ -138,7 +138,7 @@ for C runtime which can run on a x86 CPU machine with the same flow that
would run on a physical microcontroller.
-.. GENERATED FROM PYTHON SOURCE LINES 100-113
+.. GENERATED FROM PYTHON SOURCE LINES 95-108
.. code-block:: default
@@ -162,7 +162,7 @@ would run on a physical microcontroller.
-.. GENERATED FROM PYTHON SOURCE LINES 114-119
+.. GENERATED FROM PYTHON SOURCE LINES 109-114
Compile the model
------------------
@@ -170,7 +170,7 @@ Compile the model
Now, we compile the model for the target:
-.. GENERATED FROM PYTHON SOURCE LINES 119-128
+.. GENERATED FROM PYTHON SOURCE LINES 114-123
.. code-block:: default
@@ -190,7 +190,7 @@ Now, we compile the model for the target:
-.. GENERATED FROM PYTHON SOURCE LINES 129-135
+.. GENERATED FROM PYTHON SOURCE LINES 124-130
Create a microTVM project
-------------------------
@@ -199,7 +199,7 @@ Now that we have the compiled model as an IRModule, we need to create a firmware
to use the compiled model with microTVM. To do this, we use Project API.
-.. GENERATED FROM PYTHON SOURCE LINES 135-147
+.. GENERATED FROM PYTHON SOURCE LINES 130-142
.. code-block:: default
@@ -222,7 +222,7 @@ to use the compiled model with microTVM. To do this, we use Project API.
-.. GENERATED FROM PYTHON SOURCE LINES 148-154
+.. GENERATED FROM PYTHON SOURCE LINES 143-149
Build, flash and execute the model
----------------------------------
@@ -231,7 +231,7 @@ physical microcontroller and it is skipped if it is simulating a microcontroller
via the host `main.cc`` or if a Zephyr emulated board is selected as the target.
-.. GENERATED FROM PYTHON SOURCE LINES 154-165
+.. GENERATED FROM PYTHON SOURCE LINES 149-160
.. code-block:: default
@@ -253,14 +253,14 @@ via the host `main.cc`` or if a Zephyr emulated board is selected as the target.
-.. GENERATED FROM PYTHON SOURCE LINES 166-170
+.. GENERATED FROM PYTHON SOURCE LINES 161-165
Look up synset name
-------------------
Look up prediction top 1 index in 1000 class synset.
-.. GENERATED FROM PYTHON SOURCE LINES 170-211
+.. GENERATED FROM PYTHON SOURCE LINES 165-206
.. code-block:: default
@@ -322,7 +322,7 @@ Look up prediction top 1 index in 1000 class synset.
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 1 minutes 3.580 seconds)
+ **Total running time of the script:** ( 1 minutes 2.970 seconds)
.. _sphx_glr_download_how_to_work_with_microtvm_micro_pytorch.py:
diff --git a/docs/_sources/how_to/work_with_microtvm/micro_tflite.rst.txt b/docs/_sources/how_to/work_with_microtvm/micro_tflite.rst.txt
index 45ecb94a6a..dac4528729 100644
--- a/docs/_sources/how_to/work_with_microtvm/micro_tflite.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/micro_tflite.rst.txt
@@ -57,23 +57,23 @@ model with Relay.
-.. GENERATED FROM PYTHON SOURCE LINES 48-50
+.. GENERATED FROM PYTHON SOURCE LINES 43-45
.. include:: ../../../../gallery/how_to/work_with_microtvm/install_zephyr.rst
-.. GENERATED FROM PYTHON SOURCE LINES 53-55
+.. GENERATED FROM PYTHON SOURCE LINES 48-50
.. include:: ../../../../gallery/how_to/work_with_microtvm/install_cmsis.rst
-.. GENERATED FROM PYTHON SOURCE LINES 58-61
+.. GENERATED FROM PYTHON SOURCE LINES 53-56
Import Python dependencies
-------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 61-78
+.. GENERATED FROM PYTHON SOURCE LINES 56-73
.. code-block:: default
@@ -101,11 +101,11 @@ Import Python dependencies
-.. GENERATED FROM PYTHON SOURCE LINES 79-80
+.. GENERATED FROM PYTHON SOURCE LINES 74-75
Using the buffer, transform into a tflite model python object
-.. GENERATED FROM PYTHON SOURCE LINES 80-89
+.. GENERATED FROM PYTHON SOURCE LINES 75-84
.. code-block:: default
@@ -125,11 +125,11 @@ Using the buffer, transform into a tflite model python object
-.. GENERATED FROM PYTHON SOURCE LINES 90-91
+.. GENERATED FROM PYTHON SOURCE LINES 85-86
Print out the version of the model
-.. GENERATED FROM PYTHON SOURCE LINES 91-94
+.. GENERATED FROM PYTHON SOURCE LINES 86-89
.. code-block:: default
@@ -149,7 +149,7 @@ Print out the version of the model
-.. GENERATED FROM PYTHON SOURCE LINES 95-103
+.. GENERATED FROM PYTHON SOURCE LINES 90-98
Parse the python model object to convert it into a relay module
and weights.
@@ -160,7 +160,7 @@ If you are unsure what that might be, this can be discovered by using
the ``visualize.py`` script within the Tensorflow project.
See `How do I inspect a .tflite file? <https://www.tensorflow.org/lite/guide/faq>`_
-.. GENERATED FROM PYTHON SOURCE LINES 103-112
+.. GENERATED FROM PYTHON SOURCE LINES 98-107
.. code-block:: default
@@ -180,7 +180,7 @@ See `How do I inspect a .tflite file? <https://www.tensorflow.org/lite/guide/faq
-.. GENERATED FROM PYTHON SOURCE LINES 113-122
+.. GENERATED FROM PYTHON SOURCE LINES 108-117
Defining the target
-------------------
@@ -192,7 +192,7 @@ TARGET, the C Runtime as the RUNTIME and a proper board/VM to run it (Zephyr wil
QEMU VM based on BOARD. In the example below the x86 arch is selected and a x86 VM is picked up accordingly:
-.. GENERATED FROM PYTHON SOURCE LINES 122-152
+.. GENERATED FROM PYTHON SOURCE LINES 117-147
.. code-block:: default
@@ -233,11 +233,11 @@ QEMU VM based on BOARD. In the example below the x86 arch is selected and a x86
-.. GENERATED FROM PYTHON SOURCE LINES 153-154
+.. GENERATED FROM PYTHON SOURCE LINES 148-149
Now, compile the model for the target:
-.. GENERATED FROM PYTHON SOURCE LINES 154-244
+.. GENERATED FROM PYTHON SOURCE LINES 149-239
.. code-block:: default
@@ -368,14 +368,14 @@ Now, compile the model for the target:
-.. GENERATED FROM PYTHON SOURCE LINES 245-249
+.. GENERATED FROM PYTHON SOURCE LINES 240-244
Next, establish a session with the simulated device and run the
computation. The `with session` line would typically flash an attached
microcontroller, but in this tutorial, it simply launches a subprocess
to stand in for an attached microcontroller.
-.. GENERATED FROM PYTHON SOURCE LINES 249-266
+.. GENERATED FROM PYTHON SOURCE LINES 244-261
.. code-block:: default
diff --git a/docs/_sources/how_to/work_with_microtvm/micro_train.rst.txt b/docs/_sources/how_to/work_with_microtvm/micro_train.rst.txt
index 0e28741beb..c20ba796cb 100644
--- a/docs/_sources/how_to/work_with_microtvm/micro_train.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/micro_train.rst.txt
@@ -218,7 +218,7 @@ take about **2 minutes** to download the Stanford Cars, while COCO 2017 validati
.. code-block:: none
- '/tmp/tmpdhexwads/images/random'
+ '/tmp/tmpwguh0k5s/images/random'
@@ -309,7 +309,7 @@ objects to other stuff? We can display some examples from our datasets using ``m
.. image-sg:: /how_to/work_with_microtvm/images/sphx_glr_micro_train_001.png
- :alt: [0.0, 1.0], [0.0, 1.0], [0.0, 1.0], [0.0, 1.0], [0.0, 1.0], [1.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, 0.0], [1.0, 0.0]
+ :alt: [1.0, 0.0], [0.0, 1.0], [1.0, 0.0], [0.0, 1.0], [1.0, 0.0], [0.0, 1.0], [0.0, 1.0], [0.0, 1.0], [1.0, 0.0], [1.0, 0.0]
:srcset: /how_to/work_with_microtvm/images/sphx_glr_micro_train_001.png
:class: sphx-glr-single-img
@@ -318,8 +318,8 @@ objects to other stuff? We can display some examples from our datasets using ``m
.. code-block:: none
- /tmp/tmpdhexwads/images/target contains 8144 images
- /tmp/tmpdhexwads/images/random contains 5000 images
+ /tmp/tmpwguh0k5s/images/target contains 8144 images
+ /tmp/tmpwguh0k5s/images/random contains 5000 images
@@ -494,13 +494,13 @@ the time on our validation set).
.. code-block:: none
Epoch 1/3
- 328/328 - 48s - loss: 0.2087 - accuracy: 0.9265 - val_loss: 0.1439 - val_accuracy: 0.9573 - 48s/epoch - 145ms/step
+ 328/328 - 47s - loss: 0.2089 - accuracy: 0.9232 - val_loss: 0.1152 - val_accuracy: 0.9634 - 47s/epoch - 144ms/step
Epoch 2/3
- 328/328 - 44s - loss: 0.0962 - accuracy: 0.9646 - val_loss: 0.1218 - val_accuracy: 0.9626 - 44s/epoch - 133ms/step
+ 328/328 - 43s - loss: 0.0936 - accuracy: 0.9658 - val_loss: 0.1211 - val_accuracy: 0.9539 - 43s/epoch - 132ms/step
Epoch 3/3
- 328/328 - 44s - loss: 0.0702 - accuracy: 0.9742 - val_loss: 0.1025 - val_accuracy: 0.9634 - 44s/epoch - 133ms/step
+ 328/328 - 43s - loss: 0.0566 - accuracy: 0.9796 - val_loss: 0.1361 - val_accuracy: 0.9596 - 43s/epoch - 131ms/step
- <keras.callbacks.History object at 0x7f99566f59d0>
+ <keras.callbacks.History object at 0x7f9f6f64e490>
@@ -857,7 +857,7 @@ Arduino tutorial for how to do that `on GitHub <https://github.com/guberti/tvm-a
.. rst-class:: sphx-glr-timing
- **Total running time of the script:** ( 4 minutes 35.157 seconds)
+ **Total running time of the script:** ( 4 minutes 42.698 seconds)
.. _sphx_glr_download_how_to_work_with_microtvm_micro_train.py:
diff --git a/docs/_sources/how_to/work_with_microtvm/sg_execution_times.rst.txt b/docs/_sources/how_to/work_with_microtvm/sg_execution_times.rst.txt
index 354cbf9f15..e93a229d60 100644
--- a/docs/_sources/how_to/work_with_microtvm/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/work_with_microtvm/sg_execution_times.rst.txt
@@ -5,22 +5,22 @@
Computation times
=================
-**06:42.973** total execution time for **how_to_work_with_microtvm** files:
+**06:49.453** total execution time for **how_to_work_with_microtvm** files:
+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_train.py` (``micro_train.py``) | 04:35.157 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_train.py` (``micro_train.py``) | 04:42.698 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_pytorch.py` (``micro_pytorch.py``) | 01:03.580 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_pytorch.py` (``micro_pytorch.py``) | 01:02.970 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_autotune.py` (``micro_autotune.py``) | 00:52.392 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_autotune.py` (``micro_autotune.py``) | 00:51.863 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_aot.py` (``micro_aot.py``) | 00:07.950 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_aot.py` (``micro_aot.py``) | 00:08.028 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_tflite.py` (``micro_tflite.py``) | 00:03.892 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_tflite.py` (``micro_tflite.py``) | 00:03.895 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_reference_vm.py` (``micro_reference_vm.py``) | 00:00.001 | 0.0 MB |
-+---------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_microtvm_micro_ethosu.py` (``micro_ethosu.py``) | 00:00.001 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_ethosu.py` (``micro_ethosu.py``) | 00:00.000 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_how_to_work_with_microtvm_micro_tvmc.py` (``micro_tvmc.py``) | 00:00.000 | 0.0 MB |
+---------------------------------------------------------------------------------------------+-----------+--------+
+| :ref:`sphx_glr_how_to_work_with_microtvm_micro_reference_vm.py` (``micro_reference_vm.py``) | 00:00.000 | 0.0 MB |
++---------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/work_with_relay/build_gcn.rst.txt b/docs/_sources/how_to/work_with_relay/build_gcn.rst.txt
index 77ed2fb9dd..034564f8c8 100644
--- a/docs/_sources/how_to/work_with_relay/build_gcn.rst.txt
+++ b/docs/_sources/how_to/work_with_relay/build_gcn.rst.txt
@@ -216,14 +216,14 @@ Load the data and set up model parameters
-.. GENERATED FROM PYTHON SOURCE LINES 142-146
+.. GENERATED FROM PYTHON SOURCE LINES 137-141
Set up the DGL-PyTorch model and get the golden results
-------------------------------------------------------
The weights are trained with https://github.com/dmlc/dgl/blob/master/examples/pytorch/gcn/train.py
-.. GENERATED FROM PYTHON SOURCE LINES 146-162
+.. GENERATED FROM PYTHON SOURCE LINES 141-157
.. code-block:: default
@@ -260,12 +260,12 @@ The weights are trained with https://github.com/dmlc/dgl/blob/master/examples/py
-.. GENERATED FROM PYTHON SOURCE LINES 163-165
+.. GENERATED FROM PYTHON SOURCE LINES 158-160
Run the DGL model and test for accuracy
---------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 165-174
+.. GENERATED FROM PYTHON SOURCE LINES 160-169
.. code-block:: default
@@ -301,7 +301,7 @@ Run the DGL model and test for accuracy
-.. GENERATED FROM PYTHON SOURCE LINES 175-188
+.. GENERATED FROM PYTHON SOURCE LINES 170-183
Define Graph Convolution Layer in Relay
---------------------------------------
@@ -317,7 +317,7 @@ this method is temporary and will be updated in next few weeks when we have spar
= ((H * W)^t * A^t)^t
= ((W^t * H^t) * A^t)^t
-.. GENERATED FROM PYTHON SOURCE LINES 188-246
+.. GENERATED FROM PYTHON SOURCE LINES 183-241
.. code-block:: default
@@ -386,13 +386,13 @@ this method is temporary and will be updated in next few weeks when we have spar
-.. GENERATED FROM PYTHON SOURCE LINES 247-250
+.. GENERATED FROM PYTHON SOURCE LINES 242-245
Prepare the parameters needed in the GraphConv layers
-----------------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 250-283
+.. GENERATED FROM PYTHON SOURCE LINES 245-278
.. code-block:: default
@@ -443,12 +443,12 @@ Prepare the parameters needed in the GraphConv layers
-.. GENERATED FROM PYTHON SOURCE LINES 284-286
+.. GENERATED FROM PYTHON SOURCE LINES 279-281
Put layers together
-------------------
-.. GENERATED FROM PYTHON SOURCE LINES 286-325
+.. GENERATED FROM PYTHON SOURCE LINES 281-320
.. code-block:: default
@@ -505,14 +505,14 @@ Put layers together
-.. GENERATED FROM PYTHON SOURCE LINES 326-330
+.. GENERATED FROM PYTHON SOURCE LINES 321-325
Compile and run with TVM
------------------------
Export the weights from PyTorch model to Python Dict
-.. GENERATED FROM PYTHON SOURCE LINES 330-353
+.. GENERATED FROM PYTHON SOURCE LINES 325-348
.. code-block:: default
@@ -546,12 +546,12 @@ Export the weights from PyTorch model to Python Dict
-.. GENERATED FROM PYTHON SOURCE LINES 354-356
+.. GENERATED FROM PYTHON SOURCE LINES 349-351
Run the TVM model, test for accuracy and verify with DGL
--------------------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 356-370
+.. GENERATED FROM PYTHON SOURCE LINES 351-365
.. code-block:: default
diff --git a/docs/_sources/how_to/work_with_relay/sg_execution_times.rst.txt b/docs/_sources/how_to/work_with_relay/sg_execution_times.rst.txt
index 163442501b..c9170d8b6e 100644
--- a/docs/_sources/how_to/work_with_relay/sg_execution_times.rst.txt
+++ b/docs/_sources/how_to/work_with_relay/sg_execution_times.rst.txt
@@ -5,14 +5,14 @@
Computation times
=================
-**00:45.025** total execution time for **how_to_work_with_relay** files:
+**00:45.236** total execution time for **how_to_work_with_relay** files:
+----------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_relay_using_pipeline_executor.py` (``using_pipeline_executor.py``) | 00:33.086 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_relay_using_pipeline_executor.py` (``using_pipeline_executor.py``) | 00:33.139 | 0.0 MB |
+----------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_relay_using_external_lib.py` (``using_external_lib.py``) | 00:10.510 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_relay_using_external_lib.py` (``using_external_lib.py``) | 00:10.565 | 0.0 MB |
+----------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_relay_build_gcn.py` (``build_gcn.py``) | 00:01.422 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_relay_build_gcn.py` (``build_gcn.py``) | 00:01.526 | 0.0 MB |
+----------------------------------------------------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_how_to_work_with_relay_using_relay_viz.py` (``using_relay_viz.py``) | 00:00.007 | 0.0 MB |
+| :ref:`sphx_glr_how_to_work_with_relay_using_relay_viz.py` (``using_relay_viz.py``) | 00:00.006 | 0.0 MB |
+----------------------------------------------------------------------------------------------------+-----------+--------+
diff --git a/docs/_sources/how_to/work_with_relay/using_external_lib.rst.txt b/docs/_sources/how_to/work_with_relay/using_external_lib.rst.txt
index 3727410eb1..de7a74b6fe 100644
--- a/docs/_sources/how_to/work_with_relay/using_external_lib.rst.txt
+++ b/docs/_sources/how_to/work_with_relay/using_external_lib.rst.txt
@@ -58,14 +58,14 @@ To begin with, we import Relay and TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 49-53
+.. GENERATED FROM PYTHON SOURCE LINES 44-48
Create a simple network
-----------------------
Let's create a very simple network for demonstration.
It consists of convolution, batch normalization, and ReLU activation.
-.. GENERATED FROM PYTHON SOURCE LINES 53-74
+.. GENERATED FROM PYTHON SOURCE LINES 48-69
.. code-block:: default
@@ -97,14 +97,14 @@ It consists of convolution, batch normalization, and ReLU activation.
-.. GENERATED FROM PYTHON SOURCE LINES 75-79
+.. GENERATED FROM PYTHON SOURCE LINES 70-74
Build and run with cuda backend
-------------------------------
We build and run this network with cuda backend, as usual.
By setting the logging level to DEBUG, the result of Relay graph compilation will be dumped as pseudo code.
-.. GENERATED FROM PYTHON SOURCE LINES 79-94
+.. GENERATED FROM PYTHON SOURCE LINES 74-89
.. code-block:: default
@@ -130,7 +130,7 @@ By setting the logging level to DEBUG, the result of Relay graph compilation wil
-.. GENERATED FROM PYTHON SOURCE LINES 95-497
+.. GENERATED FROM PYTHON SOURCE LINES 90-492
The generated pseudo code should look something like below.
Note how bias add, batch normalization, and ReLU activation are fused into the convolution kernel.
@@ -535,14 +535,14 @@ TVM generates a single, fused kernel from this representation.
tensor[((((((blockIdx.y*112) + blockIdx.x) + (threadIdx.z*12544))*16) + threadIdx.x) + 152096)] = max(((compute[31]*placeholder[((threadIdx.z*4) + 3)]) + placeholder[((threadIdx.z*4) + 3)]), 0.000000f)
}
-.. GENERATED FROM PYTHON SOURCE LINES 499-503
+.. GENERATED FROM PYTHON SOURCE LINES 494-498
Use cuDNN for a convolutional layer
-----------------------------------
We can use cuDNN to replace convolution kernels with cuDNN ones.
To do that, all we need to do is to append the option " -libs=cudnn" to the target string.
-.. GENERATED FROM PYTHON SOURCE LINES 503-516
+.. GENERATED FROM PYTHON SOURCE LINES 498-511
.. code-block:: default
@@ -566,7 +566,7 @@ To do that, all we need to do is to append the option " -libs=cudnn" to the targ
-.. GENERATED FROM PYTHON SOURCE LINES 517-540
+.. GENERATED FROM PYTHON SOURCE LINES 512-535
Note that if you use cuDNN, Relay cannot fuse convolution with layers following it.
This is because layer fusion happens at the level of TVM internal representation(IR).
@@ -592,13 +592,13 @@ The pseudo code below shows that cuDNN convolution + bias add + batch norm + ReL
}
}
-.. GENERATED FROM PYTHON SOURCE LINES 543-546
+.. GENERATED FROM PYTHON SOURCE LINES 538-541
Verify the result
-----------------
We can check that the results of two runs match.
-.. GENERATED FROM PYTHON SOURCE LINES 546-549
+.. GENERATED FROM PYTHON SOURCE LINES 541-544
.. code-block:: default
@@ -612,7 +612,7 @@ We can check that the results of two runs match.
-.. GENERATED FROM PYTHON SOURCE LINES 550-568
+.. GENERATED FROM PYTHON SOURCE LINES 545-563
Conclusion
----------
diff --git a/docs/_sources/how_to/work_with_relay/using_pipeline_executor.rst.txt b/docs/_sources/how_to/work_with_relay/using_pipeline_executor.rst.txt
index 48b96a62ef..02663a22d1 100644
--- a/docs/_sources/how_to/work_with_relay/using_pipeline_executor.rst.txt
+++ b/docs/_sources/how_to/work_with_relay/using_pipeline_executor.rst.txt
@@ -175,15 +175,21 @@ The generated subgraphs should look something like below.
+.. rst-class:: sphx-glr-script-out
+ .. code-block:: none
-.. GENERATED FROM PYTHON SOURCE LINES 117-119
+ '\n#subgraphs[0])\n\n def @main(%data: Tensor[(1, 3, img_size, img_size), float16]) {\n %0 = nn.conv2d(%data, meta[relay.Constant][0] /* ty=Tensor[(16, 3, 3, 3), float16] */, padding=[1, 1, 1, 1], channels=16, kernel_size=[3, 3]) /* ty=Tensor[(1, 16, img_size, img_size), float16] */;\n %1 = nn.batch_norm(%0, meta[relay.Constant][1] /* ty=Tensor[(16), float16] */, meta[relay.Constant][2] /* ty=Tensor[(16), float16]*/, meta[relay.Constant][3] /* ty=Tensor[(16), float16] */, meta[rela [...]
+
+
+
+.. GENERATED FROM PYTHON SOURCE LINES 112-114
Build the subgraph with cutlass target.
---------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 119-144
+.. GENERATED FROM PYTHON SOURCE LINES 114-139
.. code-block:: default
@@ -219,13 +225,13 @@ Build the subgraph with cutlass target.
-.. GENERATED FROM PYTHON SOURCE LINES 145-148
+.. GENERATED FROM PYTHON SOURCE LINES 140-143
Run the two subgraphs in pipeline with pipeline executor.
---------------------------------------------------------
Set 'USE_PIPELINE_EXECUTOR' as ON, and set USE_CUTLASS' as ON in cmake.
-.. GENERATED FROM PYTHON SOURCE LINES 148-150
+.. GENERATED FROM PYTHON SOURCE LINES 143-145
.. code-block:: default
@@ -238,13 +244,13 @@ Set 'USE_PIPELINE_EXECUTOR' as ON, and set USE_CUTLASS' as ON in cmake.
-.. GENERATED FROM PYTHON SOURCE LINES 151-154
+.. GENERATED FROM PYTHON SOURCE LINES 146-149
Create subgraph pipeline configuration.
Associate a subgraph module with a target.
Use CUTLASS BYOC to build the second subgraph module.
-.. GENERATED FROM PYTHON SOURCE LINES 154-157
+.. GENERATED FROM PYTHON SOURCE LINES 149-152
.. code-block:: default
@@ -258,11 +264,11 @@ Use CUTLASS BYOC to build the second subgraph module.
-.. GENERATED FROM PYTHON SOURCE LINES 158-159
+.. GENERATED FROM PYTHON SOURCE LINES 153-154
Get the pipeline executor configuration object.
-.. GENERATED FROM PYTHON SOURCE LINES 159-160
+.. GENERATED FROM PYTHON SOURCE LINES 154-155
.. code-block:: default
@@ -274,11 +280,11 @@ Get the pipeline executor configuration object.
-.. GENERATED FROM PYTHON SOURCE LINES 161-162
+.. GENERATED FROM PYTHON SOURCE LINES 156-157
Set the compile target of the subgraph module.
-.. GENERATED FROM PYTHON SOURCE LINES 162-164
+.. GENERATED FROM PYTHON SOURCE LINES 157-159
.. code-block:: default
@@ -291,11 +297,11 @@ Set the compile target of the subgraph module.
-.. GENERATED FROM PYTHON SOURCE LINES 165-166
+.. GENERATED FROM PYTHON SOURCE LINES 160-161
Set the compile target of the second subgraph module as cuda.
-.. GENERATED FROM PYTHON SOURCE LINES 166-177
+.. GENERATED FROM PYTHON SOURCE LINES 161-172
.. code-block:: default
@@ -317,11 +323,11 @@ Set the compile target of the second subgraph module as cuda.
-.. GENERATED FROM PYTHON SOURCE LINES 178-179
+.. GENERATED FROM PYTHON SOURCE LINES 173-174
The pipeline configuration as below.
-.. GENERATED FROM PYTHON SOURCE LINES 179-191
+.. GENERATED FROM PYTHON SOURCE LINES 174-186
.. code-block:: default
@@ -341,15 +347,21 @@ The pipeline configuration as below.
+.. rst-class:: sphx-glr-script-out
+ .. code-block:: none
-.. GENERATED FROM PYTHON SOURCE LINES 197-199
+ '\nprint(pipe_config)\n Inputs\n |data: mod0:data\n\n output\n |output(0) : mod1.output(0)\n\n connections\n |mod0.output(0)-> mod1.data_n_0\n'
+
+
+
+.. GENERATED FROM PYTHON SOURCE LINES 187-189
Build the pipeline executor.
----------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 199-201
+.. GENERATED FROM PYTHON SOURCE LINES 189-191
.. code-block:: default
@@ -362,11 +374,11 @@ Build the pipeline executor.
-.. GENERATED FROM PYTHON SOURCE LINES 202-203
+.. GENERATED FROM PYTHON SOURCE LINES 192-193
Export the parameter configuration to a file.
-.. GENERATED FROM PYTHON SOURCE LINES 203-206
+.. GENERATED FROM PYTHON SOURCE LINES 193-196
.. code-block:: default
@@ -380,12 +392,12 @@ Export the parameter configuration to a file.
-.. GENERATED FROM PYTHON SOURCE LINES 207-209
+.. GENERATED FROM PYTHON SOURCE LINES 197-199
Use the load function to create and initialize PipelineModule.
--------------------------------------------------------------
-.. GENERATED FROM PYTHON SOURCE LINES 209-211
+.. GENERATED FROM PYTHON SOURCE LINES 199-201
.. code-block:: default
@@ -398,13 +410,13 @@ Use the load function to create and initialize PipelineModule.
-.. GENERATED FROM PYTHON SOURCE LINES 212-215
+.. GENERATED FROM PYTHON SOURCE LINES 202-205
Run the pipeline executor.
--------------------------
Allocate input data.
-.. GENERATED FROM PYTHON SOURCE LINES 215-217
+.. GENERATED FROM PYTHON SOURCE LINES 205-207
.. code-block:: default
@@ -417,12 +429,12 @@ Allocate input data.
-.. GENERATED FROM PYTHON SOURCE LINES 218-220
+.. GENERATED FROM PYTHON SOURCE LINES 208-210
Run the two subgraph in the pipeline mode to get the output asynchronously
or synchronously. In the following example, it is synchronous.
-.. GENERATED FROM PYTHON SOURCE LINES 220-222
+.. GENERATED FROM PYTHON SOURCE LINES 210-212
.. code-block:: default
@@ -435,13 +447,13 @@ or synchronously. In the following example, it is synchronous.
-.. GENERATED FROM PYTHON SOURCE LINES 223-226
+.. GENERATED FROM PYTHON SOURCE LINES 213-216
Use graph_executor for verification.
------------------------------------
Run these two subgraphs in sequence with graph_executor to get the output.
-.. GENERATED FROM PYTHON SOURCE LINES 226-246
+.. GENERATED FROM PYTHON SOURCE LINES 216-236
.. code-block:: default
@@ -472,11 +484,11 @@ Run these two subgraphs in sequence with graph_executor to get the output.
-.. GENERATED FROM PYTHON SOURCE LINES 247-248
+.. GENERATED FROM PYTHON SOURCE LINES 237-238
Verify the result.
-.. GENERATED FROM PYTHON SOURCE LINES 248-249
+.. GENERATED FROM PYTHON SOURCE LINES 238-239
.. code-block:: default
diff --git a/docs/_sources/how_to/work_with_relay/using_relay_viz.rst.txt b/docs/_sources/how_to/work_with_relay/using_relay_viz.rst.txt
index c9ba65f80a..d8da9d1070 100644
--- a/docs/_sources/how_to/work_with_relay/using_relay_viz.rst.txt
+++ b/docs/_sources/how_to/work_with_relay/using_relay_viz.rst.txt
@@ -80,14 +80,14 @@ For more details, please refer to :py:mod:`tvm.contrib.relay_viz`.
-.. GENERATED FROM PYTHON SOURCE LINES 72-76
+.. GENERATED FROM PYTHON SOURCE LINES 67-71
Define a Relay IR Module with multiple GlobalVar
------------------------------------------------
Let's build an example Relay IR Module containing multiple ``GlobalVar``.
We define an ``add`` function and call it in the main function.
-.. GENERATED FROM PYTHON SOURCE LINES 76-92
+.. GENERATED FROM PYTHON SOURCE LINES 71-87
.. code-block:: default
@@ -114,14 +114,14 @@ We define an ``add`` function and call it in the main function.
-.. GENERATED FROM PYTHON SOURCE LINES 93-97
+.. GENERATED FROM PYTHON SOURCE LINES 88-92
Render the graph with Relay Visualizer on the terminal
------------------------------------------------------
The terminal can show a Relay IR module in text similar to clang AST-dump.
We should see ``main`` and ``AddFunc`` function. ``AddFunc`` is called twice in the ``main`` function.
-.. GENERATED FROM PYTHON SOURCE LINES 97-100
+.. GENERATED FROM PYTHON SOURCE LINES 92-95
.. code-block:: default
@@ -153,7 +153,7 @@ We should see ``main`` and ``AddFunc`` function. ``AddFunc`` is called twice in
-.. GENERATED FROM PYTHON SOURCE LINES 101-107
+.. GENERATED FROM PYTHON SOURCE LINES 96-102
Customize Parser for Interested Relay Types
-------------------------------------------
@@ -162,7 +162,7 @@ It is possible to provide customized parsers as long as it obeys the interface.
Here demonstrate how to customize parsers for ``relay.var``.
We need to implement abstract interface :py:class:`tvm.contrib.relay_viz.interface.VizParser`.
-.. GENERATED FROM PYTHON SOURCE LINES 107-127
+.. GENERATED FROM PYTHON SOURCE LINES 102-122
.. code-block:: default
@@ -193,12 +193,12 @@ We need to implement abstract interface :py:class:`tvm.contrib.relay_viz.interfa
-.. GENERATED FROM PYTHON SOURCE LINES 128-130
+.. GENERATED FROM PYTHON SOURCE LINES 123-125
Pass the parser and an interested renderer to visualizer.
Here we just the terminal renderer.
-.. GENERATED FROM PYTHON SOURCE LINES 130-133
+.. GENERATED FROM PYTHON SOURCE LINES 125-128
.. code-block:: default
@@ -230,7 +230,7 @@ Here we just the terminal renderer.
-.. GENERATED FROM PYTHON SOURCE LINES 134-141
+.. GENERATED FROM PYTHON SOURCE LINES 129-136
Customization around Graph and Plotter
-------------------------------------------
@@ -240,7 +240,7 @@ abstract class :py:class:`tvm.contrib.relay_viz.interface.VizGraph` and
Here we override the ``TermGraph`` defined in ``terminal.py`` for easier demo.
We add a hook duplicating above ``AwesomeVar``, and make ``TermPlotter`` use the new class.
-.. GENERATED FROM PYTHON SOURCE LINES 141-164
+.. GENERATED FROM PYTHON SOURCE LINES 136-159
.. code-block:: default
@@ -297,7 +297,7 @@ We add a hook duplicating above ``AwesomeVar``, and make ``TermPlotter`` use the
-.. GENERATED FROM PYTHON SOURCE LINES 165-175
+.. GENERATED FROM PYTHON SOURCE LINES 160-170
Summary
-------
diff --git a/docs/_sources/how_to/work_with_schedules/extern_op.rst.txt b/docs/_sources/how_to/work_with_schedules/extern_op.rst.txt
index 807ab082bd..eea7efe1dd 100644
--- a/docs/_sources/how_to/work_with_schedules/extern_op.rst.txt
+++ b/docs/_sources/how_to/work_with_schedules/extern_op.rst.txt
@@ -59,7 +59,7 @@ or pointer to DLTensor as argument.
-.. GENERATED FROM PYTHON SOURCE LINES 50-64
+.. GENERATED FROM PYTHON SOURCE LINES 45-59
Use Extern Tensor Function
--------------------------
@@ -76,7 +76,7 @@ TVM does not control internal of the extern array function and treats it as blac
We can further mix schedulable TVM calls that add a bias term to the result.
-.. GENERATED FROM PYTHON SOURCE LINES 64-81
+.. GENERATED FROM PYTHON SOURCE LINES 59-76
.. code-block:: default
@@ -104,14 +104,14 @@ We can further mix schedulable TVM calls that add a bias term to the result.
-.. GENERATED FROM PYTHON SOURCE LINES 82-86
+.. GENERATED FROM PYTHON SOURCE LINES 77-81
Verify the Result
-----------------
We can verify that the result matches what we expected.
-.. GENERATED FROM PYTHON SOURCE LINES 86-95
+.. GENERATED FROM PYTHON SOURCE LINES 81-90
.. code-block:: default
@@ -131,7 +131,7 @@ We can verify that the result matches what we expected.
-.. GENERATED FROM PYTHON SOURCE LINES 96-101
+.. GENERATED FROM PYTHON SOURCE LINES 91-96
Extern Contrib Wrappers
-----------------------
@@ -139,7 +139,7 @@ TVM also provide extern contrib wrappers to useful extern calls,
the following line is equivalent to the previous example.
-.. GENERATED FROM PYTHON SOURCE LINES 101-107
+.. GENERATED FROM PYTHON SOURCE LINES 96-102
.. code-block:: default
@@ -156,7 +156,7 @@ the following line is equivalent to the previous example.
-.. GENERATED FROM PYTHON SOURCE LINES 108-119
+.. GENERATED FROM PYTHON SOURCE LINES 103-114
Hook Python Function as Extern
------------------------------
@@ -170,7 +170,7 @@ callbacks to inspect the intermediate results or mix customized code
with TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 119-139
+.. GENERATED FROM PYTHON SOURCE LINES 114-134
.. code-block:: default
@@ -207,7 +207,7 @@ with TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 140-146
+.. GENERATED FROM PYTHON SOURCE LINES 135-141
Summary
-------
diff --git a/docs/_sources/how_to/work_with_schedules/intrin_math.rst.txt b/docs/_sources/how_to/work_with_schedules/intrin_math.rst.txt
index afa4856ca7..552e245ed5 100644
--- a/docs/_sources/how_to/work_with_schedules/intrin_math.rst.txt
+++ b/docs/_sources/how_to/work_with_schedules/intrin_math.rst.txt
@@ -35,13 +35,12 @@ names of different target platforms. In this tutorial, we will learn
how we can invoke these target specific functions, and how we can unify
the interface via TVM's intrinsic API.
-.. GENERATED FROM PYTHON SOURCE LINES 31-40
+.. GENERATED FROM PYTHON SOURCE LINES 31-39
.. code-block:: default
from __future__ import absolute_import, print_function
-
import numpy as np
import tvm
@@ -55,7 +54,7 @@ the interface via TVM's intrinsic API.
-.. GENERATED FROM PYTHON SOURCE LINES 45-52
+.. GENERATED FROM PYTHON SOURCE LINES 40-47
Direct Declare Extern Math Call
-------------------------------
@@ -65,7 +64,7 @@ In the following example, we use :any:`tvm.tir.call_pure_extern` to call
:code:`__expf` function, which is only available under CUDA.
-.. GENERATED FROM PYTHON SOURCE LINES 52-63
+.. GENERATED FROM PYTHON SOURCE LINES 47-58
.. code-block:: default
@@ -117,7 +116,7 @@ In the following example, we use :any:`tvm.tir.call_pure_extern` to call
-.. GENERATED FROM PYTHON SOURCE LINES 64-76
+.. GENERATED FROM PYTHON SOURCE LINES 59-71
Unified Intrinsic Call
----------------------
@@ -132,7 +131,7 @@ The following code use te.exp instead, which create an intrinsic call
:py::func:`tvm.te.exp` to do the exponential.
-.. GENERATED FROM PYTHON SOURCE LINES 76-86
+.. GENERATED FROM PYTHON SOURCE LINES 71-81
.. code-block:: default
@@ -183,13 +182,13 @@ The following code use te.exp instead, which create an intrinsic call
-.. GENERATED FROM PYTHON SOURCE LINES 87-90
+.. GENERATED FROM PYTHON SOURCE LINES 82-85
We can find that the code works for both CUDA and opencl.
The same te.exp can also be used for float64 data types.
-.. GENERATED FROM PYTHON SOURCE LINES 90-93
+.. GENERATED FROM PYTHON SOURCE LINES 85-88
.. code-block:: default
@@ -220,7 +219,7 @@ The same te.exp can also be used for float64 data types.
-.. GENERATED FROM PYTHON SOURCE LINES 94-103
+.. GENERATED FROM PYTHON SOURCE LINES 89-98
Intrinsic Lowering Rule
-----------------------
@@ -232,7 +231,7 @@ TVM also allows user to customize the rules during runtime.
The following example customizes CUDA lowering rule for :code:`exp`.
-.. GENERATED FROM PYTHON SOURCE LINES 103-123
+.. GENERATED FROM PYTHON SOURCE LINES 98-118
.. code-block:: default
@@ -265,11 +264,11 @@ The following example customizes CUDA lowering rule for :code:`exp`.
.. code-block:: none
- <function my_cuda_math_rule at 0x7f9951dde7a0>
+ <function my_cuda_math_rule at 0x7f9f6fe0b3b0>
-.. GENERATED FROM PYTHON SOURCE LINES 124-129
+.. GENERATED FROM PYTHON SOURCE LINES 119-124
Register the rule to TVM with override option to override existing rule.
Notice the difference between the printed code from previous one:
@@ -277,7 +276,7 @@ our new rule uses math function :code:`expf` instead of
fast math version :code:`__expf`.
-.. GENERATED FROM PYTHON SOURCE LINES 129-132
+.. GENERATED FROM PYTHON SOURCE LINES 124-127
.. code-block:: default
@@ -321,7 +320,7 @@ fast math version :code:`__expf`.
-.. GENERATED FROM PYTHON SOURCE LINES 133-139
+.. GENERATED FROM PYTHON SOURCE LINES 128-134
Add Your Own Intrinsic
----------------------
@@ -330,7 +329,7 @@ User can easily add new intrinsic by using the intrinsic rule system.
The following example add an intrinsic :code:`mylog` to the system.
-.. GENERATED FROM PYTHON SOURCE LINES 139-171
+.. GENERATED FROM PYTHON SOURCE LINES 134-166
.. code-block:: default
@@ -403,7 +402,7 @@ The following example add an intrinsic :code:`mylog` to the system.
-.. GENERATED FROM PYTHON SOURCE LINES 172-179
+.. GENERATED FROM PYTHON SOURCE LINES 167-174
Summary
-------
diff --git a/docs/_sources/how_to/work_with_schedules/reduction.rst.txt b/docs/_sources/how_to/work_with_schedules/reduction.rst.txt
index c81c13f0e5..f533213a16 100644
--- a/docs/_sources/how_to/work_with_schedules/reduction.rst.txt
+++ b/docs/_sources/how_to/work_with_schedules/reduction.rst.txt
@@ -51,7 +51,7 @@ In this tutorial, we will demonstrate how to do reduction in TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 43-65
+.. GENERATED FROM PYTHON SOURCE LINES 40-62
Describe Sum of Rows
--------------------
@@ -76,7 +76,7 @@ The equivalent C code is as follows:
}
-.. GENERATED FROM PYTHON SOURCE LINES 65-71
+.. GENERATED FROM PYTHON SOURCE LINES 62-68
.. code-block:: default
@@ -93,7 +93,7 @@ The equivalent C code is as follows:
-.. GENERATED FROM PYTHON SOURCE LINES 72-77
+.. GENERATED FROM PYTHON SOURCE LINES 69-74
Schedule the Reduction
----------------------
@@ -101,7 +101,7 @@ There are several ways to schedule a reduction.
Before doing anything, let us print out the IR code of default schedule.
-.. GENERATED FROM PYTHON SOURCE LINES 77-80
+.. GENERATED FROM PYTHON SOURCE LINES 74-77
.. code-block:: default
@@ -134,7 +134,7 @@ Before doing anything, let us print out the IR code of default schedule.
-.. GENERATED FROM PYTHON SOURCE LINES 81-87
+.. GENERATED FROM PYTHON SOURCE LINES 78-84
You can find that the IR code is quite like the C code.
The reduction axis is similar to a normal axis, it can be splitted.
@@ -143,7 +143,7 @@ In the following code we split both the row axis of B as well
axis by different factors. The result is a nested reduction.
-.. GENERATED FROM PYTHON SOURCE LINES 87-91
+.. GENERATED FROM PYTHON SOURCE LINES 84-88
.. code-block:: default
@@ -188,11 +188,11 @@ axis by different factors. The result is a nested reduction.
-.. GENERATED FROM PYTHON SOURCE LINES 92-93
+.. GENERATED FROM PYTHON SOURCE LINES 89-90
If we are building a GPU kernel, we can bind the rows of B to GPU threads.
-.. GENERATED FROM PYTHON SOURCE LINES 93-97
+.. GENERATED FROM PYTHON SOURCE LINES 90-94
.. code-block:: default
@@ -235,7 +235,7 @@ If we are building a GPU kernel, we can bind the rows of B to GPU threads.
-.. GENERATED FROM PYTHON SOURCE LINES 98-109
+.. GENERATED FROM PYTHON SOURCE LINES 95-106
Reduction Factoring and Parallelization
---------------------------------------
@@ -249,7 +249,7 @@ In the following schedule, the result of B is written to a temporary
result B.rf. The factored dimension becomes the first dimension of B.rf.
-.. GENERATED FROM PYTHON SOURCE LINES 109-114
+.. GENERATED FROM PYTHON SOURCE LINES 106-111
.. code-block:: default
@@ -296,13 +296,13 @@ result B.rf. The factored dimension becomes the first dimension of B.rf.
-.. GENERATED FROM PYTHON SOURCE LINES 115-118
+.. GENERATED FROM PYTHON SOURCE LINES 112-115
The scheduled operator of B also get rewritten to be sum over
the first axis of reduced result of B.f
-.. GENERATED FROM PYTHON SOURCE LINES 118-120
+.. GENERATED FROM PYTHON SOURCE LINES 115-117
.. code-block:: default
@@ -321,7 +321,7 @@ the first axis of reduced result of B.f
-.. GENERATED FROM PYTHON SOURCE LINES 121-133
+.. GENERATED FROM PYTHON SOURCE LINES 118-130
Cross Thread Reduction
----------------------
@@ -336,7 +336,7 @@ The final generated kernel will divide the rows by blockIdx.x and threadIdx.y
columns by threadIdx.x and finally do a cross thread reduction over threadIdx.x
-.. GENERATED FROM PYTHON SOURCE LINES 133-143
+.. GENERATED FROM PYTHON SOURCE LINES 130-140
.. code-block:: default
@@ -423,12 +423,12 @@ columns by threadIdx.x and finally do a cross thread reduction over threadIdx.x
-.. GENERATED FROM PYTHON SOURCE LINES 144-146
+.. GENERATED FROM PYTHON SOURCE LINES 141-143
Verify the correctness of result kernel by comparing it to numpy.
-.. GENERATED FROM PYTHON SOURCE LINES 146-153
+.. GENERATED FROM PYTHON SOURCE LINES 143-150
.. code-block:: default
@@ -446,7 +446,7 @@ Verify the correctness of result kernel by comparing it to numpy.
-.. GENERATED FROM PYTHON SOURCE LINES 154-159
+.. GENERATED FROM PYTHON SOURCE LINES 151-156
Describe Convolution via 2D Reduction
-------------------------------------
@@ -454,7 +454,7 @@ In TVM, we can describe convolution via 2D reduction in a simple way.
Here is an example for 2D convolution with filter size = [3, 3] and strides = [1, 1].
-.. GENERATED FROM PYTHON SOURCE LINES 159-172
+.. GENERATED FROM PYTHON SOURCE LINES 156-169
.. code-block:: default
@@ -502,7 +502,7 @@ Here is an example for 2D convolution with filter size = [3, 3] and strides = [1
-.. GENERATED FROM PYTHON SOURCE LINES 173-181
+.. GENERATED FROM PYTHON SOURCE LINES 170-178
.. _general-reduction:
@@ -513,7 +513,7 @@ Besides the built-in reduction operations like :any:`te.sum`,
commutative reduction operation by :any:`te.comm_reducer`.
-.. GENERATED FROM PYTHON SOURCE LINES 181-189
+.. GENERATED FROM PYTHON SOURCE LINES 178-186
.. code-block:: default
@@ -532,7 +532,7 @@ commutative reduction operation by :any:`te.comm_reducer`.
-.. GENERATED FROM PYTHON SOURCE LINES 190-195
+.. GENERATED FROM PYTHON SOURCE LINES 187-192
.. note::
@@ -540,7 +540,7 @@ commutative reduction operation by :any:`te.comm_reducer`.
values like :code:`argmax`, which can be done by tuple inputs.
See :ref:`reduction-with-tuple-inputs` for more detail.
-.. GENERATED FROM PYTHON SOURCE LINES 197-204
+.. GENERATED FROM PYTHON SOURCE LINES 194-201
Summary
-------
diff --git a/docs/_sources/how_to/work_with_schedules/scan.rst.txt b/docs/_sources/how_to/work_with_schedules/scan.rst.txt
index 678605df6c..784f47d821 100644
--- a/docs/_sources/how_to/work_with_schedules/scan.rst.txt
+++ b/docs/_sources/how_to/work_with_schedules/scan.rst.txt
@@ -48,7 +48,7 @@ Recurrent computing is a typical pattern in neural networks.
-.. GENERATED FROM PYTHON SOURCE LINES 40-58
+.. GENERATED FROM PYTHON SOURCE LINES 37-55
TVM supports a scan operator to describe symbolic loop.
The following scan op computes cumsum over columns of X.
@@ -69,7 +69,7 @@ The result of the scan is a tensor, giving the result of :code:`s_state` after t
update over the time domain.
-.. GENERATED FROM PYTHON SOURCE LINES 58-66
+.. GENERATED FROM PYTHON SOURCE LINES 55-63
.. code-block:: default
@@ -88,7 +88,7 @@ update over the time domain.
-.. GENERATED FROM PYTHON SOURCE LINES 67-74
+.. GENERATED FROM PYTHON SOURCE LINES 64-71
Schedule the Scan Cell
----------------------
@@ -98,7 +98,7 @@ first iteration dimension of the update part.
To split on the time iteration, user can schedule on scan_op.scan_axis instead.
-.. GENERATED FROM PYTHON SOURCE LINES 74-86
+.. GENERATED FROM PYTHON SOURCE LINES 71-83
.. code-block:: default
@@ -147,7 +147,7 @@ To split on the time iteration, user can schedule on scan_op.scan_axis instead.
-.. GENERATED FROM PYTHON SOURCE LINES 87-92
+.. GENERATED FROM PYTHON SOURCE LINES 84-89
Build and Verify
----------------
@@ -155,7 +155,7 @@ We can build the scan kernel like other TVM kernels, here we use
numpy to verify the correctness of the result.
-.. GENERATED FROM PYTHON SOURCE LINES 92-102
+.. GENERATED FROM PYTHON SOURCE LINES 89-99
.. code-block:: default
@@ -176,7 +176,7 @@ numpy to verify the correctness of the result.
-.. GENERATED FROM PYTHON SOURCE LINES 103-112
+.. GENERATED FROM PYTHON SOURCE LINES 100-109
Multi-Stage Scan Cell
---------------------
@@ -188,7 +188,7 @@ The following lines demonstrate a scan with two stage operations
in the scan cell.
-.. GENERATED FROM PYTHON SOURCE LINES 112-121
+.. GENERATED FROM PYTHON SOURCE LINES 109-118
.. code-block:: default
@@ -208,14 +208,14 @@ in the scan cell.
-.. GENERATED FROM PYTHON SOURCE LINES 122-126
+.. GENERATED FROM PYTHON SOURCE LINES 119-123
These intermediate tensors can also be scheduled normally.
To ensure correctness, TVM creates a group constraint to forbid
the body of scan to be compute_at locations outside the scan loop.
-.. GENERATED FROM PYTHON SOURCE LINES 126-131
+.. GENERATED FROM PYTHON SOURCE LINES 123-128
.. code-block:: default
@@ -265,7 +265,7 @@ the body of scan to be compute_at locations outside the scan loop.
-.. GENERATED FROM PYTHON SOURCE LINES 132-138
+.. GENERATED FROM PYTHON SOURCE LINES 129-135
Multiple States
---------------
@@ -274,7 +274,7 @@ recurrent state. Scan support multiple recurrent states.
The following example demonstrates how we can build recurrence with two states.
-.. GENERATED FROM PYTHON SOURCE LINES 138-154
+.. GENERATED FROM PYTHON SOURCE LINES 135-151
.. code-block:: default
@@ -330,7 +330,7 @@ The following example demonstrates how we can build recurrence with two states.
-.. GENERATED FROM PYTHON SOURCE LINES 155-162
+.. GENERATED FROM PYTHON SOURCE LINES 152-159
Summary
-------
diff --git a/docs/_sources/how_to/work_with_schedules/schedule_primitives.rst.txt b/docs/_sources/how_to/work_with_schedules/schedule_primitives.rst.txt
index e5bffc7488..0ad18d5e65 100644
--- a/docs/_sources/how_to/work_with_schedules/schedule_primitives.rst.txt
+++ b/docs/_sources/how_to/work_with_schedules/schedule_primitives.rst.txt
@@ -51,7 +51,7 @@ various primitives provided by TVM.
-.. GENERATED FROM PYTHON SOURCE LINES 42-50
+.. GENERATED FROM PYTHON SOURCE LINES 37-45
There often exist several methods to compute the same result,
however, different methods will result in different locality and
@@ -62,7 +62,7 @@ A **Schedule** is a set of transformation of computation that
transforms the loop of computations in the program.
-.. GENERATED FROM PYTHON SOURCE LINES 51-56
+.. GENERATED FROM PYTHON SOURCE LINES 46-51
.. code-block:: default
@@ -78,12 +78,12 @@ transforms the loop of computations in the program.
-.. GENERATED FROM PYTHON SOURCE LINES 57-59
+.. GENERATED FROM PYTHON SOURCE LINES 52-54
A schedule can be created from a list of ops, by default the
schedule computes tensor in a serial manner in a row-major order.
-.. GENERATED FROM PYTHON SOURCE LINES 59-72
+.. GENERATED FROM PYTHON SOURCE LINES 54-67
.. code-block:: default
@@ -126,20 +126,20 @@ schedule computes tensor in a serial manner in a row-major order.
-.. GENERATED FROM PYTHON SOURCE LINES 73-76
+.. GENERATED FROM PYTHON SOURCE LINES 68-71
One schedule is composed by multiple stages, and one
**Stage** represents schedule for one operation. We provide various
methods to schedule every stage.
-.. GENERATED FROM PYTHON SOURCE LINES 78-82
+.. GENERATED FROM PYTHON SOURCE LINES 73-77
split
-----
:code:`split` can split a specified axis into two axes by
:code:`factor`.
-.. GENERATED FROM PYTHON SOURCE LINES 82-89
+.. GENERATED FROM PYTHON SOURCE LINES 77-84
.. code-block:: default
@@ -178,12 +178,12 @@ split
-.. GENERATED FROM PYTHON SOURCE LINES 90-92
+.. GENERATED FROM PYTHON SOURCE LINES 85-87
You can also split a axis by :code:`nparts`, which splits the axis
contrary with :code:`factor`.
-.. GENERATED FROM PYTHON SOURCE LINES 92-99
+.. GENERATED FROM PYTHON SOURCE LINES 87-94
.. code-block:: default
@@ -221,14 +221,14 @@ contrary with :code:`factor`.
-.. GENERATED FROM PYTHON SOURCE LINES 100-104
+.. GENERATED FROM PYTHON SOURCE LINES 95-99
tile
----
:code:`tile` help you execute the computation tile by tile over two
axes.
-.. GENERATED FROM PYTHON SOURCE LINES 104-111
+.. GENERATED FROM PYTHON SOURCE LINES 99-106
.. code-block:: default
@@ -274,13 +274,13 @@ axes.
-.. GENERATED FROM PYTHON SOURCE LINES 112-115
+.. GENERATED FROM PYTHON SOURCE LINES 107-110
fuse
----
:code:`fuse` can fuse two consecutive axes of one computation.
-.. GENERATED FROM PYTHON SOURCE LINES 115-125
+.. GENERATED FROM PYTHON SOURCE LINES 110-120
... 8361 lines suppressed ...