[auto_scheduler] yolov3 from_darknet no tasks

My tvm version is tvm_v0.8.0, when i use auto scheduler to tune yolov3(which from darknet)the error occur: no tasks

my code as follow: mod, params = relay.frontend.from_darknet(net, dtype=dtype, shape=data.shape) tasks, task_weights = auto_scheduler.extract_tasks(mod[“main”], params, target, include_simple_tasks=True) measure_ctx = auto_scheduler.LocalRPCMeasureContext(number=5, repeat=1, min_repeat_ms=1000, timeout=120) tuner = auto_scheduler.TaskScheduler(tasks, task_weights) tune_option = auto_scheduler.TuningOptions( num_measure_trials = 2000, runner = measure_ctx.runner, measure_callbacks = [auto_scheduler.RecordToFile(log_file)],) tuner.tune(tune_option)

I set the include_simple_tasks = False, and I get the len(tasks) = 0, I’m so confused, who man can help?

I also encountered this problem.

What target are you using? And would you post the Relay model using the following code?

mod, params = relay.frontend.from_darknet(net, dtype=dtype, shape=data.shape)
print(mod["main"])

the target is “cuda -libs=cudnn,culabs”, and as you say, i use the following code to post the Relay model:

mod, params = relay.frontend.from_darknet(net, dtype=dtype, shape=data.shape)

in addition,i found the tasks which in auto-tune by the following code will export many tasks:

tasks = autotvm.task.extract_from_program( mod[“main”], target=target, params=params, ops=(relay.op.get(“nn.conv2d”),)

but when i use auto-scheduler by auto_scheduler.extract_tasks(mod, params, target), there is no tasks, it confused me and block continue to use auto-schedule.

Could you try again with target “cuda”? (remove -libs).

I try to remove -libs, and result export 31 tasks, so i can continue to schedule.

but a problem that i tested the target “cuda” is so slower than “cuda -libs=cudnn”,if i use “cuda” to auto-scheduler to get the best schedule_log, can i use the log to improve inference performance with “cuda -libs=cudnn” ?

Both CUDNN and auto-scheduler are trying to accelerate the same graph, so you should pick up the better one. If you use auto-scheduler to achieve better performance over CUDNN, you don’t and cannot use CUDNN to further improve it.

@comaniac

So, if some layers run faster with cuDNN, and others with Ansor, can I use both? For example, can I replace Ansor-optimized layers with cuDNN?