@@ -74,13 +74,13 @@ def conv2d_layer(N, H, W, CO, CI, KH, KW, stride, padding):
7474
7575######################################################################
7676# Next, we set parameters for the auto-scheduler. These parameters
77- # mainly specify how we do the measurement.
77+ # mainly specify how we do the measurement during the search and auto-tuning .
7878#
7979# * `measure_ctx` launches a different process for measurement. This
80- # provides an isolation. It can protect the master process from any crashes
80+ # provides an isolation. It can protect the master process from GPU crashes
8181# happended during measurement and avoid other runtime conflicts.
8282# * `min_repeat_ms` defines the minimum duration of one "repeat" in every measurement.
83- # This can warmup the GPU, which is necessary to get reliable measurement results.
83+ # This can warmup the GPU, which is necessary to get accurate measurement results.
8484# * `num_measure_trials` is the number of measurement trials we can use during the search.
8585# We only make 10 trials in this tutorial for a fast demonstration. In practice, 1000 is a
8686# good value for the search to converge. You can do more trials according to your time budget.
@@ -109,7 +109,7 @@ def conv2d_layer(N, H, W, CO, CI, KH, KW, stride, padding):
109109######################################################################
110110# We can lower the schedule to see the IR after auto-scheduling.
111111# The auto-scheduler correctly performs optimizations including multi-level tiling,
112- # parallelization, vectorization , unrolling and fusion.
112+ # cooperative fetching , unrolling and operator fusion.
113113
114114print (tvm .lower (sch , args , simple_mode = True ))
115115
@@ -172,6 +172,7 @@ def conv2d_layer(N, H, W, CO, CI, KH, KW, stride, padding):
172172# and resume the status of search policy and cost model with the log file.
173173# In the example below we resume the status and do more 5 trials.
174174
175+
175176log_file = "conv2d.json"
176177cost_model = auto_scheduler .XGBModel ()
177178cost_model .update_from_file (log_file )
@@ -185,4 +186,5 @@ def conv2d_layer(N, H, W, CO, CI, KH, KW, stride, padding):
185186)
186187sch , args = auto_scheduler .auto_schedule (task , search_policy , tuning_options = tune_option )
187188
189+ # kill the measurement process
188190del measure_ctx
0 commit comments