I was trying to optimize a TFLite graph using 
`autotvm.task_extract_from_program` but the method returns an empty list. To be 
precise:
```
tasks = autotvm.task.extract_from_program(mod["main"], target=target,
                                          params=params, ops=target_op)
```
I have tried removing `ops=target_op` so that the method defaults to *all* 
operators but still I get an empty task list. The output of that command 
indicates that the graph is being traversed, I won't bother you with the entire 
output, but here is a small sample:
```
INFO:compile_engine:Use implementation injective.cpu for op nn.bias_add
INFO:compile_engine:Use implementation injective.cpu for op clip
WARNING:strategy:For x86 target, NCHW layout is recommended for conv2d.
INFO:compile_engine:Use implementation conv2d_nhwc.x86 for op nn.conv2d
INFO:compile_engine:Use implementation injective.cpu for op nn.bias_add
WARNING:strategy:depthwise_conv2d NHWC layout is not optimized for x86.
INFO:compile_engine:Use implementation depthwise_conv2d_nhwc.generic for op 
nn.conv2d
INFO:compile_engine:Use implementation injective.cpu for op nn.bias_add
INFO:compile_engine:Use implementation injective.cpu for op clip
WARNING:strategy:For x86 target, NCHW layout is recommended for conv2d.
INFO:compile_engine:Use implementation conv2d_nhwc.x86 for op nn.conv2d
INFO:compile_engine:Use implementation injective.cpu for op nn.bias_add
INFO:compile_engine:Use implementation injective.cpu for op clip
WARNING:strategy:For x86 target, NCHW layout is recommended for conv2d.
INFO:compile_engine:Use implementation conv2d_nhwc.x86 for op nn.conv2d
INFO:compile_engine:Use implementation injective.cpu for op nn.bias_add
WARNING:strategy:depthwise_conv2d NHWC layout is not optimized for x86.
```

I have used this before using TF models with no problems so I am wondering if 
there is a particular issue with TFLite models. My test model is MobileNet_V2 
from the Google Zoo. I can compile said model and run inference on the binaries 
without tuning the graph.

Most likely I am missing something, but I could not find the definition of 
`autotvm.task_extract_from_program` in the source code.

Any hints as to why the task list is empty would be greatly appreciated.
Thanks!





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/cc2ba5d43378f06a6b44197fe9a9d2b6b74f6f29e65340c121619f42db4428d4).

Reply via email to