Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions gallery/tutorial/tvmc_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#
# .. code-block:: python
#
# #model = tvmc.load(my_model, shape_dict={'input1' : [1, 2, 3, 4], 'input2' : [1, 2, 3, 4]}) #Step 1: Load + shape_dict
# #model = tvmc.load('my_model.onnx', shape_dict={'input1' : [1, 2, 3, 4], 'input2' : [1, 2, 3, 4]}) #Step 1: Load + shape_dict
#
# A suggested way to see the model's input/shape_dict is via `netron <https://netron.app/>`_. After opening the model,
# click the first node to see the name(s) and shape(s) in the inputs section.
Expand Down Expand Up @@ -111,7 +111,7 @@
# result = tvmc.run(package, device="cpu") #Step 3: Run
#
# And you can print the results:
# ``print(results)``
# ``print(result)``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also fix my_model in line 71? Like:

s/my_model/'my_model.onnx'/ ?

Also, since you'll need to re-trigger the CI, would you mind to:

in lines 240 and 245 add a space after second comma, i.e. s/"llvm",tuning_records/"llvm", tuning_records/ ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I have re-triggered the CI and fix typos mentioned above.

#

################################################################################
Expand Down Expand Up @@ -202,10 +202,10 @@
#
# .. code-block:: python
#
# tvmc.compile(model, target="llvm", package_path="whatever")
# tvmc.compile(model, target="llvm", package_path="whatever") #Step 2: Compile
#
# new_package = tvmc.TVMCPackage(package_path="whatever")
# result = tvmc.run(new_package) #Step 3: Run
# result = tvmc.run(new_package, device="cpu") #Step 3: Run
#
#

Expand Down Expand Up @@ -237,7 +237,7 @@
# log_file = "hello.json"
#
# # Run tuning
# tvmc.tune(model, target="llvm",tuning_records=log_file)
# tvmc.tune(model, target="llvm", tuning_records=log_file)
#
# ...
#
Expand Down Expand Up @@ -285,7 +285,7 @@
# model,
# target=target, # Compilation target as string // Device to compile for
# target_host=target_host, # Host processor
# hostname=host_ip_address, #The IP address of an RPC tracker, used when benchmarking remotely.
# hostname=host_ip_address, # The IP address of an RPC tracker, used when benchmarking remotely.
# port=port_number, # The port of the RPC tracker to connect to. Defaults to 9090.
# rpc_key=your_key, # The RPC tracker key of the target device. Required when rpc_tracker is provided
# )
Expand Down