comaniac commented on a change in pull request #4947: [TUTORIAL] Fix tedd
tutorial after strategy change
URL: https://github.com/apache/incubator-tvm/pull/4947#discussion_r384670913
##########
File path: tutorials/language/tedd.py
##########
@@ -63,102 +63,102 @@
A = tvm.placeholder((in_size, in_size, in_channel, batch), name='A')
W = tvm.placeholder((kernel, kernel, in_channel, num_filter), name='W')
B = tvm.placeholder((1, num_filter, 1), name='bias')
-with tvm.target.create("cuda"):
+with tvm.target.create("llvm"):
t_conv = topi.nn.conv2d(A, W, stride, padding, dilation, layout='HWCN')
t_bias = topi.add(t_conv, B)
t_relu = topi.nn.relu(t_bias)
- s = topi.generic.schedule_conv2d_hwcn([t_relu])
-
-######################################################################
+ s = topi.generic.schedule_conv2d_hwcn([t_relu])
+
+######################################################################
# Render Graphs with TEDD
# -----------------------
-# We render graphs to see the computation
-# and how it is scheduled.
-# If you run the tutorial in a Jupyter notebook, you can use the following
commented lines
+# We render graphs to see the computation
+# and how it is scheduled.
+# If you run the tutorial in a Jupyter notebook, you can use the following
commented lines
# to render SVG figures showing in notebook directly.
#
-tedd.viz_dataflow_graph(s, dot_file_path = '/tmp/dfg.dot')
-#tedd.viz_dataflow_graph(s, show_svg = True)
+tedd.viz_dataflow_graph(s, dot_file_path = '/tmp/dfg.dot')
+#tedd.viz_dataflow_graph(s, show_svg = True)
######################################################################
# .. image::
https://github.com/dmlc/web-data/raw/master/tvm/tutorial/tedd_dfg.png
# :align: center
# :scale: 100%
#
-# The first one is a dataflow graph. Every node represents a stage with name
and memory
-# scope shown in the middle and inputs/outputs information on the sides.
-# Edges show nodes' dependency.
+# The first one is a dataflow graph. Every node represents a stage with name
and memory
+# scope shown in the middle and inputs/outputs information on the sides.
+# Edges show nodes' dependency.
#
-tedd.viz_schedule_tree(s, dot_file_path = '/tmp/scheduletree.dot')
-#tedd.viz_schedule_tree(s, show_svg = True)
+tedd.viz_schedule_tree(s, dot_file_path = '/tmp/scheduletree.dot')
+#tedd.viz_schedule_tree(s, show_svg = True)
######################################################################
-# We just rendered the schedule tree graph. You may notice an warning about
ranges not
+# We just rendered the schedule tree graph. You may notice an warning about
ranges not
# available.
# The message also suggests to call normalize() to infer range information.
We will
# skip inspecting the first schedule tree and encourage you to compare the
graphs before
# and after normalize() for its impact.
#
s = s.normalize()
-tedd.viz_schedule_tree(s, dot_file_path = '/tmp/scheduletree2.dot')
-#tedd.viz_schedule_tree(s, show_svg = True)
+tedd.viz_schedule_tree(s, dot_file_path = '/tmp/scheduletree2.dot')
+#tedd.viz_schedule_tree(s, show_svg = True)
######################################################################
# .. image::
https://github.com/dmlc/web-data/raw/master/tvm/tutorial/tedd_st.png
# :align: center
# :scale: 100%
Review comment:
ditto
----------------------------------------------------------------
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]
With regards,
Apache Git Services