hogepodge commented on a change in pull request #7640: URL: https://github.com/apache/tvm/pull/7640#discussion_r593833342
########## File path: tutorials/get_started/tvmc_command_line_driver.py ########## @@ -97,114 +97,134 @@ ###################################################################### -# Compiling the model -# ------------------- +# Compiling an ONNX Model to the TVM Runtime +# ------------------------------------------ # -# The next step once we've downloaded ResNet-50, is to compile it, -# To accomplish that, we are going to use ``tvmc compile``. The -# output we get from the compilation process is a TAR package, -# that can be used to run our model on the target device. +# Once we've downloaded the ResNet-50 model, the next step is to compile it. To accomplish that, we are +# going to use ``tvmc compile``. The output we get from the compilation process is a TAR package of the model +# compiled to a dynamic library for our target platform. We can run that model on our target device using the +# TVM runtime. # # .. code-block:: bash # # tvmc compile \ -# --target "llvm" \ -# --output compiled_module.tar \ -# resnet50-v2-7.onnx +# --target "llvm" \ +# --output resnet50-v2-7-tvm.tar \ +# resnet50-v2-7.onnx +# +# Let's take a look at the files that ``tvmc compile`` creates: +# +# .. code-block:: bash # -# Once compilation finishes, the output ``compiled_module.tar`` will be created. This -# can be directly loaded by your application and run via the TVM runtime APIs. +# mkdir model +# tar -xvf resnet50-v2-7-tvm.tar -C model +# ls model +# +# You will see three files listed. +# +# * ``mod.so`` is the model, represented as a C++ library, that can be loaded by the TVM runtime. +# * ``mod.json`` is a text representation of the TVM Relay computation graph. +# * ``mod.params`` is a file containing the parameters for the pre-trained model. +# +# This model can be directly loaded by your application and run via the TVM runtime APIs. # ###################################################################### -# .. note:: Defining the correct target +# .. note:: Defining the Correct Target # # Specifying the correct target (option ``--target``) can have a huge # impact on the performance of the compiled module, as it can take # advantage of hardware features available on the target. For more # information, please refer to `Auto-tuning a convolutional network # for x86 CPU <https://tvm.apache.org/docs/tutorials/autotvm/tune_relay_x86.html#define-network>`_. +# We recommend identifying which CPU you are running, along with optional features, +# and set the target appropriately. # - ###################################################################### +# Running the TVM IR Model with TVMC Review comment: Ok, I made some changes, let me know what you think. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
