tasks = autotvm.task.extract_from_program(irmod["main"], target=target,
params=params,
ops=(relay.op.get("nn.conv2d"),))
print(len(tasks)) # 9
def tune_graph(graph, dshape, records, opt_sch_file, target, use_DP=True):
target_op = [relay.op.get("nn.conv2d"),]
Tuner = DPTuner if use_DP else PBQPTuner
executor = Tuner(graph, {input_tensor: dshape}, records, target_op, target)
executor.benchmark_layout_transform(min_exec_num=2000)
executor.run()
executor.write_opt_sch2record_file(opt_sch_file)
the line number of opt_sch_file : 13 lines
wihy is the length of opt_sch_file not equal to the size of tasks.
thanks in advance.